Skip to main content

Search chat messages

POST 

/chat.search

Full-text search over the caller's accessible messages. Returns full-fidelity messages — text, items, voice, polls, blocks, and mentions — hydrated through the same pipeline as /chat.history.

All fields are optional. With no parameters, the most recent messages across all chat types (DMs, multi-DMs, group chats) are returned in reverse chronological order.

Sort: When omitted and query is empty, results are sorted chronologically (newest first), since relevance scoring is meaningless without search terms. Pass sort: recent to force chronological order even with a text query.

Date filters: before and after accept YYYY-MM-DD. Dates are interpreted in the caller's timezone (see Timezone handling).

Access: Organization and Personal.

  • Personal tokens search chats the owner can read, including public groups in their roam they have not joined.
  • Organization tokens search chats the bot is a member of, plus unjoined public groups in the bot's roam (Slack search:read.public). Private groups the bot is not in are excluded. /chat.history stays membership-only.

Required scope: chat:history

Every returned sender includes userId plus userType. The ID resolves through user.info with the same credentials.


OpenAPI Spec: chat-v1.json

Request

Responses

Search results.