Reference: Message payloads

There are a few ways for apps to send, retrieve, and modify Slack messages, and if you're a beginner with that, you should read our managing messages overview.

To learn how to compose the messages that you want to send, read our composition guide.

All of the Slack APIs that publish messages use a common base structure, called a message payload. This is a JSON object that is used to define metadata about the message, such as where it should be published, as well as its visual composition.

This is a list of the fields available in that common structure, but you should also consult the reference docs for any messaging APIs you are using to see if there are any additional fields required by those methods. For example, if you're using the Web API to send messages, you'll also need to specify the channel where the message should be published.

Field Type Required? Description
text String Yes The usage of this field changes depending on whether you're using blocks or not. If you are, this is used as a fallback string to display in notifications. If you aren't, this is the main body text of the message. It can be formatted as plain text, or with mrkdwn. This field is not enforced as required when using blocks, however it is highly recommended that you include it as the aforementioned fallback.
blocks Array No An array of layout blocks in the same format as described in the building blocks guide.
attachments Array No An array of legacy secondary attachments. We recommend you use blocks instead.
thread_ts String No The ID of another un-threaded message to reply to.
mrkdwn Boolean No Determines whether the text field is rendered according to mrkdwn formatting or not. Defaults to true.