messages_pin
messages_pin
Section titled “messages_pin”Category: messages
Pin a message in a channel.
When to use
Section titled “When to use”- Highlight a community announcement / FAQ in the channel.
When NOT to use
Section titled “When NOT to use”- Channel already has 50 pins (Discord limit) — call returns 400.
| Field | Type | Required | Description |
|---|---|---|---|
channel_id | string | yes | Channel containing the message |
message_id | string | yes | Message to pin |
audit_reason | string | no | Reason recorded in audit log (X-Audit-Log-Reason header) |
Returns
Section titled “Returns”\{pinned, channel_id, message_id\}.
Output schema
Section titled “Output schema”| Field | Type | Required | Description |
|---|---|---|---|
pinned | boolean | yes | |
channel_id | string | yes | Discord channel ID (snowflake) |
message_id | string | yes | Discord message ID |
Annotations
Section titled “Annotations”| Property | Value |
|---|---|
| Read-only | no |
| Destructive | no |
| Idempotent | yes |
| Open-world | yes |
| Confirmation required | no |