Input

548 chars

Output

0 chars

Discord Webhooks Are JSON, But Not Quite Like Other Webhooks

Discord webhooks are outbound — your code POSTs JSON to a Discord URL, and Discord renders it as a message in a channel. Unlike Stripe or GitHub webhooks (which Discord receives), here you're crafting the payload. The schema is well-defined but easy to get wrong: a single misplaced field silently breaks the embed without any error response. This page is pre-loaded with a typical embed-with-fields payload so you can see the canonical shape. Adjust it, copy the formatted output, and POST to your Discord webhook URL.

The Three Layers of a Discord Webhook Payload

  • Top-level message fieldscontent (plain text, max 2000 chars), username (overrides the webhook's default name per-message), avatar_url, tts (text-to-speech), and allowed_mentions (which mentions actually ping users).
  • embeds[] — Up to 10 embed objects per message, with strict character limits (title 256, description 4096, total embed payload 6000). Each embed has title, description, color (decimal RGB), fields[] (max 25), author, footer, timestamp, thumbnail, image, url.
  • components[] — Interactive elements (buttons, select menus). Webhooks can include components, but only if the webhook is owned by your application — generic webhooks reject component arrays.

The "color" Trap

The color field on an embed must be a decimal integer, not a hex string. A common mistake: passing "#5865F2" or 0x5865F2 as a string. Discord ignores the field. Convert hex to decimal: 0x5865F2 = 5793266, 0x57F287 = 5763719 (Discord green), 0xED4245 = 15548997 (Discord red). Most languages have a built-in for this — in JavaScript, parseInt("5865F2", 16).

Common Discord Webhook Bugs

"My @everyone mention isn't pinging anyone." By default, Discord webhooks suppress @everyone and @here pings. To enable, set "allowed_mentions": {"parse": ["everyone"]}. Use sparingly — channel members can mute the webhook if it's noisy.

"My embed timestamp is showing as 'just now' even for old events." The timestamp field must be ISO 8601 (e.g., 2026-04-25T12:00:00.000Z). Unix timestamps don't work — Discord falls back to the message creation time.

"My fields aren't lining up." inline: true arranges fields in columns, but Discord auto-wraps to a new row every 3 inline fields on desktop and every 2 on mobile. Mix inline and non-inline strategically.

"I'm hitting rate limits." Discord webhooks: 5 requests per 2 seconds per webhook URL. For higher throughput, batch updates into a single message with multiple embeds (max 10).

Related Tools

Common Use Cases

Related Articles