Skip to main content
POST
Search Ticket Messages

Authentication and permissions

Token requirements: User-based token (OAuth) or Organization-scoped API key or Workspace-scoped API key. Send a bearer access token for one of these identities. The permissions and resource restrictions below also apply.
Permissions joined by + are all required; or separates alternatives. Full-access keys still cannot call endpoints marked unsupported. Workspace keys must allow every workspace checked by the request. OAuth access depends on the user’s roles and resource access.
  • Search specified workspaces: Supply team_ids. Every requested workspace must be allowed. Internal notes require permission to view internal notes on the owning workspace.
  • Search the organization: Omitting team_ids searches the organization and requires an organization-scoped key. A signed-in user instead searches only the workspaces they belong to where they can view tickets. Internal notes require permission to view internal notes on the owning workspace.

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Body

application/json
teamIds
string[]

Optional. Filter to messages on tickets in these workspaces. The caller must be able to view tickets on every listed workspace, or the whole request is denied, so do not pass every workspace from List Workspaces. If not provided, a signed-in user searches the workspaces they belong to and can view tickets on; an API key with organization-wide ticket access searches every workspace. List explicitly any workspace you can view only through an organization role, and the allowed workspaces of a workspace-restricted API key.

ticketIds
string[]

Optional. Only return messages on any of these tickets. This is the batch alternative to calling List Ticket Messages per ticket.

authorUserIds
string[]

Optional. Only return messages authored by any of these users. Assistant and system messages have no author user and never match.

authorRoles
enum<string>[]

Optional. Filter by author roles. Returns messages matching ANY of the specified roles (e.g. USER_ROLE for human messages, INTERNAL_NOTE_ROLE for internal notes).

Available options:
USER_ROLE,
ASSISTANT_ROLE,
SYSTEM_INFO_ROLE,
INTERNAL_NOTE_ROLE
createdAfter
string<date-time> | null

A timestamp in RFC 3339 format (e.g., "2025-01-15T01:30:15Z").

Example:

"2025-01-15T01:30:15.000Z"

createdBefore
string<date-time> | null

A timestamp in RFC 3339 format (e.g., "2025-01-15T01:30:15Z").

Example:

"2025-01-15T01:30:15.000Z"

pageSize
integer<int32> | null

Maximum number of results to return. Default is 100, maximum is 1000.

pageToken
string | null

Token for pagination. Leave empty for the first request.

Response

200 - application/json

Success

data
Message · object[]
nextPageToken
string | null

Token for retrieving the next page of results. Empty if no more results.