Skip to main content
Use the Messages API to send, edit, delete and pin messages. List a channel’s messages to read its history and to sync edits and deletions. You can also react with an emoji, list who reacted, and vote once on a poll. Each message shows its reaction and vote counts and whether you reacted or voted, but not who else voted.

Endpoints

Attributes

string
required
Message ID, prefixed post_. Matches the id sent on create, when one was sent.
object[]
required

Properties

string
required
The file’s ID, prefixed file_.
string | null
required
BlurHash placeholder for an image or video. Null when unavailable or removed by moderation.
string | null
required
The original file’s MIME type, for example application/pdf. It is kept when moderation removes the file.
string
required
When the file was created, as an ISO 8601 timestamp.
number | null
required
Audio or video duration in seconds. Null when unavailable or removed by moderation.
string | null
required
The original filename, including its extension.
integer | null
required
Image or video height in pixels. Null when unavailable or removed by moderation.
integer | null
The byte size each part (except the last) must be. Present only on create, and only for multipart uploads.
string | null
The ID of the multipart upload, passed back to complete. Present only on create, and only for multipart uploads.
object[] | null
The presigned URL for each part. Present only on create, and only for multipart uploads.

Properties

integer
required
The 1-based index of this part within the multipart upload.
string
required
The presigned URL to PUT this part’s bytes to.
string
required
The type of this object, always file.
boolean
required
Whether moderation removed the file. When true, url serves a replacement image. filename, size and content_type still describe the original file.
integer | null
required
The file size in bytes. null until the upload has finished.
object
Headers to send with the upload PUT. Present only on create.
string
required
Where the file is in its upload lifecycle.Available options: pending, processing, ready, failed
string | null
Presigned URL to PUT the file’s bytes to. Present only on create, and only for single-part uploads.
string | null
required
A URL to download the file. Public files get a permanent CDN URL, and private files get a signed URL that expires. null until the upload has finished. When moderation removes the file, a replacement image URL.
string
required
public files are served from an unsigned CDN URL. private files are served from a signed URL that expires.Available options: public, private
string | null
required
Audio waveform URL. Null when unavailable or removed by moderation.
integer | null
required
Image or video width in pixels. Null when unavailable or removed by moderation.
object | null
required

Properties

string
required
User ID, prefixed user_.
string | null
required
Display name.
object
required
Avatar wrapper. Its url is always present, and is a generated placeholder when the user set no picture.

Properties

string
required
Avatar image URL. Always present. It is a generated placeholder when the user set no picture.
string
required
Public username.
boolean
required
true if the author is a team member of the account that owns this community channel. false for partners, private and support channels, and deleted messages.
string | null
required
object | null
required
The automation that sent this message. null for a message no automation sent, a deleted message, or a caller without automation:read on the automation’s account.

Properties

string
required
Automation ID, prefixed ato_.
string
required
The automation’s name.
string
required
string | null
required
Markdown content. null for a deleted message.
string
required
Creation time as an ISO 8601 timestamp.
object | null
required

Properties

string | null
required
Webhook display name, or null to use the user’s name.
object | null
required
Webhook profile image, or null to use the user’s image.

Properties

string
required
The file’s ID, prefixed file_.
string | null
required
BlurHash placeholder for an image or video. Null when unavailable or removed by moderation.
string | null
required
The original file’s MIME type, for example application/pdf. It is kept when moderation removes the file.
string
required
When the file was created, as an ISO 8601 timestamp.
number | null
required
Audio or video duration in seconds. Null when unavailable or removed by moderation.
string | null
required
The original filename, including its extension.
integer | null
required
Image or video height in pixels. Null when unavailable or removed by moderation.
integer | null
The byte size each part (except the last) must be. Present only on create, and only for multipart uploads.
string | null
The ID of the multipart upload, passed back to complete. Present only on create, and only for multipart uploads.
object[] | null
The presigned URL for each part. Present only on create, and only for multipart uploads.

Properties

