paginated_search_messages
Search conversation messages by text, apply filters, and page through results with a cursor; activity messages are excluded and only accessible conversations are returned.
Instructions
Paginated Search Messages
Matches messages whose text contains the query, with filters and cursor pagination. Activity messages are excluded. Returns only messages in conversations the caller can access. Requires the messages:read permission.
GET /api/v1/search/messages
Tags: Search
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| sort | No | Sort by message creation time. Defaults to `newest`. (query parameter) | newest |
| query | Yes | Search query (minimum 3 characters) (query parameter) | |
| cursor | No | `next_cursor` from the previous page. A cursor works only with the `sort` it was created with. (query parameter) | |
| filters | No | JSON-encoded filter. Either an array of conditions that are AND-ed, e.g. `[{"model":"conversations","field":"status_id","operator":"equals","value":"1"}]`, or a group `{"logic":"AND","rules":[...]}` with at most one level of nested groups. Operators: `equals`, `not equals`, `greater than`, `less than`, `set`, `not set`, `in`, `between`, `contains`, `ilike`, `not contains`. Filterable fields: `conversations` (status_id, priority_id, assigned_team_id, assigned_user_id, inbox_id, last_message_at, last_interaction_at, last_interaction_sender, created_at, waiting_since, next_sla_deadline_at, snoozed_until, sla_policy_id, tags), `conversation_statuses` (id, name), `users` (email, external_user_id), `inboxes` (channel). Messages can also be filtered on `conversation_messages` (created_at). (query parameter) | |
| page_size | No | Number of results per page (defaults to 30). Values above 100 use 100. (query parameter) |