Messages

Message Fields

Field Type Description
channel_id string Primary identifier for the channel this message is a part of. This will be an integer, but it is always expressed as a string to avoid limitations with the way JavaScript integers are expressed. This id space is unique to Channel objects.
counts object
Field Type Description
replies integer The number of messages created in reply to this message.
created_at string The time at which the message was created in ISO 8601 format; YYYY-MM-DDTHH:MM:SSZ.
deleted_by string The ID of the user that deleted the message.

Only set if message was deleted by someone else; messages can be deleted in a channel by anyone who has full access to the channel.

id string Primary identifier for a message. This will be an integer, but it is always expressed as a string to avoid limitations with the way JavaScript integers are expressed. This id space is unique to Message objects. There can be a Post and Message with the same ID; no relation is implied.
is_deleted boolean Whether message is deleted. content will not be included if true.

Only set if true.

is_sticky boolean Whether a full-access user has stickied the message.
source object
Field Type Description
name string Description of the API consumer that created this message.
id string The public client id of the API consumer that created this message.
url string Link provided by the API consumer that created this message.
reply_to string ID of the message this message is replying to.

Only set if message is a reply.

thread_id string The ID of the message at the root of the thread that this message is a part of. If thread_id==id then this property does not guarantee that the thread has > 1 message.
user object This is an embedded User object.

In certain cases (e.g., when a user account has been deleted), this may be omitted.

user_id string Primary identifier for the user who created the message.

Only set if the user above is omitted.

content object

Not set if the message has been deleted.

Field Type Description
text string User supplied text of the message. All Unicode characters allowed. Maximum length 2048 characters. The maximum length can be retrieved from the Configuration endpoint.
html string Server-generated annotated HTML rendering of message text.
entities object Rich text information for this message. See Entities.
raw object The raw items attached to this object.

Only set if query parameter specified.

Field Type Description
{type name} list of objects A list of objects of this type.

General Message Parameters

Any endpoint that returns message objects can be subject to these parameters.

General Parameters

Name Type Description Default
include_deleted integer (0 or 1) Include deleted messages. true
include_html integer (0 or 1) Should the message and user html field be included alongside the text field in the response objects? true
include_message_html integer (0 or 1) Should the message html field be included alongside the text field in the response objects? true. Note that include_html takes priority if present.
include_raw integer (0 or 1) Include raw on all objects. false
include_message_raw integer (0 or 1) Include raw on all message objects. false
include_client integer (0 or 1) Include the client object with the post. true