.md

For AI agents

Use this page as a skill. The source of truth is /openapi.json. Full prose is in /llms-full.txt. Do not invent endpoints or scopes.

Last updated

Facts

  • Self-hosted. Base URL is https://<cloudfront>/v1.
  • Auth: x-api-key: sb... (or Authorization: Bearer sb...)
  • Errors: { "error": string }. 401 is always Invalid API key.
  • to is always a JSON array. A string is a 400.
  • Do not call POST /api or /agent/*.
  • Do not mint keys. Do not invite users. Do not call Updates.
  • If you get Key lacks <scope> scope, stop and ask the human to add that scope.

Minimal send

POST /v1/emails
POST /v1/emails
x-api-key: sb...
Content-Type: application/json

{"from":"hello@domain.com","to":["user@example.com"],"subject":"Hi","text":"Hi"}

200: { "messageId": "...", "id": "..." }. Confirm with GET /v1/emails/{id}.

Choosing routes

GoalScopeRoute
Send transactional mailemail:sendPOST /v1/emails
Read inboxinbox:readGET /v1/conversations?root=
Reply in-threadinbox:replyPOST /v1/messages/{id}/reply
Start a campaigncampaigns:writePOST /v1/campaigns/{id}/start
Add a contactaudience:writePOST /v1/contacts
Create a templatetemplates:writePOST /v1/templates

Inbox rules

  • A key limited to specific addresses gets 404 (not 403) for other message ids.
  • Reply recipients are server-derived. Do not send to on the reply route.
  • Pass cursor for lists. Do not assume one page is complete. limit max is 50.