Send message
Send a message in a conversation. Supports text, attachments, quick replies, buttons, templates, and message tags. Attachment and interactive message support varies by platform.
WhatsApp per-recipient rate limit: WhatsApp caps how many messages you may
send to the same recipient in a short window and rejects the excess with
error code 131056 ("Too many messages sent to this recipient"). Pace
sends to a single recipient at roughly 10 per minute; bursts above that
return a 400 with code 131056. Sends to other recipients are
unaffected, so parallelise across recipients rather than flooding one.
WhatsApp template messages: to send an approved template into this
conversation (required when the 24-hour customer-service window is
closed), use the template field with a single element carrying the
template reference: { "elements": [{ "name": ..., "language": ..., "components": [...] }] }.
See the template field below for the exact shape. To send a template
to a phone number you have no conversation with yet, use the
create-conversation endpoint (POST /v1/inbox/conversations) instead.
Zernio resolves the exact APPROVED template name and language before any
WhatsApp template send. A failed lookup or missing exact definition sends
no message and returns code platform_api_error, type platform_error,
and platform whatsapp. Sanitized Meta code, message, and
error_data.details are returned in platformError; details identifies
phase: template_lookup, the query-free endpoint, upstream status, and
only safe provider usage or retry headers.
WhatsApp rich interactive messages (list, CTA URL, Flow, location request)
are available via the interactive field. Tap events are delivered through
the message.received webhook with WhatsApp-specific metadata fields
(interactiveType, interactiveId, flowResponseJson, flowResponseData).
Idempotency: send an Idempotency-Key header to make retries safe
(e.g. after a client-side timeout where delivery is unknown): same key +
same body replays the original response (with Idempotent-Replayed: true)
instead of sending the message a second time; same key + different body
returns 422; a key still in flight returns 409. Works for JSON and
multipart (file upload) requests alike. Keys are retained for 24 hours.
Only successful (2xx) responses are stored for replay: if the request throws or returns a non-2xx status, the key is released so the same key can be retried once the problem is fixed. The header therefore protects the "request succeeded but the response was lost" case. For an ambiguous failure (a 5xx or a network timeout), reconcile before retrying: a failure after the platform already accepted the message also releases the key, and a blind retry could send it twice. List the conversation's messages first, and treat an empty result as inconclusive rather than as proof nothing was sent, since a send that failed while being recorded leaves no trace on our side.
Authorization
bearerAuth API key authentication: send your Zernio API key in the Authorization header, prefixed with Bearer.
In: header
Path Parameters
Opaque conversation identifier, accepted verbatim from the list endpoint or from the conversationId on inbox webhooks. Format not to be assumed.
Header Parameters
Optional client-generated unique key (e.g. a UUID) that makes retries safe. Same key + same body replays the original response; same key + different body → 422; key still processing → 409.
length <= 255TypeScript Definitions
Use the request body type in TypeScript.
Response Body
application/json
application/json
application/json
application/json
application/json
application/json
application/json
application/json
{ "success": true, "warnings": [ { "code": "ignored_field", "param": "replyTo", "message": "string" } ], "data": { "messageId": "string", "conversationId": "string", "attachments": [ { "type": "string", "url": "string" } ], "messageIds": [ "string" ], "partialFailure": { "part": "text", "error": "string", "platformError": { "code": 0, "subcode": 0, "fbtraceId": "string", "type": "string" } } }}List messages
Fetch messages for a specific conversation, with cursor-based pagination and ordering control. Pagination: pass `pagination.nextCursor` from a prior response back as the `cursor` query param to fetch the next page. The cursor is opaque; do not parse or construct it client-side. Sort order: defaults to `asc` (oldest first, chat style). For the "show me the latest messages" pattern, pass `?sortOrder=desc&limit=N`. X, Instagram, Telegram, WhatsApp and Reddit honor the requested order from the local message store. For Facebook and Bluesky, the upstream APIs only return newest-first and have no order parameter, so sort order is best-effort and only reverses items within a single page (pages still walk newest→oldest). The response field `sortOrderApplied` tells you what was actually applied. Reddit threads are paginated client-side because Reddit's API has no per-thread cursor. Very long threads may be upstream-truncated by Reddit's inbox/sent windows (~100 most-recent items each); this is a Reddit platform limitation. Instagram and Facebook conversations include history from before the account was connected, replayed from Meta. That replay covers the 500 most recent messages per conversation: a longer thread keeps its newest 500 and older messages are not retrievable. Messages that arrived after the account was connected are unaffected. Replayed messages are stored as already read and emit no webhooks. X limitation: X's encrypted "X Chat" messages are not accessible via the API. Conversations where the other participant uses encrypted X Chat may only show your outgoing messages. See the list conversations endpoint for more details. This endpoint is read-only and does NOT mark messages as read or send read receipts. To mark a conversation read (and send WhatsApp blue ticks on eligible accounts), call `POST /v1/inbox/conversations/{conversationId}/read`.
Edit message
Edit the text and/or reply markup of a previously sent Telegram message. Only supported for Telegram. Returns 400 for other platforms.