Error responses
Every error returns a JSON envelope with a stable application code on top of the standard HTTP status.
Response envelope
{
"error": {
"type": "invalid_request_error",
"code": "invalid_template",
"message": "Template body must include {{1}} placeholder.",
"request_id": "req_01H…",
"doc_url": "https://docs.sendystack.com/errors#invalid_template"
}
}Always log request_id — it's how support traces your call in our server logs.
HTTP status codes
200OK
Request succeeded.
201Created
Resource was created.
202Accepted
Async work was accepted; final state arrives via webhook.
400Bad Request
Body validation failed. See `error.message` for the specific field.
401Unauthorized
Missing or invalid API key.
403Forbidden
Key lacks the required scope, or the action is plan-gated.
404Not Found
Resource doesn't exist in your workspace.
409Conflict
Idempotency / uniqueness conflict (e.g. template name already taken).
429Too Many Requests
Rate limit hit — back off using the Retry-After header.
500Internal Server Error
Something broke server-side; safe to retry with backoff.
502Bad Gateway
Upstream (Meta) failed. The error message carries Meta's reason.
503Service Unavailable
A required upstream isn't configured (Meta, Stripe, AI). Surface the message to the user.
Common application codes
invalid_api_key
API key missing, revoked, or for a different workspace.
policy_violation
Compliance scanner flagged the template / message content against WhatsApp policy.
quota_exhausted
Plan message cap reached for the current billing period.
meta_not_configured
META_TOKEN missing on the server — Meta-related routes are disabled.
no_waba
Workspace has no WhatsApp Business Account configured yet. Complete onboarding.
template_not_approved
Template exists but isn't APPROVED on Meta yet. Wait for review.
tenant_taken
The workspace id you tried to claim is already owned by another account.