Channels
Messages

Edit a message

Updates an existing message. Only the message author can edit messages (or admins with proper permissions). Supports updating content, embeds, and attachments. Returns the updated message object. Maintains original message ID and timestamps.

patch/channels/{channel_id}/messages/{message_id}

Path parameters

channel_idstring snowflake required

The ID of the channel

message_idstring snowflake required

The ID of the message

Request body

contentstring

The message content. Non-premium users can send up to 2000 characters; premium users, bots, and webhooks can send up to 4000 characters.

flagsinteger

Message flags bitfield

Response

Success

idstring required

The unique identifier (snowflake) for this message

channel_idstring required

The ID of the channel this message was sent in

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

The type of message

flagsinteger required

Message flags bitfield

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

nsfw_emojisSnowflakeType[]

IDs of custom emojis in this message that are classified as NSFW

noncestring nullable

A client-provided value for message deduplication

Changes

No recorded changes to this endpoint across all 1 revision of this API.