integer
required
The 1-based index of this part within the multipart upload.
string
required
The presigned URL to PUT this part’s bytes to.
string
required
The type of this object, always file.
boolean
required
Whether moderation removed the file. When true, url serves a replacement image. filename, size and content_type still describe the original file.
integer | null
required
The file size in bytes. null until the upload has finished.
object
Headers to send with the upload PUT. Present only on create.
string
required
Where the file is in its upload lifecycle.Available options: pending, processing, ready, failed
string | null
Presigned URL to PUT the file’s bytes to. Present only on create, and only for single-part uploads.
string | null
required
A URL to download the file. Public files get a permanent CDN URL, and private files get a signed URL that expires. null until the upload has finished. When moderation removes the file, a replacement image URL.
string
required
public files are served from an unsigned CDN URL. private files are served from a signed URL that expires.Available options: public, private
string | null
required
Audio waveform URL. Null when unavailable or removed by moderation.
integer | null
required
Image or video width in pixels. Null when unavailable or removed by moderation.
string | null
required
Deletion time, or null for a live message.
boolean
required
object[]
required

Properties

integer | null
required
string | null
required
object[]
required

Properties

boolean
required
string
required
string
required
Footer shown at the bottom of the embed. Null when the embed has no footer.

Properties

object | null
required
Small image shown beside the footer text. Null when the footer has no icon.

Properties

string | null
required
integer | null
required
string
required
integer | null
required
string
required
object | null
required

Properties

string | null
required
integer | null
required
string
required
integer | null
required
object | null
required

Properties

string | null
required
integer | null
required
string
required
integer | null
required
string | null
required
Time supplied by the embed author, as an ISO 8601 timestamp in UTC. Null when missing or invalid.
string | null
required
string | null
required
email_message | null
required
The message outside chat that this message was sent or received as. object says which kind it is, such as email_message. For an email, the first file in attachments named email.html holds the email’s HTML body. The email’s own attachments are also in attachments. null for a message that exists only in chat, or a deleted message.

Properties

string
required
The email’s ID, prefixed emsg_.
string | null
required
The address the email was sent from.
string
required
Always email_message.
string
required
The delivery status for this email.Available options: received, spam, virus, queued, sent, delivered, bounced, complained, failed, refused_unsubscribed, refused_rate_limited, refused_spam, delayed
string | null
required
The email’s subject.
string | null
required
The address of the recipient this message is for.
object[]
required
GIFs attached to the message. Empty for a deleted message.

Properties

integer
required
Height of original_url, in pixels.
string
required
Full-size GIF. HTTPS on a Klipy media host.
string
required
Smaller version for previews and placeholders. HTTPS on a Klipy media host.
string
required
Identifier for the GIF.
string
required
GIF title.
string
required
URL the message renders the GIF from. HTTPS on a Klipy media host.
integer
required
Width of original_url, in pixels.

Properties

string | null
required
Page description, or null while unavailable.
string | null
required
Site icon URL, or null when unavailable.
Additional preview information, or null when unavailable.

Properties

string | null
required
string
required
string
required
string | null
required
Preview image URL, or null when unavailable.
boolean
required
Whether the server is still generating this preview.
string | null
required
Page title, or null while unavailable.
string
required
URL being previewed.
string[]
required
string
required
Available options: regular, system, automated
boolean
required
string | null
required
Unformatted message text. null when the text is absent or the message is deleted
object | null
required

Properties

object[]
required

Properties

string
required
Option identifier within the poll.
string
required
integer
required
boolean
required
Whether you voted for this option.
object[]
required

Properties

string
required
Available options: like, view, emoji
boolean
required
Whether you reacted with this value.
integer
required
integer
required
string | null
required
The Unicode emoji for an emoji reaction. For other reaction kinds, the reaction’s value.
object | null
The replied-to message. Omitted unless include_replying_to_message=true. Includes all message fields except replying_to_message. null when this message is deleted or no same-channel target exists.
string | null
required
string | null
required
User ID of the replied-to message’s author, prefixed user_. null without a reply in this channel, or when either message is deleted.
string
required
Last message change as an ISO 8601 timestamp.
integer | null
required
Experience view count. null for DM-backed channels.
ChatMessage