List a chat's events
Reads a chat’s event sequence in order — the transcript API. The
sequence is gapless per chat: page forward from seq 1 (or any cursor)
and nothing is ever missing between two entries.
This is the BACKFILL for GET /v1/streams/events, which is a live stream and
replays nothing: an event that passed while you were not connected is
re-read here, addressed by the chat_id and seq range every stream
frame carries.
The cursor is the seq of the last entry you processed, and it is
exclusive — pass next_cursor back verbatim, or the seq you stopped
at, and the next page starts after it. Paging never skips: the next page
resumes from the last position actually handed to you, so an event
journaled between two of your requests is returned rather than stepped
over.
Being caught up and being lost are different answers. A cursor at
the end of the sequence returns an empty page — that is the ordinary
polling result. A cursor BEYOND the end is refused with 422
(invalid_paging), because no such position has ever existed in this
chat and answering it with silence would be indistinguishable from
having caught up. The refusal names where the sequence actually ends, so
a client that has drifted can resume. An empty cursor is refused the
same way: omit the parameter to read from the beginning.
Retention. This journal has no scheduled pruning during beta, so
ordinary operation does not remove an old prefix or renumber its
immutable sequence. That is not a permanent-retention promise or a
fixed minimum availability period: authenticated account deletion,
offboarding, a lawful deletion requirement, or a beta-environment reset
may remove the account-scoped transcript. This operation therefore has
no expires_at, retained-floor field, or scheduled cursor_expired
response. If prefix pruning is introduced later, its additive retained
floor and typed expiry behavior will be published before any history is
removed.
Query Parameters
List a chat's events
curl https://whatsapp.messages.api.linqapp.com/v1/chats/$CHAT/events \
-H "Authorization: Bearer $LINQ_WHATSAPP_API_KEY"{
"data": [
{
"occurred_at": "2019-12-27T18:11:19.117Z",
"seq": 0,
"type": "type",
"message": {
"id": "id",
"chat_id": "chat_id",
"created_at": "2019-12-27T18:11:19.117Z",
"direction": "inbound",
"parts": [
{
"body": "body",
"type": "text",
"preview_url": true
}
],
"status": "status",
"channel_message_id": "channel_message_id",
"failure": {
"code": "code",
"message": "message"
},
"from": "from"
}
}
],
"has_more": true,
"next_cursor": "next_cursor"
}Returns Examples
{
"data": [
{
"occurred_at": "2019-12-27T18:11:19.117Z",
"seq": 0,
"type": "type",
"message": {
"id": "id",
"chat_id": "chat_id",
"created_at": "2019-12-27T18:11:19.117Z",
"direction": "inbound",
"parts": [
{
"body": "body",
"type": "text",
"preview_url": true
}
],
"status": "status",
"channel_message_id": "channel_message_id",
"failure": {
"code": "code",
"message": "message"
},
"from": "from"
}
}
],
"has_more": true,
"next_cursor": "next_cursor"
}