webhooks_execute
webhooks_execute
Section titled “webhooks_execute”Category: webhooks
Execute (send a message through) a webhook. Low-level escape hatch.
When to use
Section titled “When to use”- You need a webhook-only feature (no bot user) and already hold the token.
When NOT to use
Section titled “When NOT to use”| Field | Type | Required | Description |
|---|---|---|---|
webhook_id | string | yes | Webhook id |
token | string | yes | Webhook secret — treat as credential, do not log |
content | string | no | Message text (max 2000 chars) |
username | string | no | Override the webhook display name for this message |
avatar_url | string | no | Override the webhook avatar URL for this message |
tts | boolean | no | |
embeds | array | no | Legacy embeds (V1 layout). For V2 layouts use components_v2_send. |
allowed_mentions | object | no | |
components | array | no | V1 action rows OR raw V2 component tree. Prefer components_v2_send for V2 layouts; this is the low-level escape hatch. |
attachments | array | no | |
payload_json | string | no | |
flags | integer | no | Message flags bitfield. V2 layout = 1<<15 = 32768 (IS_COMPONENTS_V2). |
thread_id | string | no | Post into this thread (forum/text-thread channels) |
thread_name | string | no | When the parent is a forum, name the new thread |
applied_tags | array | no | Forum tag ids to apply when creating a thread |
poll | object | no | |
with_components | boolean | no | Query param: include components in the response message |
wait | boolean | no | Query param: wait for the message to be created and return it |
Returns
Section titled “Returns”When wait:true, \{message_id, channel_id, webhook_id\}. Otherwise \{enqueued:true\}.
Output schema
Section titled “Output schema”| Field | Type | Required | Description |
|---|---|---|---|
enqueued | boolean | no | |
message_id | string | no | Discord message ID |
channel_id | string | no | Discord channel ID (snowflake) |
webhook_id | string | no | Discord webhook ID |
Annotations
Section titled “Annotations”| Property | Value |
|---|---|
| Read-only | no |
| Destructive | no |
| Idempotent | no |
| Open-world | yes |
| Confirmation required | no |