API reference
Pins and sticky messages
Pinned messages, and the message stuck to the bottom of a channel.
Get Pinned Messages
/channels/{channel.id}/pinsPeople and botsThe pinned messages as a plain list, newest pin first (Discord's older form).
Permissions needed
READ_MESSAGE_HISTORYbit 65536- Read message history
Path parameters
channel.id- A snowflake id.
Response
200 a list of APIMessage
[
{
"id": "107441200000000100",
"channel_id": "107441200000000010",
"guild_id": "107441200000000001",
"author": {
"id": "107441200000000200",
"username": "josh",
"discriminator": "0",
"global_name": "Josh",
"avatar": "3f2a9c1e5b7d4a608c1e2f3a4b5c6d7e",
"banner": null,
"accent_color": null,
"bot": false,
"public_flags": 0
},
"content": "Hello, world",
"timestamp": "2026-10-22T10:00:00.000Z",
"edited_timestamp": null,
"tts": false,
"mention_everyone": false,
"mentions": [],
"mention_roles": [],
"attachments": [],
"embeds": [],
"pinned": false,
"flags": 0,
"type": 0
}
]
Errors
UNKNOWN_CHANNEL10003 · HTTP 404- The channel does not exist, or you are not in its server.
MISSING_ACCESS50001 · HTTP 403- You are in the server but cannot see the channel (VIEW_CHANNEL).
Discord
The same as Discord’s Get Pinned Messages (legacy).
Get Channel Pins
/channels/{channel.id}/messages/pinsPeople and botsThe pinned messages with when each was pinned, a page at a time (Discord's current form).
Permissions needed
READ_MESSAGE_HISTORYbit 65536- Read message history
Path parameters
channel.id- A snowflake id.
Query string
beforestring- Pins before this time (ISO 8601).
limitinteger · 1 to 50 · default 50- 1 to 50 (the most a channel can hold).
Response
{
"items": [
{
"pinned_at": "2026-10-22T10:30:00.000Z",
"message": {
"id": "107441200000000100",
"channel_id": "107441200000000010",
"guild_id": "107441200000000001",
"author": {
"id": "107441200000000200",
"username": "josh",
"discriminator": "0",
"global_name": "Josh",
"avatar": "3f2a9c1e5b7d4a608c1e2f3a4b5c6d7e",
"banner": null,
"accent_color": null,
"bot": false,
"public_flags": 0
},
"content": "Hello, world",
"timestamp": "2026-10-22T10:00:00.000Z",
"edited_timestamp": null,
"tts": false,
"mention_everyone": false,
"mentions": [],
"mention_roles": [],
"attachments": [],
"embeds": [],
"pinned": false,
"flags": 0,
"type": 0
}
}
],
"has_more": false
}
Errors
UNKNOWN_CHANNEL10003 · HTTP 404- The channel does not exist, or you are not in its server.
MISSING_ACCESS50001 · HTTP 403- You are in the server but cannot see the channel (VIEW_CHANNEL).
Discord
The same as Discord’s Get Channel Pins.
Pin Message
/channels/{channel.id}/messages/pins/{message.id}People and botsPin a message. A channel holds 50 pins.
Permissions needed
PIN_MESSAGESbit 2251799813685248- Pin messages
Path parameters
channel.id- A snowflake id.
message.id- A snowflake id.
Response
204 no body
Errors
UNKNOWN_CHANNEL10003 · HTTP 404- The channel does not exist, or you are not in its server.
MISSING_ACCESS50001 · HTTP 403- You are in the server but cannot see the channel (VIEW_CHANNEL).
MISSING_PERMISSIONS50013 · HTTP 403- You lack a permission the route needs.
UNKNOWN_MESSAGE10008 · HTTP 404- There is no such message in that channel.
MAX_PINS30003 · HTTP 400- The channel already has 50 pins.
CANNOT_EXECUTE_ON_SYSTEM_MESSAGE50021 · HTTP 400- The message is a system message.
Rate limits
pinPerUserChannelbucket 8adcfd72- 10 per 10 seconds, counted per user. See Rate limits.
Gateway events it causes
Discord
The same as Discord’s Pin Message.
Unpin Message
/channels/{channel.id}/messages/pins/{message.id}People and botsUnpin a message.
Permissions needed
PIN_MESSAGESbit 2251799813685248- Pin messages
Path parameters
channel.id- A snowflake id.
message.id- A snowflake id.
Response
204 no body
Errors
UNKNOWN_CHANNEL10003 · HTTP 404- The channel does not exist, or you are not in its server.
MISSING_ACCESS50001 · HTTP 403- You are in the server but cannot see the channel (VIEW_CHANNEL).
MISSING_PERMISSIONS50013 · HTTP 403- You lack a permission the route needs.
UNKNOWN_MESSAGE10008 · HTTP 404- There is no such message in that channel.
Rate limits
pinPerUserChannelbucket 8adcfd72- 10 per 10 seconds, counted per user. See Rate limits.
Gateway events it causes
Discord
The same as Discord’s Unpin Message.
Get Sticky Message
/channels/{channel.id}/stickyPeople and botstether onlyThe message pinned to the bottom of the channel, or {message: null}.
Anyone who can see the channel sees it, even without Read Message History.
Path parameters
channel.id- A snowflake id.
Response
200 APIStickyMessage
{
"message": {
"id": "107441200000000100",
"channel_id": "107441200000000010",
"guild_id": "107441200000000001",
"author": {
"id": "107441200000000200",
"username": "josh",
"discriminator": "0",
"global_name": "Josh",
"avatar": "3f2a9c1e5b7d4a608c1e2f3a4b5c6d7e",
"banner": null,
"accent_color": null,
"bot": false,
"public_flags": 0
},
"content": "Hello, world",
"timestamp": "2026-10-22T10:00:00.000Z",
"edited_timestamp": null,
"tts": false,
"mention_everyone": false,
"mentions": [],
"mention_roles": [],
"attachments": [],
"embeds": [],
"pinned": false,
"flags": 0,
"type": 0
}
}
Errors
UNKNOWN_CHANNEL10003 · HTTP 404- The channel does not exist, or you are not in its server.
MISSING_ACCESS50001 · HTTP 403- You are in the server but cannot see the channel (VIEW_CHANNEL).
Discord
Only on tether: Discord has no such route.
Set Sticky Message
/channels/{channel.id}/sticky/{message.id}People and botstether onlyMake a message the channel's sticky message.
Permissions needed
MANAGE_MESSAGESbit 8192- Delete others’ messages
Path parameters
channel.id- A snowflake id.
message.id- A snowflake id.
Response
204 no body
Errors
UNKNOWN_CHANNEL10003 · HTTP 404- The channel does not exist, or you are not in its server.
MISSING_ACCESS50001 · HTTP 403- You are in the server but cannot see the channel (VIEW_CHANNEL).
MISSING_PERMISSIONS50013 · HTTP 403- You lack a permission the route needs.
UNKNOWN_MESSAGE10008 · HTTP 404- There is no such message in that channel.
Rate limits
pinPerUserChannelbucket 8adcfd72- 10 per 10 seconds, counted per user. See Rate limits.
Gateway events it causes
Discord
Only on tether: Discord has no such route.
Clear Sticky Message
/channels/{channel.id}/sticky/{message.id}People and botstether onlyStop a message being the sticky message.
Permissions needed
MANAGE_MESSAGESbit 8192- Delete others’ messages
Path parameters
channel.id- A snowflake id.
message.id- A snowflake id.
Response
204 no body
Errors
UNKNOWN_CHANNEL10003 · HTTP 404- The channel does not exist, or you are not in its server.
MISSING_ACCESS50001 · HTTP 403- You are in the server but cannot see the channel (VIEW_CHANNEL).
MISSING_PERMISSIONS50013 · HTTP 403- You lack a permission the route needs.
Rate limits
pinPerUserChannelbucket 8adcfd72- 10 per 10 seconds, counted per user. See Rate limits.
Gateway events it causes
Discord
Only on tether: Discord has no such route.