Many response objects from the Slack API include properties repeated across several other responses. Let’s look at some of these properties and the details of the objects they contain.
Note: Depending on the endpoint we call, the response may or may not include several of the fields discussed for each object.
Messages
Many responses include a message
property containing the details of a specific message posted to a conversation. Some of the more important properties of the message
object are discussed in the table below:
Property | Type | Description |
| string | The type of message that was posted. |
| string | The subtype of the message, indicating whether it was a "me" message, within a thread, etc. |
| string | The message text that is displayed within notifications. |
| string | The ID of the user that posted the message. |
| string | The ID of the bot that posted the message. |
| string | The ID of the application that posted the message. |
| string | The timestamp of the posted message. |
| string | The timestamp of the posted message if it was posted within a thread. |
| object | An object containing the ID of the user that edited the message and the timestamp of when the message was edited. |
| array[object] | An array of message blocks. |
| array[object] | An array of attachments to the message, if any. |
| array[object] | An array of all reactions added to the message, including the reaction name and the users that added the reaction. |
Channels
A channel
field is often included in responses dealing with conversation management. Here are the details of some of the more important properties of the channel
object:
Property | Type | Description |
| string | The unique ID of the conversation. |
| string | The name of the conversation. |
| boolean | Indicates whether the conversation is a public channel. |
| boolean | Indicates whether the conversation is a private group chat. |
| boolean | Indicates whether the conversation is a multiparty group message. |
| boolean | Indicates whether the conversation is a private message. |
| boolean | Indicates whether the conversation is private. |
| string | The Unix timestamp of when the conversation was created. |
| string | The ID of the user that created the conversation. |
| object | The details of the conversation topic, including the value of the topic, when it was set, and the user that set the topic. |
| object | The details of the conversation purpose, including the value of the purpose, when it was set, and the user that set the purpose. |
| array[string] | A list of the conversation's previous names. |
Files
The file
field is included in responses dealing with file management. Some of the more important properties of the file
object are discussed in the table below:
Property | Type | Description |
| string | The unique ID of the file. |
| number | The timestamp of when the file was created. |
| string | The full name of the file, including the file extension. |
| string | The title of the file. |
| string | The file type. |
| string | The ID of the user who created the file. |
| number | The file size in bytes. |
| boolean | Indicates whether the file is an external/remote file. |
| boolean | Indicates whether the file is shared publicly. |
| string | The preview that is shown when the file is shared within a conversation. |
Users
The member
field is included in responses dealing with user management. Some of the more important properties of the member
object are discussed in the table below:
Property | Type | Description |
| string | The unique ID of the user. |
| string | The user's full name. |
| boolean | Indicates whether the user has been deleted. |
| string | The user's timezone. |
| object | The user's profile, including social media links, contact information, name details, and status. |
| boolean | Indicates whether the user has administrator permissions. |
| boolean | Indicates whether the user is the owner of the workspace. |
| boolean | Indicates whether the user is a bot. |