List a contact's chats
GET/v1/contacts/{address}/conversations
- Scope
messages:read
The person's chats on the team's lines, each with the line, unread count and newest message.
Parameters
Path
addressstringrequiredThe person's phone number or email, URL-encoded (
%2B14155550142). Any common phone format works.
Response
200 OKChats.
object"list"requireddataarray of ConversationrequiredFields of
dataidstringrequiredcht_…object"chat"requiredprofile_idstringrequiredprf_…handlestringrequiredThe other side: a phone number (
+1…), an email, or a group chat id.kind"dm" | "group"requiredtitlestring or nullrequiredThe chat's own name (group chats).
contactChatContact or nullrequiredWhat the team calls the person (contacts), or null when nobody named them.
Fields of
contactnamestring or nullrequiredtagsarray of stringrequired
last_message_attimestamp or nullrequiredassigned_to"agent" | "human" or nullrequiredWho handles the chat; a flag your agent can read and set.
last_read_attimestamp or nullrequiredcreated_attimestamprequiredunread_countintegerrequiredlast_messageMessage or nullrequiredA message sent or received on a line.
Fields of
last_messageidstringrequiredmsg_…object"message"requiredprofile_idstringrequiredprf_…chat_idstringrequiredcht_…chat_handlestringThe chat's address: a phone number, email or group chat id.
direction"inbound" | "outbound"requiredsenderstring or nullrequiredWho sent an inbound message (in group chats, one of the members).
textstring or nullrequiredattachmentsarray of Attachmentrequiredservicestring or nullrequiredHow it went or came:
iMessage,RCSorSMS. Null until known.requested_servicestring or nullrequiredThe
servicethe send asked for, if any.fallback_fromstring or nullrequiredSet when the message failed over: the service it started on (
iMessage).reactionsarray of Reactionrequiredstatus"queued" | "dispatched" | "sent" | "delivered" | "read" | "failed" | "unconfirmed" | "received"requiredqueued→dispatched→sent→delivered→read(iMessage only), orfailed/unconfirmed. Inbound messages arereceived.errorobject or nullrequiredWhy a message failed:
line_unavailable,recipient_not_allowed,sending_paused,unconfirmedorsend_failed.guidstring or nullrequiredThe message's id in Messages, once it has one.
created_attimestamprequiredsent_attimestamp or nullrequireddelivered_attimestamp or nullrequiredread_attimestamp or nullrequiredqueue_untiltimestamp or nullrequiredWhile
queued: when the send gives up if the line is still unavailable.
lineobjectrequiredFields of
lineidstringrequiredlabelstring or nullrequiredphone_numberstring or nullrequired
Errors
| Status | Code | Means |
|---|---|---|
| 400 | validation_failed | A field is missing or invalid. |
| 401 | unauthorized | The API key is missing, unknown or revoked. |
| 403 | insufficient_scope | The API key lacks the scope this needs. |
| 404 | not_found | No such object, or the key can't see it. |
Every error is { "error": { "code", "message" } }. All error codes.