POST /chat.postMessage

Sends a message to a channel.

Servers

Request headers

Name Type Required Description
Content-Type String Yes The media type of the request body.

Default value: "application/x-www-form-urlencoded"

token String Yes

Authentication token. Requires scope: chat:write

Request body fields

Name Type Required Description
username String No

Set your bot's user name. Must be used in conjunction with as_user set to false, otherwise ignored. See authorship below.

as_user String No

Pass true to post the message as the authed user, instead of as a bot. Defaults to false. See authorship below.

thread_ts String No

Provide another message's ts value to make this message a reply. Avoid using a reply's ts value; use its parent instead.

unfurl_media Boolean No

Pass false to disable unfurling of media content.

icon_emoji String No

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.

parse String No

Change how messages are treated. Defaults to none. See below.

mrkdwn Boolean No

Disable Slack markup parsing by setting to false. Enabled by default.

channel String Yes

Channel, private group, or IM channel to send message to. Can be an encoded ID, or a name. See below for more details.

reply_broadcast Boolean No

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 String No

How this field works and whether it is required depends on other fields you use in your API call. See below for more detail.

unfurl_links Boolean No

Pass true to enable unfurling of primarily text-based content.

attachments String No

A JSON-based array of structured attachments, presented as a URL-encoded string.

icon_url String No

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 Boolean No

Find and link channel names and usernames.

blocks String No

A JSON-based array of structured blocks, presented as a URL-encoded string.

How to start integrating

  1. Add HTTP Task to your workflow definition.
  2. Search for the API you want to integrate with and click on the name.
    • This loads the API reference documentation and prepares the Http request settings.
  3. Click Test request to test run your request to the API and see the API's response.