Skip to main content
Transactional template sends let trusted external systems trigger expected WhatsApp messages through Switchbord. The endpoint is designed for Utility messaging such as payment receipts, instalment receipts, booking confirmations, vouchers, and other customer-expected operational events.
This endpoint is not a bulk marketing API. Switchbord validates the caller workspace, template status, and template category before queueing a send. Use approved UTILITY templates for transactional flows.

Endpoint

The endpoint lives on the API app. Hosted workspaces call:
Self-hosted deployments should replace the host with their API domain.

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.
You can also send the idempotency key as idempotencyKey in the JSON body. Prefer the header when the upstream system supports it.

Request shape

Responses

A successful request queues an outbound message.dispatch job and returns the Switchbord identities for audit and reconciliation. New sends return HTTP 201:
If the same idempotency key is sent again, Switchbord returns HTTP 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:
Named body variables are supported by Switchbord’s internal transactional compiler for inbound webhook mappings, but the public API route currently accepts positional body variables only. Use numeric body keys or an array when calling POST /api/v1/template-sends directly.

Dynamic URL button variables

For templates with a URL button such as https://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.
Document links must use HTTPS. Invalid or non-HTTPS links are rejected before queueing.

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.