Developer docs
Overview and quickstart
Braidport turns your clients' official messaging accounts into one event stream and one REST API. This page explains the model and takes you from an empty account to a reply in a conversation, using the sandbox so you need no real channel yet.
On this page
How it fits together#
- Your organization is your agency or product. For each end client (a dental practice, a shop) you create a workspace.
- You send the client a white-label connect link. They connect WhatsApp Business, Instagram, Messenger, a Telegram bot or Google in a few minutes, with no developer console. Each connected account becomes a channel of that workspace.
- Everything that happens on the channels arrives as signed events on your webhook endpoints. You answer with
POST /v1/messages, addressing the reply by the event'sconversation_id. - One organization key and one organization-level webhook cover every client. Per-workspace keys and endpoints exist for isolation.
Message content is not stored in a database: events are held encrypted in transit for at most 24 hours, which is how long you can redeliver them. Polling reads the most recent 200 or so events of the workspace, none older than 24 hours.
API basics#
- Base URL
https://api.braidport.com. Every route lives under/v1. - Authenticate with
Authorization: Bearer <key>, using a workspace key (bp_ws_…) or an organization key (bp_org_…). See API keys and scopes. - JSON in and out,
snake_casefields, ISO-8601 UTC timestamps, prefixed ids such asws_…,ch_…,evt_…. - Send an
Idempotency-Keyheader on every POST so that a retry never acts twice. - Lists return
{ data, next_cursor }; passnext_cursorback ascursor. - Errors have one shape with a stable
codeand ahint. See Errors. - Each key may make 1,200 requests a minute, with bursts of up to 40 a second. Test events (sandbox messages and sends, endpoint tests) are limited to 1,000 per organization per UTC day.
The full reference, generated from the same contract as these pages, is at https://api.braidport.com/docs (OpenAPI 3.1 document: /v1/openapi.json).
1. Create a workspace and a key#
Create an account and start the 7-day trial, then confirm your e-mail address from the link we send you and create a workspace for your first client in the dashboard. Open the workspace's API keys tab, create a key and store it as BRAIDPORT_API_KEY. Keys are shown once.
Check the key with GET /v1/me:
curl -X GET https://api.braidport.com/v1/me \ -H "Authorization: Bearer $BRAIDPORT_API_KEY"2. Use the sandbox channel#
Every workspace already owns a virtual sandbox channel, so there is nothing to connect yet. It is not counted in plan limits or usage. List the channels to see it:
curl -X GET https://api.braidport.com/v1/channels \ -H "Authorization: Bearer $BRAIDPORT_API_KEY"More in Sandbox.
3. Register a webhook endpoint#
/v1/webhook-endpointsscope adminCreate a webhook endpoint; the signing secret is returned once
curl -X POST https://api.braidport.com/v1/webhook-endpoints \ -H "Authorization: Bearer $BRAIDPORT_API_KEY" \ -H "Idempotency-Key: endpoint-setup-1" \ -H "Content-Type: application/json" \ -d '{ "url": "https://example.com/webhooks/braidport", "events": [ "message.received", "message.sent", "message.status" ]}'The response contains the signing secret (whsec_…) once. Store it as BRAIDPORT_WEBHOOK_SECRET and verify every delivery with it. For a quick test, any request-inspection URL you control works as the endpoint.
4. Receive your first event#
Simulate a customer writing to the sandbox:
curl -X POST https://api.braidport.com/v1/test/inbound \ -H "Authorization: Bearer $BRAIDPORT_API_KEY" \ -H "Idempotency-Key: sandbox-1" \ -H "Content-Type: application/json" \ -d '{ "text": "Hi, can I book for tomorrow?", "from": { "id": "sandbox-mario", "name": "Mario Rossi" }}'Within moments your endpoint receives a message.received event with "test": true:
{ "id": "evt_sabr24pa3eywnyp266ssm8yw9pkrdvzr2hy4wwnsg1vrbbze92xg", "type": "message.received", "api_version": "2026-11-01", "created_at": "2026-11-10T19:20:30.123Z", "test": true, "workspace_id": "ws_01m74e503kmb73kwncxpsgwymm", "channel": { "id": "ch_01m74e503q4nzfn8h6zkwqq7gq", "provider": "sandbox", "external_account_id": "ws_01m74e503kmb73kwncxpsgwymm", "display_name": "Sandbox" }, "data": { "message": { "provider_message_id": "sbx_01m74e503r8p6t1d2k5w9q0z3c", "conversation_id": "cnv_djF8Y2hfMDFtNzRlNTAzcTRuemZuOGg2emt3cXE3Z3F8c2FuZGJveC1tYXJpb3w", "direction": "inbound", "source": null, "client_reference": null, "timestamp": "2026-11-10T19:20:30.000Z", "from": { "id": "sandbox-mario", "name": "Mario Rossi", "username": null, "phone": null }, "type": "text", "text": "Hi, can I book for tomorrow?", "attachments": [], "audio_url": null, "interactive_reply": null, "location": null, "contacts": null, "reaction": null, "share": null, "reply_to": null, "referral": null, "identity_change": null } }}5. Reply#
Answer in the same conversation with the event's conversation_id:
curl -X POST https://api.braidport.com/v1/messages \ -H "Authorization: Bearer $BRAIDPORT_API_KEY" \ -H "Idempotency-Key: reply-evt_sabr24pa3eyw" \ -H "Content-Type: application/json" \ -d '{ "conversation_id": "cnv_djF8Y2hfMDFtNzRlNTAzcTRuemZuOGg2emt3cXE3Z3F8c2FuZGJveC1tYXJpb3w", "type": "text", "text": "See you tomorrow at 10:00", "client_reference": "booking-8841"}'{ "provider_message_id": "wamid.HBgMMzkzNDAxMjM0NTY3FQIAERgSQjI", "conversation_id": "cnv_djF8Y2hfMDFtNzRlNTAzcTRuemZuOGg2emt3cXE3Z3F8c2FuZGJveC1tYXJpb3w", "channel_id": "ch_01m74e503q4nzfn8h6zkwqq7gq", "status": "sent", "client_reference": "booking-8841"}Sandbox sends never reach a provider. They come back as a message.sent event and a message.status with delivered, exactly the events a real channel produces.
6. Connect a real channel#
Copy the workspace's connect link from the dashboard and send it to your client. When they connect, you receive channel.connected, and their customers' messages start arriving on the same endpoint with "test": false. Your code does not change.
Using the TypeScript SDK#
@braidport/sdk is a zero-dependency client for /v1 with typed events and webhook verification. It runs on Node.js 20 or later, Bun, Deno and edge runtimes. It has not been released to npm yet.
npm install @braidport/sdkimport { Braidport, isMessageReceived, verifyWebhook } from "@braidport/sdk"; const braidport = new Braidport({ apiKey: process.env.BRAIDPORT_API_KEY! }); export async function handleWebhook(rawBody: string, headers: Headers) { const event = await verifyWebhook({ payload: rawBody, headers, secret: process.env.BRAIDPORT_WEBHOOK_SECRET!, }); if (isMessageReceived(event)) { const { message } = event.data; await braidport.messages.send( { conversation_id: message.conversation_id, type: "text", text: `Thanks, ${message.from.name ?? "there"}!`, }, // Deliveries are at-least-once: a key derived from the event id makes a redelivery send nothing new. { idempotencyKey: `reply-${event.id}` }, ); }}Prefer no code? Use the n8n node or let an AI agent work through the MCP server.