List a chat's messages
GET/v1/profiles/{profile_id}/chats/{chat_id}/messages
- Scope
messages:read - Pages with
before
The chat's messages, newest first, ordered by when they happened.
Parameters
Path
profile_idstringrequiredThe line (
prf_…).chat_idstringrequiredThe chat (
cht_…).
Query
limitintegerItems per page, 1–200 (default 50).
beforestringThe
next_beforeof the previous page.
Response
200 OKA page of messages.
dataarray of MessagerequiredFields of
dataidstringrequiredmsg_…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.
has_morebooleanrequiredMore items exist after this page.
next_beforestring or nullrequiredPass as
beforefor the next page; null on the last one.
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.