Conversations
List conversations
Returns the 30 most recently active conversations of the workspace, newest first. Each item includes a preview of the last message, the unread count and the assigned teammate. There is no pagination: use it to show or poll the top of the inbox, and read older history per conversation with its messages endpoint.
- Bearer API key
- Scope:
reador write - or app session
- Workspace:
X-Tenant-ID(optional with a key)
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
channel_iduuidoptionalOnly return conversations of this Meta channel (phone number). Useful when a workspace has several Meta numbers.
tenantuuidoptionalAlternative to the
X-Tenant-IDheader, with the same rules.
Response
200 OKapplication/json
itemsarray<Conversation>Up to 30 conversations, ordered by
last_message_at(newest first; chats without messages last).Show child attributesHide child attributes16
iduuidConversation id. Use it in
/api/conversations/{id}paths.workspace_iduuidWorkspace the conversation belongs to.
whatsapp_jidstringWhatsApp chat id (JID), for example
15551234567@s.whatsapp.netfor a person or…@g.usfor a group.channel_providerenumHow the number is connected:
scan(linked by QR code) ormeta(WhatsApp Business Platform, Cloud API).channel_iduuidmay be absentThe Meta channel (phone number) the chat belongs to. Left out for QR-linked chats.
phone_number_idstringmay be absentMeta phone number id of the channel. Left out for QR-linked chats.
namestringDisplay name: the contact or group name, or
+<digits>for a chat started by phone number.typeenumindividualorgroup.phonestringmay be absentPhone number as digits only, without
+.group_subjectstringmay be absentGroup subject, for group chats.
avatar_urlstringmay be absentProfile picture URL, when one has been downloaded.
last_messagestringnullablePreview of the newest message: its text,
Photofor an image, or the file name (orDocument) for a document.nullwhen the chat has no messages.last_message_attimestampnullableTime of the newest message as an RFC 3339 string in UTC.
nullwhen the chat has no messages.unread_countintegerUnread incoming messages.
0after the chat is marked as read.assignee_iduuidmay be absentUser id of the assigned teammate (a user id, not a membership id). Left out when unassigned.
assignee_namestringmay be absentName of the assigned teammate.
Status codes
- 200OK. The conversations, newest first.
itemsis an empty array when there is nothing to show. - 400Bad request.
channel_idis not a valid UUID (invalid channel_id), or a session request did not select a workspace (workspace required (X-Tenant-ID)). - 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). - 500Server error. The conversations could not be loaded. Retry with backoff.
Which conversations are returned?
- Active connection only. If the workspace has a Meta (Cloud API) channel, the list contains its Meta conversations; otherwise it contains the conversations of the number linked by QR code.
- Empty while a QR-linked number is offline. For a QR-linked number, the list is empty while the linked session is not connected. Check the session with
GET /api/whatsapp/statusbefore treating an empty list as "no chats". - Agents see only their chats. A teammate signed in with the agent role only sees conversations assigned to them. API keys always see the whole inbox.
- At most 30, no paging. The response is capped at 30 conversations ordered by
last_message_at; there are nolimitoroffsetparameters.