Assign a chat or mark it seen
PATCH/v1/profiles/{profile_id}/chats/{chat_id}
- Scope
messages:send
assigned_to says who handles the chat (agent, human or null) and sends chat.updated. seen: true marks it read in the app (unread count 0) without a read receipt to the other side.
Parameters
Path
profile_idstringrequiredThe line (
prf_…).chat_idstringrequiredThe chat (
cht_…).
Request body
assigned_to"agent" | "human" or nullagent,human, or null for nobody.seentruetruesets the unread count to 0 without a read receipt.
Response
200 OKThe chat.
idstringrequiredcht_…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_countintegerrequiredInbound messages since the chat was last read.
last_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 AttachmentrequiredFields of
attachmentsidstringrequiredatt_…file_namestring or nullrequiredmime_typestring or nullrequiredsize_bytesinteger or nullrequiredurlstringrequiredA path on the API:
GETit with your key and follow the302to a short-lived download link.
servicestring 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 ReactionrequiredFields of
reactionskind"love" | "like" | "dislike" | "laugh" | "emphasize" | "question" or "emoji"requiredOne of the six tapbacks, or
emojifor an emoji reaction.emojistring or nullrequiredThe emoji, when
kindisemoji.fromstringrequired"me"for the line's own reaction, else the person's address.attimestamp or nullrequired
status"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.Fields of
errorcodestringrequiredmessagestringrequired
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.
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.