Endpoint
Authentication
Use a Switchbord API key scoped to the workspace. The workspace is resolved from the API key; do not send workspace ids in the request body.idempotencyKey in the JSON body. Prefer the header when the upstream system supports it.
Request shape
Responses
A successful request queues an outboundmessage.dispatch job and returns the Switchbord identities for audit and reconciliation.
New sends return HTTP 201:
200 with the existing message identity and reused: true instead of creating a duplicate send.
Variables
Body variables
For positional templates, use 1-based numeric keys:POST /api/v1/template-sends directly.
Dynamic URL button variables
For templates with a URL button such ashttps://example.com/r/{{1}}, supply the dynamic suffix by zero-based button index:
text and suffix are accepted aliases. The value must be non-empty.
Document header variables
For templates with a DOCUMENT header, supply a public HTTPS link.filename is optional but recommended.
Error responses
Idempotent reuses are not errors. They return HTTP
200 with data.reused: true.
Operational notes
- The worker still owns the final Meta dispatch. The API response means the message was accepted into Switchbord’s outbox, not necessarily delivered by Meta.
- Delivery transitions (
queued,sent,delivered,read,failed) are visible on the message/conversation records and in webhook status events. - Do not include raw card details, private receipt tokens, or long-lived secrets in template variables or metadata. Prefer short receipt ids or pre-signed URLs with appropriate expiry.