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.
Twitter, 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 —
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.
Twitter/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.
API key authentication - use your Zernio API key as a Bearer token
In: header
Path Parameters
The conversation ID (id field from list conversations endpoint). This is the platform-specific conversation identifier, not an internal database ID.
Query Parameters
Social account ID
Number of messages to return per page. Default 100, max 100.
1001 <= value <= 100Opaque pagination cursor. Pass pagination.nextCursor from a prior response.
Order of returned messages. Default asc (oldest first, chat style).
Twitter, Instagram, Telegram, WhatsApp and Reddit honor this order
across cursor pages. For Facebook and Bluesky, only intra-page
ordering is affected — pages always walk newest→oldest. See
sortOrderApplied in the response.
"asc""asc" | "desc"Response Body
application/json
application/json
import Zernio from '@zernio/node';const zernio = new Zernio({ apiKey: process.env.ZERNIO_API_KEY });const { data } = await zernio.messages.getInboxConversationMessages({ path: { conversationId: 'conversation_abc123', }, query: { accountId: 'account_abc123', },});console.log(data);{
"status": "string",
"pagination": {
"hasMore": true,
"nextCursor": "string"
},
"sortOrderApplied": "asc",
"messages": [
{
"id": "string",
"conversationId": "string",
"accountId": "string",
"platform": "string",
"message": "string",
"senderId": "string",
"senderName": "string",
"senderVerifiedType": "blue",
"direction": "incoming",
"createdAt": "2019-08-24T14:15:22Z",
"attachments": [
{
"id": "string",
"type": "image",
"url": "string",
"filename": "string",
"previewUrl": "string"
}
],
"subject": "string",
"storyReply": true,
"isStoryMention": true,
"isEdited": true,
"editedAt": "2019-08-24T14:15:22Z",
"editCount": 0,
"editHistory": [
{
"text": "string",
"attachments": [
{
"type": "string",
"url": "string",
"payload": {}
}
],
"editedAt": "2019-08-24T14:15:22Z"
}
],
"isDeleted": true,
"deletedAt": "2019-08-24T14:15:22Z",
"deliveryStatus": "sent",
"deliveredAt": "2019-08-24T14:15:22Z",
"readAt": "2019-08-24T14:15:22Z",
"sentAt": "2019-08-24T14:15:22Z",
"deliveryError": {
"code": 0,
"title": "string",
"message": "string"
},
"reactions": [
{
"emoji": "string",
"fromMe": true,
"reactedAt": "2019-08-24T14:15:22Z"
}
],
"metadata": {}
}
],
"lastUpdated": "2019-08-24T14:15:22Z"
}{
"error": "Unauthorized"
}Mark a conversation as read POST
Marks all unread incoming messages in the conversation as read. For WhatsApp, this also sends read receipts (blue ticks) to the contact, EXCEPT on coexistence accounts (where the WhatsApp Business app on the customer's phone owns read state and we never override it). This is the explicit, human-driven counterpart to `GET .../messages`, which is side-effect-free and does NOT mark anything read. Call this when a user actually views the conversation.
Send message POST
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 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. 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`).