Sends a message to a channel.
| |
|---|
| Surface | web-api |
| Rate limit | 60/min (special) |
| Argument | Required | Type | |
|---|
as_user | no | string | Pass true to post the message as the authed user, instead of as a bot. Defaults to false. See authorship below. |
attachments | no | string | A JSON-based array of structured attachments, presented as a URL-encoded string. |
blocks | no | string | A JSON-based array of structured blocks, presented as a URL-encoded string. |
channel | yes | string | Channel, private group, or IM channel to send message to. Can be an encoded ID, or a name. See below for more details. |
icon_emoji | no | string | Emoji to use as the icon for this message. Overrides icon_url. Must be used in conjunction with as_user set to false, otherwise ignored. See authorship below. |
icon_url | no | string | URL to an image to use as the icon for this message. Must be used in conjunction with as_user set to false, otherwise ignored. See authorship below. |
link_names | no | boolean | Find and link channel names and usernames. |
mrkdwn | no | boolean | Disable Slack markup parsing by setting to false. Enabled by default. |
parse | no | string | Change how messages are treated. Defaults to none. See below. |
reply_broadcast | no | boolean | Used in conjunction with thread_ts and indicates whether reply should be made visible to everyone in the channel or conversation. Defaults to false. |
text | no | string | How this field works and whether it is required depends on other fields you use in your API call. See below for more detail. |
thread_ts | no | string | Provide another message’s ts value to make this message a reply. Avoid using a reply’s ts value; use its parent instead. |
unfurl_links | no | boolean | Pass true to enable unfurling of primarily text-based content. |
unfurl_media | no | boolean | Pass false to disable unfurling of media content. |
username | no | string | Set your bot’s user name. Must be used in conjunction with as_user set to false, otherwise ignored. See authorship below. |
ok is always present (true, or false with error). Additional fields:
| Field | Type | |
|---|
channel | object | |
message | object | |
ts | object | |
Works with every official Slack SDK — call it exactly as you would against Slack.
| |
|---|
| Source spec | Slack Web API OpenAPI v1.7.0 (apis.guru OAS3 conversion of slackapi/slack-api-specs, upstream archived 2024-03) |
| Retrieved / verified | 2026-06-04 · patches applied: 0 |
| In frozen spec | yes — fields below are copied from the published spec |
| Conformance | exercised by unmodified official SDKs on every release |
| See also | Slack’s chat.postMessage reference |