Channels
Messages

List messages in a channel

Retrieves a paginated list of messages from a channel. User must have permission to view the channel. Supports pagination via limit, before, after, and around parameters. Returns messages in reverse chronological order (newest first).

get/channels/{channel_id}/messages

Path parameters

string snowflake required
OR
integer required

The ID of the channel

Query parameters

limitstring

Number of messages to return (1-100, default 50)

Number of messages to return (1-100, default 50)

string snowflake
OR
integer

Get messages before this message ID

string snowflake
OR
integer

Get messages after this message ID

string snowflake
OR
integer

Get messages around this message ID

Response

Success

idstring snowflake required
channel_idstring snowflake required
webhook_idstring snowflake
type0 | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 19 required

The type of message

flagsinteger required

The bitwise flags of the original message

contentstring required

The text content of the message

timestampstring date-time required

The ISO 8601 timestamp of when the message was created

edited_timestampstring date-time nullable

The ISO 8601 timestamp of when the message was last edited

pinnedboolean required

Whether the message is pinned

mention_everyoneboolean required

Whether the message mentions @everyone

ttsboolean required

Whether the message was sent as text-to-speech

mention_rolesstring[] required

The role IDs mentioned in the message

noncestring nullable

A client-provided value for message deduplication

Changes