REST API · Webhooks · API Key Auth

SFTP that just works

One API call provisions a secure SFTP directory with credentials and webhook notifications. No AWS config. No Azure portal. Just SFTP.

How it works

Three steps from your first API call to files landing in your directory.

api

1. Create a directory

Call POST /api/v1/directories with a name and optional external ID. The directory is live immediately.

key

2. Share credentials

The API response includes the SFTP host, username, and password. Hand them to a client, use them in a script, or connect directly.

webhook

3. Get notified

When a file lands, Bridglet fires a signed webhook to your endpoint. No polling.

API endpoints

Authenticate with a Bearer token. All endpoints are HTTPS only.

POST /api/v1/directories

Provision a new SFTP directory. Returns credentials immediately.

# Create a new SFTP directory
http POST bridglet.com/api/v1/directories \
Authorization:"Bearer bk_live_..." \
directory[name]="Acme Exports" \
directory[external_id]=cust_12345 \
directory[max_connections]:=10
200 Response

Credentials are returned inline. Use them in a script, pass them to a client, or connect directly.

{"data": {
"id": "a1b2c3d4-...",
"sftp_host": "sftp.bridglet.com",
"sftp_port": 2222,
"sftp_username": "acme-exports_k9x2m1",
"sftp_password": "kJ9x#mP2qR7zLn4w",
"auth_mode": "password",
"public_key_fingerprint": null,
"webhook_secret": "abc123..."
}}

Public key authentication

Each directory supports three SFTP auth modes. Switch modes at any time via the API; the change takes effect on the next login attempt.

password "password"

Default mode. Bridglet generates a strong random password and returns it in the API response. Best for getting started quickly.

key "public_key"

Authenticate with an SSH key pair — no password needed. Upload the public key via the API. The SHA256 fingerprint is returned for verification.

lock "both"

Accepts either a password or a public key. Useful during migrations where users need time to switch to key-based auth without losing access.

PATCH /api/v1/directories/:id

Upload a public key and switch the directory to key-only auth in a single call.

# Upload a public key and enable key-only auth
http PATCH bridglet.com/api/v1/directories/a1b2c3d4-... \
Authorization:"Bearer bk_live_..." \
directory[auth_mode]=public_key \
directory[public_key]="ssh-ed25519 AAAA... user@host"
200 Response

The fingerprint confirms which key is active. Store it to verify key rotation later.

{"data": {
"id": "a1b2c3d4-...",
"auth_mode": "public_key",
"public_key_fingerprint": "SHA256:mVX0Ic...",
"sftp_password": null
}}
DELETE /api/v1/directories/:id/public_key

Revoke the stored public key and revert the directory to password auth. The original password is restored, so access is not lost.

# Revoke the public key, revert to password auth
http DELETE bridglet.com/api/v1/directories/a1b2c3d4-.../public_key \
Authorization:"Bearer bk_live_..."
200 Response

Auth mode reverts to password and the fingerprint is cleared immediately.

{"data": {
"id": "a1b2c3d4-...",
"auth_mode": "password",
"public_key_fingerprint": null,
"sftp_password": "kJ9x#mP2qR7zLn4w"
}}

Webhooks

When a file arrives, Bridglet sends a signed POST to your webhook URL within seconds. No polling. No missed files.

verified_user

HMAC signature verification

Every webhook includes an x-bridglet-signature header in the format sha256=<hex> — the HMAC-SHA256 of the raw request body keyed with the directory's webhook_secret. Verification code samples →

link

external_id passthrough

The external_id you set when creating the directory is included in every webhook, so uploads map cleanly back to your records.

Webhook payload
{
"event": "file.uploaded",
"directory_id": "a1b2c3d4-...",
"external_id": "cust_12345",
"filename": "report_2026-03-28.csv",
"size_bytes": 48291,
"uploaded_at": "2026-03-28T14:22:31Z",
"directory": "acme-exports"
}
menu_book

Full API reference

This page is an overview. The complete reference documents every endpoint — listing and filtering directories, fetching a single directory, updating basic fields, deleting directories, and listing uploads — plus rate limits and error formats.

Read the docs arrow_forward
key

API key auth

Generate API keys from your Bridglet dashboard. Use bk_live_ keys in production and bk_test_ keys in staging.

lock

Bearer token

Pass your API key as a Bearer token in the Authorization header on every request. Standard HTTP auth that works with any HTTP client.

https

HTTPS only

All API traffic is encrypted over TLS. HTTP requests are rejected. SFTP connections use SSH key exchange, so credentials are never sent in plaintext.

Integration flow

Your app provisions the SFTP directory. Files get uploaded. You get notified instantly.

web
Your App
Backend / Script / CI
arrow_downward
POST /api/v1/...
terminal
Bridglet API
provisions + manages
arrow_downward
credentials
dns
SFTP Server
sftp.bridglet.com
webhook Webhook fires on file.uploaded

Start building in minutes.

Create your API key, make a POST /api/v1/directories call, and start transferring files today.