Send API
POST /api/send/email/, /sms/ and /whatsapp/: fields, scheduling, retries and errors.
Each call queues one message to one recipient and answers at once with the job; sending happens in the background.
| Call | Sends | to |
|---|---|---|
POST /api/send/email/ | an email template | an email address |
POST /api/send/sms/ | an SMS template | a number in international format, e.g. +919876543210 |
POST /api/send/whatsapp/ | an approved WhatsApp template | a number in international format |
Fields (all channels)
| Field | Meaning | |
|---|---|---|
template | required | The template's slug, e.g. password-reset. |
to | required | The recipient. |
content | The template's variables, e.g. {"name":"Asha","code":"482913"}. WhatsApp needs a value for every variable. | |
locale | The template language, e.g. hi or en-US: the exact language, else its base language, else the template's default. | |
sendAt | Schedule the send: RFC 3339 with a timezone, e.g. 2026-12-01T09:30:00+05:30; in the future, at most 30 days ahead. | |
callbackUrl | Service callers only: where this job's status changes are posted, instead of the service's own callback URL. https, on a public host. |
Email only
| Field | Meaning |
|---|---|
cc, bcc | Copies, at most 10 addresses together. to stays the one recipient whose delivery decides the job's status. |
replyTo | Where replies go. |
attachments | DocBase documents by id: [{"documentId":"...","fileName":"invoice.pdf"}]. At most 10 files, 7 MB in all. Needs the DocBase connector switched on in the Marketplace. |
The answer
{"data":{"jobId":"...","jobNumber":"KLVEA2612010001","status":"pending","scheduledFor":"2026-12-01T04:00:00Z","locale":"en"}}
Safe retries: Idempotency-Key
Send an Idempotency-Key header (any unique string up to 255 characters, such as your own message id) to make a call safe to repeat. Repeating the same call with the same key returns the job it already made instead of sending twice. Reusing a key for a different message (another channel, recipient or template) is 409.
Errors
Errors are {"error":"..."} with a message saying what to fix.
| Status | When |
|---|---|
400 | A missing or invalid field: no template or recipient, a malformed address or number, missing WhatsApp variables, a bad sendAt or locale, too many copies or attachments, no tenant code set. |
401 | No key, or a key that is not valid. |
403 | The caller lacks the permission, the channel or feature is not part of the organisation's plan, or a plan limit is reached (see Plans and limits). |
404 | No template with that slug. |
409 | The Idempotency-Key was used for a different message. |
5xx | Retry later, with the same Idempotency-Key. |