v2

latestOpenAPI 3.0.0AGPLv32026-07-26125148364.7 KB
Messaging

Send Message

Sends a message to the given channel.

post/channels/{target}/messages

Path parameters

targetstring required

Headers

Idempotency-Keystring

Unique key to prevent duplicate requests

Request body

noncestring nullable

Unique token to prevent duplicate message sending

This is deprecated and replaced by Idempotency-Key!

contentstring nullable

Message content to send

attachmentsstring[] nullable

Attachments to include in message

Response

_idstring required

Unique Id

noncestring nullable

Unique value generated by client sending this message

channelstring required

Id of the channel this message was sent in

authorstring required

Id of the user or webhook that sent this message

contentstring nullable

Message content

editedstring date-time

ISO8601 formatted timestamp

mentionsstring[] nullable

Array of user ids mentioned in this message

role_mentionsstring[] nullable

Array of role ids mentioned in this message

repliesstring[] nullable

Array of message ids this message is replying to

reactionsobject

Hashmap of emoji IDs to array of user IDs

pinnedboolean nullable

Whether or not the message in pinned

Example response

{
  "member": {
    "joined_at": "1970-01-01T00:00:00Z",
    "timeout": "1970-01-01T00:00:00Z"
  },
  "system": {
    "finished_at": "1970-01-01T00:00:00Z"
  },
  "edited": "1970-01-01T00:00:00Z"
}