Skip to main content

Message Resource

Messages represent user-generated content in channels, including text, embeds, attachments, and reactions.

Message Object

Structure

id
Snowflake
required
Unique message identifier
channel_id
Snowflake
required
Channel where the message was sent
author
User object
User who sent the message (may be null for webhooks)
author_id
Snowflake | null
ID of the message author
content
string | null
Message text content (max 4000 characters)
timestamp
ISO8601 timestamp
required
When the message was sent
edited_timestamp
ISO8601 timestamp | null
When the message was last edited
type
integer
required
Message type (see Message Types)
flags
integer
default:"0"
Message flags bitfield (see Message Flags)
mention_everyone
boolean
default:"false"
Whether @everyone or @here was mentioned
mentions
array of User objects
Users mentioned in the message
mention_roles
array of Snowflakes
Roles mentioned in the message
mention_channels
array of Snowflakes
Channels mentioned in the message
attachments
array of Attachment objects
Attached files (see Attachments)
embeds
array of Embed objects
Embedded content (see Embeds)
reactions
array of Reaction objects
Reactions added to the message
pinned
boolean
default:"false"
Whether the message is pinned
webhook_id
Snowflake | null
Webhook ID if sent by a webhook
webhook_name
string | null
Webhook display name
webhook_avatar_hash
string | null
Webhook avatar hash
message_reference
object | null
Reference to replied message (see Message Reference)
sticker_items
array of objects
Stickers attached to the message
version
integer
required
Version for optimistic concurrency control

Example Message

{
  "id": "555666777888999000",
  "channel_id": "444555666777888999",
  "author": {
    "id": "123456789012345678",
    "username": "fluxeruser",
    "discriminator": 1234,
    "avatar_hash": "a1b2c3d4e5f6"
  },
  "author_id": "123456789012345678",
  "content": "Hello, @fluxerfriend! Check out this cool feature.",
  "timestamp": "2026-03-04T12:00:00.000Z",
  "edited_timestamp": null,
  "type": 0,
  "flags": 0,
  "mention_everyone": false,
  "mentions": [
    {
      "id": "234567890123456789",
      "username": "fluxerfriend"
    }
  ],
  "mention_roles": [],
  "mention_channels": [],
  "attachments": [],
  "embeds": [],
  "reactions": [],
  "pinned": false,
  "version": 1
}

Message Types

Message Flags

Attachments

Attachments represent uploaded files.

Structure

id
Snowflake
required
Attachment identifier
filename
string
required
Original filename
size
integer
required
File size in bytes
url
string
required
CDN URL for the file
proxy_url
string
required
Proxied URL for the file
title
string | null
Custom attachment title
description
string | null
Custom attachment description
content_type
string
required
MIME type of the file
width
integer | null
Image/video width in pixels
height
integer | null
Image/video height in pixels
duration
number | null
Audio/video duration in seconds
waveform
string | null
Base64 encoded waveform data for audio
flags
integer
default:"0"
Attachment flags (see Attachment Flags)

Attachment Flags

Embeds

Embeds are rich content blocks with structured information.

Structure

type
string | null
Embed type: rich, image, video, article, etc.
title
string | null
Embed title (max 256 characters)
description
string | null
Embed description (max 4096 characters)
url
string | null
URL of the embed
timestamp
ISO8601 timestamp | null
Timestamp displayed in the footer
color
integer | null
RGB color code
Footer information with text and icon_url
image
object | null
Image with url, width, and height
thumbnail
object | null
Thumbnail with url, width, and height
video
object | null
Video with url, width, and height
provider
object | null
Provider with name and url
author
object | null
Author with name, url, and icon_url
fields
array of objects
Field objects with name, value, and inline

Example Embed

{
  "type": "rich",
  "title": "Embed Title",
  "description": "This is the embed description",
  "url": "https://fluxer.chat",
  "color": 5793266,
  "timestamp": "2026-03-04T12:00:00.000Z",
  "footer": {
    "text": "Footer text",
    "icon_url": "https://cdn.fluxer.chat/icons/icon.png"
  },
  "author": {
    "name": "Author Name",
    "url": "https://fluxer.chat",
    "icon_url": "https://cdn.fluxer.chat/avatars/avatar.png"
  },
  "fields": [
    {
      "name": "Field 1",
      "value": "Value 1",
      "inline": true
    },
    {
      "name": "Field 2",
      "value": "Value 2",
      "inline": true
    }
  ]
}

Message Reference

Message references are used for replies and forwards.
message_id
Snowflake
ID of the referenced message
channel_id
Snowflake
ID of the channel containing the message
guild_id
Snowflake | null
ID of the guild (null for DMs)
type
integer
default:"0"
Reference type: 0 (reply), 1 (forward)

Endpoints

Send Message

POST /api/v1/channels/{channel_id}/messages
Send a message to a channel.
content
string
Message content (max 4000 characters)
embeds
array
Array of embed objects (max 10)
message_reference
object
Message reference for replies
sticker_ids
array
Array of sticker IDs to send (max 3)
flags
integer
Message flags

Get Message

GET /api/v1/channels/{channel_id}/messages/{message_id}
Retrieve a specific message.

Edit Message

PATCH /api/v1/channels/{channel_id}/messages/{message_id}
Edit a message. Can only edit your own messages.
content
string
New message content
embeds
array
New embed array
flags
integer
New message flags

Delete Message

DELETE /api/v1/channels/{channel_id}/messages/{message_id}
Delete a message. Requires MANAGE_MESSAGES permission or message ownership.

Add Reaction

PUT /api/v1/channels/{channel_id}/messages/{message_id}/reactions/{emoji}/@me
Add a reaction to a message.

Remove Reaction

DELETE /api/v1/channels/{channel_id}/messages/{message_id}/reactions/{emoji}/@me
Remove your reaction from a message.

Get Reactions

GET /api/v1/channels/{channel_id}/messages/{message_id}/reactions/{emoji}
Get users who reacted with a specific emoji.

Build docs developers (and LLMs) love