Conversations
Assign a conversation
Assigns the conversation to a workspace member, or unassigns it. Only owners and admins signed in to the app can assign; API keys act as agents and always get 403.
- Console only: owner or admin
- Workspace:
X-Tenant-ID
Path parameters
iduuidrequiredConversation id.
Headers
CookiestringrequiredThe
whatsappx_sessioncookie the app sets when you sign in. Browsers send it automatically; API keys are not accepted on this endpoint.X-Tenant-IDuuidrequiredWorkspace id. Required for session requests. You can pass
?tenant=<id>instead.
Body
application/jsonassignee_iduuidoptionalThe teammate’s user id (
user_idfrom the members list, not the membershipid). Sendnullor""to unassign.
Response
200 OKapplication/json
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 updated conversation with
assignee_idandassignee_name(both left out after unassigning). In this responselast_messageisnull. - 400Bad request.
invalid assignee_id,assignee must be a workspace member,invalid request bodyorinvalid conversation 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). - 403Forbidden. The caller is not an owner or admin. API keys always get this response (a
readkey getsAPI key is read-onlyfirst). - 404Not found. The conversation does not exist in this workspace, belongs to the inactive connection (QR vs Cloud API), or (for agents signed in to the app) is not assigned to you.
- 500Server error. Something went wrong on our side. Retry with backoff.