Lists messages for an organization using bidirectional cursor pagination (oldest first).
Messages are sorted by inserted_at ascending, with id as a tiebreaker.
Pagination
- First page: omit
cursor(or usedirection=forward, the default). - Next page (newer messages): use
metadata.next_cursorwithdirection=forward. - Previous page (older messages): use
metadata.prev_cursorwithdirection=backward. direction=backwardwithoutcursor: returns 422.offset: not supported.
Cursors are opaque, base64-encoded tokens. Each cursor references a page boundary row:
next_cursor is the last row on the page; prev_cursor is the first row.
Both directions use exclusive boundaries, so rows are not duplicated across pages.
The cursor decodes to {"inserted_at": "<ISO8601>", "id": "<uuid>"}.
Invalid or unusable cursors
- A malformed cursor — not valid base64, not JSON, or missing/extra keys
(it must have exactlyinserted_atandid) — returns a
422 Unprocessable Contentwith{"description": "Invalid cursor format"}. - A well-formed but stale cursor still works: it's a page boundary, not a
row lookup, so it paginates from that position withcursor_reset: false. - A well-formed but unusable cursor (correct keys but a value that can't
be a position, e.g. anidthat isn't a UUID) resets to the first page
and returnscursor_reset: true— it does not error.
Repeat the same filter query parameters on every request; they are not encoded in the cursor.
Filters
Optional query filters: conversation_id, contact_id, sequence_id, campaign_id,
user_id, channel_id, integration_id, type, delivery_status, after, before.
| Time | Status | User Agent | |
|---|---|---|---|
Retrieving recent requests… | |||
