Search Messages

Searches messages for an organization using bidirectional cursor pagination (oldest first).

This endpoint behaves like GET /v1/messages/list, but accepts a richer set of message filters. Messages are sorted by inserted_at ascending, with id as a tiebreaker.

Pagination

  • First page: omit cursor (or use direction=forward, the default).
  • Next page (newer messages): use metadata.next_cursor with direction=forward.
  • Previous page (older messages): use metadata.prev_cursor with direction=backward.
  • direction=backward without cursor: returns 422.
  • offset: not supported.

Cursors are opaque, base64-encoded tokens that decode to {"inserted_at": "<ISO8601>", "id": "<uuid>"}. Repeat the same filter parameters in the request body on every request; they are not encoded in the cursor.

Filters

In addition to the basic list filters (conversation_id, contact_id, sequence_id, campaign_id, user_id, channel_id, integration_id, type, delivery_status, after, before), search supports:

  • body — partial, case-insensitive match on the message body (max 1000 characters).
  • translated_body — partial, case-insensitive match on the translated message body (max 1000 characters).
  • source_type — one or more message directions (INBOUND, OUTBOUND, NOTE).
  • mode — one or more message modes.
  • language — one or more message languages.
  • translation_language — one or more translation languages.
Recent Requests
Log in to see full request history
TimeStatusUser Agent
Retrieving recent requests…
LoadingLoading…
Body Params

Search Messages Params

Request body for searching and filtering messages with cursor pagination.

date-time

ISO 8601 datetime; messages inserted at or after this time.

date-time

ISO 8601 datetime; messages inserted at or before this time.

string
length ≤ 1000

Partial, case-insensitive match on the message body. Max 1000 characters.

string

Filter by campaign ID.

string

Filter by channel ID.

string

Filter by contact ID.

string

Filter by conversation ID.

string

Opaque cursor from a previous response (metadata.next_cursor or metadata.prev_cursor).

delivery_status
array of strings

Filter by one or more delivery statuses.

delivery_status
string
enum

Pagination direction. forward (default) fetches the next page toward newer messages. backward fetches the previous page toward older messages.

Allowed:
string

Filter by integration ID.

language
array of strings

Filter by one or more message languages (ISO 639 codes, e.g. en, fil, zh-CN).

language
integer

Number of results to return (max 500).

mode
array of strings

Filter by one or more message modes.

mode
Allowed:
string

Filter by sequence ID.

source_type
array of strings

Filter by one or more message directions.

source_type
Allowed:
string
length ≤ 1000

Partial, case-insensitive match on the translated message body. Max 1000 characters.

translation_language
array of strings

Filter by one or more translation languages (ISO 639 codes, e.g. en, fil, zh-CN).

translation_language
type
array of strings

Filter by one or more message types.

type
string

Filter by user ID.

Responses

Callback
Language
Credentials
LoadingLoading…
Response
Click Try It! to start a request and see the response here! Or choose an example:
application/json