Skip to main content
GET
Search Messages

Authorizations

Authorization
string
header
required

An account-scoped user token or a user OAuth token. Prepend the key or token with Bearer, for example Bearer ***************************. See Auth & API keys for how to get each one.

Scopes

chat:read
dms:read

Headers

Api-Version-Date
string

Pins the request to a dated API version.

Example:

"2026-12-01"

Query Parameters

kind
enum<string>[]

Channel kinds to search. Required unless channel_id or experience_id identifies the kind. private includes direct messages and groups. community includes chats.

Available options:
private,
community
query
string

Text to search for. Omit to filter accessible messages.

account_id
string

Account ID, prefixed biz_. Limits chat messages and direct messages to this account.

experience_id
string

Experience ID, prefixed exp_. Limits messages to this experience and excludes direct messages.

channel_id
string

Channel ID. Search messages in this channel only.

author_user_id
string

User ID of the message author, prefixed user_.

mentioned_user_ids
string[]

Return messages that mention any of these user IDs.

content_types
enum<string>[]

Return messages with any of these attachment or content types.

Available options:
image,
video,
audio,
file,
poll,
link,
embed
pinned
boolean

Filter messages by whether they are pinned.

message_type
enum<string>

Message type to search. System messages are excluded from search.

Available options:
regular,
system,
automated
created_after
string

Return messages created after this ISO 8601 timestamp.

created_before
string

Return messages created before this ISO 8601 timestamp.

order
enum<string>
default:created_at

How to sort messages.

Available options:
created_at
direction
enum<string>
default:desc

Sort direction.

Available options:
asc,
desc
first
integer
default:20

Number of results to return from the start of the range.

Required range: x <= 100
after
string

Return results after this cursor. Use page_info.end_cursor from the previous response to fetch the next page.

Response

Matching messages

data
object[]
required
page_info
object
required