v8

OpenAPI 3.1.02026-08-033623795.0 MB
Messages

Create message

Send a new message in an experience chat, DM, or group chat channel. Supports text content, attachments, polls, and replies.

Required permissions:

  • chat:message:create
post/messages

Request body

auto_detect_linksboolean nullable

Automatically detect URLs in the message and generate link previews.

channel_idstring required

The unique identifier of the channel or experience to send the message in. For example, 'exp_xxxxx' or 'feed_xxxxx'.

contentstring required

The body of the message in Markdown format. For example, 'Hello world'.

replying_to_message_idstring nullable

The unique identifier of the message this is replying to, creating a threaded reply.

Response

A successful response

contentstring nullable required

The message content formatted as Markdown. Null if the message has no text content.

created_atstring date-time required

The timestamp when this message was originally created.

idstring required

Represents a unique identifier that is Base64 obfuscated. It is often used to refetch an object or as key for a cache. The ID type appears in a JSON response as a String; however, it is not intended to be human-readable. When expected as an input type, any string (such as "VXNlci0xMA==") or integer (such as 4) input value will be accepted as an ID.

is_editedboolean required

Whether the message content has been edited after it was originally sent.

is_pinnedboolean required

Whether this message is pinned to the top of the channel for easy access.

mentionsstring[] required

A list of user IDs that are explicitly mentioned in this message.

mentions_everyoneboolean required

Whether the message includes an @everyone mention that notifies all channel members.

message_type'regular' | 'system' | 'automated' required

The types of post

replying_to_message_idstring nullable required

The unique identifier of the message this post is replying to. Null if this is not a reply.

updated_atstring date-time required

The timestamp when this message was last modified.

view_countinteger nullable required

The number of unique views this message has received. Null if view tracking is not enabled for this channel.

Example response

{
  "content": "Hey, are you available for a **quick call**?",
  "created_at": "2023-12-01T05:00:00.401Z",
  "poll_votes": [
    {
      "count": 42
    }
  ],
  "reaction_counts": [
    {
      "count": 42
    }
  ],
  "updated_at": "2023-12-01T05:00:00.401Z",
  "user": {
    "id": "user_xxxxxxxxxxxxx",
    "name": "John Doe",
    "username": "johndoe42"
  },
  "view_count": 42
}