Messages
List messages
Returns one page of messages from a conversation. Pages go back in time (the first page holds the newest messages), but the messages inside a page are ordered oldest to newest, ready to render as a chat.
- Bearer API key
- Scope:
reador write - or app session
- Workspace:
X-Tenant-ID(optional with a key)
Path parameters
iduuidrequiredConversation id.
Headers
AuthorizationstringrequiredYour API key as
Bearer <key>. The wordBearerand the space are case-sensitive. Browser clients signed in to the app use the session cookie instead.X-Tenant-IDuuidoptionalWorkspace id. Optional with an API key (a key always acts in its own workspace); if you send it, it must match the key’s workspace. Required with a session cookie. You can pass
?tenant=<id>instead.
Query parameters
limitintegeroptionalMessages per page.
offsetintegeroptionalNumber of newer messages to skip. Ignored when
beforeis set.beforetimestampoptionalOnly return messages older than this time. Accepts RFC 3339 (
2026-10-02T14:31:07Z) or Unix seconds. Pass thetimestampof the oldest message you have to load the previous page.
Response
200 OKapplication/json
itemsarray<Message>Messages in this page, oldest first.
Show child attributesHide child attributes15
iduuidMessage id in whatsappx.si.
whatsapp_message_idstringMessage id assigned by WhatsApp.
conversation_iduuidConversation the message belongs to.
sender_jidstringWhatsApp id (JID) of the sender. For your own messages, the connected number.
sender_namestringSender display name, when WhatsApp provides one (may be empty).
contentstringMessage text. On numbers linked by QR code, images and documents carry their caption here. On the Cloud API, non-text messages are stored as a placeholder such as
[image message].message_typestringtext,imageordocumenton numbers linked by QR code. Non-text messages received through the Cloud API keep the type name Meta sends (for exampleimageoraudio) and have no downloadable media.media_urlstringmay be absentPath of the downloaded media file, for example
/api/media/<workspace>/<file>. Prefix it withhttps://whatsappx.siand send your API key to download it.mime_typestringmay be absentMIME type of the media file.
file_namestringmay be absentOriginal file name of a document.
file_sizeintegermay be absentMedia size in bytes.
timestamptimestampWhen the message was sent on WhatsApp (RFC 3339).
from_mebooleantruefor messages sent from the connected number (by your team, the API or an automation).statusenumreceivedfor incoming messages,sentfor outgoing ones. Delivered and read receipts are not tracked.created_attimestampWhen whatsappx.si stored the message (RFC 3339).
totalintegerNumber of messages matched (all messages, or those older than
before).limitintegerThe page size used.
offsetintegerThe offset used (
0whenbeforeis set).has_morebooleanWhether older messages exist. With
before, it istruewhen the page is full.
Status codes
- 200OK. One page of messages.
- 400Bad request.
invalid conversation idorinvalid before timestamp. - 401Unauthorized. The API key is unknown, revoked or expired (
invalid or expired API key), or there is no key and no signed-in session (unauthorized). - 402Payment required. Only when subscriptions are enforced and the workspace has no active subscription. The body includes
code: "payment_required". - 403Forbidden. The
X-Tenant-IDheader ortenantquery does not match the API key’s workspace (API key belongs to a different workspace), or a signed-in user is not a member of the workspace (forbidden). - 404Not found. The conversation does not exist in this workspace, belongs to the inactive connection, or (for agents signed in to the app) is not assigned to you.
- 500Server error. The workspace’s WhatsApp connection is offline (
whatsapp is not connected), or the messages could not be loaded.
How do I page through history?
- Call the endpoint without
beforeto get the newest page. - While
has_moreistrue, call it again withbeforeset to thetimestampof the first (oldest) item you received.
before is safer than offset while new messages keep arriving, because offsets shift when a message is added.
How do I download media?
Images and documents received on a number linked by QR code (up to 25 MiB) are downloaded and stored. Their media_url is a path such as /api/media/<workspace>/<file>; request https://whatsappx.si + media_url with your API key (Authorization: Bearer …) to download the file. The key must belong to the same workspace; without it you get 401, and another workspace's file answers 404. Profile pictures use /api/avatars/<workspace>/<file> the same way. There is no upload endpoint.