Skip to content

Get started

API keys and scopes

One organization key can serve all your clients; workspace keys isolate one client. Scopes limit what each key may do, which matters most for AI agents.

On this page

Workspace and organization keys#

KeyReachesCreated in
bp_ws_…One workspace (one end client).The workspace's API keys tab, or the provisioning API.
bp_org_…Every workspace of your organization.Developers in the dashboard, by owners and admins.
  • Send the key as Authorization: Bearer <key>. It is shown once when created; Braidport stores only a hash.
  • The dashboard creates keys, webhook endpoints and invitations only once your e-mail address is confirmed; before that it answers forbidden with details.reason: "email_unverified".
  • With an organization key the workspace follows from the conversation_id or channel_id of the request; list routes take workspace_id.
  • Keys can carry an expiry date and can be revoked at any time. A revoked or expired key gets unauthorized.
  • GET /v1/me returns the calling key, its organization, plan, limits and scopes.

Scopes#

A new key has every scope unless you narrow it. A request outside the key's scopes gets forbidden, with a hint naming the missing scope.

read

Read channels, templates, events, usage and account details.

MethodPathScopeWhat it does
GET/v1/usagereadEvent usage for a UTC calendar month (current month by default)
GET/v1/channelsreadList connected channels, including the workspace's sandbox channel
GET/v1/channels/:idreadGet one channel
GET/v1/channels/:id/templatesreadList the WhatsApp message templates of a channel
GET/v1/eventsreadRecent events, oldest first: the most recent 200 or so events of the workspace, none older than 24 hours (needs the workspace's event buffer). A cursor that trimming has passed usually answers validation_failed with details.reason cursor_expired; after 48 hours without an event the buffer starts afresh and the gap is not reported

send

Send messages, typing indicators and read receipts; manage WhatsApp templates.

MethodPathScopeWhat it does
POST/v1/messagessendSend a message (synchronous; idempotent with an Idempotency-Key header)
POST/v1/conversations/:conversation_id/typingsendShow a typing indicator in a conversation
POST/v1/conversations/:conversation_id/readsendMark a received message as read
POST/v1/channels/:id/templatessendSubmit a WhatsApp message template for review
DELETE/v1/channels/:id/templates/:namesendDelete a WhatsApp message template in every language
POST/v1/test/inboundsendSimulate a customer message on the workspace's sandbox channel

calendar

Check availability and book, change or cancel calendar events.

MethodPathScopeWhat it does
POST/v1/calendar/availabilitycalendarFree slots of a given length in a connected Google Calendar
POST/v1/calendar/eventscalendarBook a calendar event (an Idempotency-Key prevents double booking)
GET/v1/calendar/events/:event_idcalendarRead a calendar event again, for example a Meet link still pending at booking
PATCH/v1/calendar/events/:event_idcalendarChange a calendar event
DELETE/v1/calendar/events/:event_idcalendarCancel a calendar event

email

Send e-mail from connected Gmail accounts.

MethodPathScopeWhat it does
POST/v1/email/sendemailSend an e-mail from a connected Gmail account

admin

Manage webhook endpoints, workspaces, connect links and API keys.

MethodPathScopeWhat it does
GET/v1/webhook-endpointsadminList webhook endpoints (workspace and organization level)
POST/v1/webhook-endpointsadminCreate a webhook endpoint; the signing secret is returned once
GET/v1/webhook-endpoints/:idadminGet one webhook endpoint
PATCH/v1/webhook-endpoints/:idadminChange a webhook endpoint
DELETE/v1/webhook-endpoints/:idadminDelete a webhook endpoint (idempotent)
POST/v1/webhook-endpoints/:id/testadminSend a signed ping event to the endpoint and report the result
POST/v1/events/:id/redeliveradminQueue an event for delivery again while it is still stored
GET/v1/workspacesadminList workspaces Organization keys only.
POST/v1/workspacesadminCreate a workspace for a client Organization keys only.
GET/v1/workspaces/:idadminGet one workspace Organization keys only.
PATCH/v1/workspaces/:idadminRename, archive or reconfigure a workspace Organization keys only.
DELETE/v1/workspaces/:idadminDelete a workspace, disconnecting its channels Organization keys only.
POST/v1/workspaces/:id/connect-linksadminCreate a connect link to send to the client Organization keys only.
POST/v1/workspaces/:id/api-keysadminCreate a workspace API key; the key is returned once Organization keys only.

GET /v1/me works with any valid key.

Keys for AI agents#

An agent that reads customer messages reads untrusted text: a message can try to instruct it. Give it only what it needs.

  • Prefer workspace keys over organization keys, so one client's conversation can never reach another client.
  • Leave out email for an agent that answers chats, so injected text cannot make it send e-mail; leave out admin for every agent.
  • Use a read-only key for agents that summarise or classify.

scope_missing is something else

scope_missing means the connected account (for example Google) did not grant a permission. The fix is on the client's side: reconnect and allow it.

Provisioning API#

On the Scale plan, organization keys with the admin scope can onboard a client end to end: create the workspace, create its connect link and send it to the client, and create a workspace key for your automation. These routes accept only organization keys; on other plans they answer feature_not_in_plan.

A new workspace key takes:

FieldTypeDescription
namestringrequired≤ 100 charsYour label for the key.
scopes"read" | "send" | "calendar" | "email" | "admin"[]optional≥ 1 itemsdefault ["read","send","calendar","email","admin"]Scopes granted to the key.
expires_attimestampoptionalOptional expiry.

Connect link options are described in White-label and domains.

All routes#

Every /v1 route with the scope it needs, straight from the API contract:

MethodPathScopeWhat it does
GET/v1/meany keyThe calling key, its organization, plan, limits and scopes
GET/v1/usagereadEvent usage for a UTC calendar month (current month by default)
GET/v1/channelsreadList connected channels, including the workspace's sandbox channel
GET/v1/channels/:idreadGet one channel
POST/v1/messagessendSend a message (synchronous; idempotent with an Idempotency-Key header)
POST/v1/conversations/:conversation_id/typingsendShow a typing indicator in a conversation
POST/v1/conversations/:conversation_id/readsendMark a received message as read
GET/v1/channels/:id/templatesreadList the WhatsApp message templates of a channel
POST/v1/channels/:id/templatessendSubmit a WhatsApp message template for review
DELETE/v1/channels/:id/templates/:namesendDelete a WhatsApp message template in every language
POST/v1/calendar/availabilitycalendarFree slots of a given length in a connected Google Calendar
POST/v1/calendar/eventscalendarBook a calendar event (an Idempotency-Key prevents double booking)
GET/v1/calendar/events/:event_idcalendarRead a calendar event again, for example a Meet link still pending at booking
PATCH/v1/calendar/events/:event_idcalendarChange a calendar event
DELETE/v1/calendar/events/:event_idcalendarCancel a calendar event
POST/v1/email/sendemailSend an e-mail from a connected Gmail account
GET/v1/webhook-endpointsadminList webhook endpoints (workspace and organization level)
POST/v1/webhook-endpointsadminCreate a webhook endpoint; the signing secret is returned once
GET/v1/webhook-endpoints/:idadminGet one webhook endpoint
PATCH/v1/webhook-endpoints/:idadminChange a webhook endpoint
DELETE/v1/webhook-endpoints/:idadminDelete a webhook endpoint (idempotent)
POST/v1/webhook-endpoints/:id/testadminSend a signed ping event to the endpoint and report the result
GET/v1/eventsreadRecent events, oldest first: the most recent 200 or so events of the workspace, none older than 24 hours (needs the workspace's event buffer). A cursor that trimming has passed usually answers validation_failed with details.reason cursor_expired; after 48 hours without an event the buffer starts afresh and the gap is not reported
POST/v1/events/:id/redeliveradminQueue an event for delivery again while it is still stored
POST/v1/test/inboundsendSimulate a customer message on the workspace's sandbox channel
GET/v1/workspacesadminList workspaces Organization keys only.
POST/v1/workspacesadminCreate a workspace for a client Organization keys only.
GET/v1/workspaces/:idadminGet one workspace Organization keys only.
PATCH/v1/workspaces/:idadminRename, archive or reconfigure a workspace Organization keys only.
DELETE/v1/workspaces/:idadminDelete a workspace, disconnecting its channels Organization keys only.
POST/v1/workspaces/:id/connect-linksadminCreate a connect link to send to the client Organization keys only.
POST/v1/workspaces/:id/api-keysadminCreate a workspace API key; the key is returned once Organization keys only.