Hanzo AI
OpenapiProvider

List messages

Reads recent messages from a named Slack channel such as #hanzo-gtm. The bot must be a member and have the relevant history scope.

GET /v1/provider/slack/messages

Addresshttps://api.hanzo.ai/v1/provider/slack/messages
MethodGET
Operationget_provider_slack_messages
AuthAuthorization: Bearer $HANZO_API_KEY

Reads recent messages from a named Slack channel such as #hanzo-gtm. The bot must be a member and have the relevant history scope. Set thread_ts to fetch a parent's replies, and cursor to continue a page. Channel history is newest first; thread replies are oldest first.

Request

6 fields.

FieldInTypeRequiredDescription
channelquerystringChannel is a Slack channel ID, name (#hanzo-gtm), or Slack channel mention.
limitqueryintegerLimit bounds the page to 1-100 messages; zero defaults to 15.
cursorquerystringCursor continues the previous page's next_cursor.
thread_tsquerystringThreadTS reads a thread via conversations.replies.
oldestquerystringOldest filters to messages after this Slack timestamp (exclusive).
latestquerystringLatest filters to messages before this Slack timestamp (exclusive).

Response

StatusBodyMeaning
200provider.slackMessagesOutok
defaultproblem-detailsrefused

200 body — 18 fields.

FieldInTypeAlwaysDescription
channelbodystringChannel is the resolved channel ID, reusable for further reads and replies.
has_morebodybooleanHasMore indicates that Slack has additional messages beyond this page.
messagesbodyprovider.slackMessage[]Messages is one page, newest first for history and oldest first for threads.
messages[].bot_idbodystringBotID identifies a bot author when present.
messages[].filesbodyprovider.slackFile[]Files are the files attached to this message.
messages[].files[].idbodystringID is the file's Slack ID and the handle the file read takes.
messages[].files[].mimetypebodystringMimetype is the type Slack recorded at upload.
messages[].files[].namebodystringName is the filename as uploaded.
messages[].files[].permalinkbodystringPermalink opens the file in Slack, for a person.
messages[].files[].sizebodyinteger (int64)Size is the file's length in bytes.
messages[].files[].titlebodystringTitle is the title Slack displays, which may differ from the filename.
messages[].reply_countbodyinteger (int64)ReplyCount indicates whether a parent has replies to fetch separately.
messages[].subtypebodystringSubtype distinguishes messages from channel events.
messages[].textbodystringText is the message in Slack's formatting.
messages[].thread_tsbodystringThreadTS is the parent timestamp for a threaded message.
messages[].tsbodystringTS is Slack's exact message timestamp and ID; retain it as a string.
messages[].userbodystringUser is the author's Slack user ID.
next_cursorbodystringNextCursor continues this query; never assume one page is the whole history.

Failure carries the platform error shape — see Errors.

Examples

hanzo provider slack messages get

Provider API · All Hanzo APIs · Interactive reference

How is this guide?

On this page