A Discord webhook is a URL you create under Channel Settings > Integrations > Webhooks. It accepts a JSON POST and posts the content as a message in that channel.
You need the Manage Webhooks permission on the channel, and the menu path matches Discord's current client as of 4 December 2026.
Discord webhook creation and first message
What a Discord webhook is and is not
All you can do with it is send. The URL is post-only: it carries no API key and no bot token, and it can't read the channel, listen for reactions or act as a user.
The flow below, built in Activepieces, shows what that rules out. Its trigger is a New Message step with a Connection field, a Limit and a Channel, and that Connection is a bot's login, which a webhook never has.

If a connector like that is missing, Activepieces lets you generate it with AI and add it privately to your own instance, with no vendor release to wait for.
That's how 751 integrations, roughly 60% of them community-contributed, are counted straight from the open source monorepo, meaning most of the platform's integrations are built and maintained by community volunteers.
The final Send Message to Discord step is the only part a webhook could do on its own.
Until you need a bot, the URL is enough. Everything before that last step is the reason you'd eventually move to one.
- Open the channel's settings with the gear icon beside its name.
- Choose Integrations, then Webhooks.
- Select New Webhook.
- Give it a name and confirm the channel it posts to. That name and the avatar are what members see on each message.
- Select Copy Webhook URL.
If Webhooks is missing from the Integrations screen, your role lacks Manage Webhooks, so ask a server admin for it. Copying the URL is the last step because the URL is the whole credential.

Send the first message with curl
Put the URL in an environment variable so it stays out of your shell history and your scripts:
export WEBHOOK_URL="paste the copied URL here"
curl -H "Content-Type: application/json" \
-d '{"content": "Hello from a webhook"}' \
"$WEBHOOK_URL"
When the send works, Discord replies with an empty 204 response by default, and the message appears in the channel under the webhook's name.
Add ?wait=true to the URL and it returns the created message as JSON instead, which helps if you need the message ID.
If nothing shows up, check that the body is valid JSON and that content isn't empty.
Treat the URL as a secret
Anyone who holds the URL can post to that channel as your webhook, because Discord embeds the ID and token in it. Discord doesn't ask them for anything else.
Keep the URL out of Git repositories, front-end code and shared screenshots. If it leaks, go back to Integrations > Webhooks, delete it and create a new one. The old URL stops working immediately, and your senders need the new one.
This takes minutes, not a project: automate it in Activepieces free.
Discord webhook payload fields, embeds and message limits
Once you have the new URL, every message is a single JSON body posted to it, and eight fields decide what shows up in the channel.
The table below lists each field, whether it goes in the body or the query string, and the limit Discord documents.
Read it as a checklist: if a send fails with a 400, one of these is usually the cause.
| Field | Body or query | What it does | Documented limit |
|---|---|---|---|
| content | body | Plain message text | 2000 characters |
| username | body | Overrides the webhook's name for this message | String |
| avatar_url | body | Overrides the avatar for this message | Image URL |
| embeds | body | Array of rich cards | 10 per message, title 256 characters |
| allowed_mentions | body | Controls which pings fire | Object with parse, roles, users |
| flags | body | Message flags | Suppress-embeds and suppress-notifications only |
| thread_id | query | Posts into an existing thread | Thread ID |
| wait | query | Returns the created message instead of an empty response | true or false |
That's the whole vocabulary, so the next step is a real body.
{
"username": "Deploy bot",
"content": "Build finished",
"embeds": [{
"title": "api-server #412",
"description": "All 38 checks passed.",
"color": 5763719,
"footer": { "text": "main, 3 minutes ago" }
}]
}
Send that with Content-Type: application/json. You get 204 with no body, because wait defaults to false.
Discord webhook embed field and character limits
A long log line breaks one field and not another, because embed text fields have separate caps. Per the Discord Webhooks Guide, a description takes 4096 characters and footer text 2048.
1024 characters is the cap on a field value, and 256 on an author name. So put the long text in the description and keep field values to short facts.
Attachments are capped separately, by the server's boost level. 20mb.net.net lists 20 MB per file by default, 50 MB at boost level 2 and 100 MB at level 3, so non-boosted servers are effectively capped at 20 MB per file.
Check the target server before you attach anything: a default server rejects a build artifact that fits in a boosted one. Discord lists no charge for webhooks.
Edit, delete and thread Discord webhook messages
To post into a thread, append ?thread_id= and the thread's ID to the webhook URL. To edit or delete later, you need the message ID, which only comes back if you sent with ?wait=true.
Then send a PATCH or DELETE to the webhook URL plus /messages/ and that ID. Skip wait=true and you have no handle on the message afterwards.
Discord webhook rate limits and production errors
Skip wait=true and you get no message ID; post too fast and you get a 429 instead. So your code has to read the rate-limit headers on every response.
In a burst of six messages in one second, Discord rejects the sixth instead of delaying it, because it allows 5 requests per 2 seconds per webhook, which works out to 2.5 per second.
Discord also enforces a global cap of 50 requests per second across everything one source sends, so spreading a flood over many webhooks doesn't get you around it.
Discord's per-webhook rate sits between the other two, and its global ceiling is far higher than any of them.
Per the Discord Webhooks Guide, Slack's incoming webhook allows 1 request per second, so a port from Slack to Discord more than doubles your headroom.
Microsoft Teams allows 4 per second, so a port from Teams to Discord cuts it by more than a third and needs a queue you may not have had before.
How fast each chat webhook lets you post, in requests per second.
Those numbers set the budget for everything that follows: you're designing for bursts of a few messages, not streams.
Discord webhook 429 errors and retry_after
Four headers come back on every response: X-RateLimit-Limit, X-RateLimit-Remaining, X-RateLimit-Reset-After and X-RateLimit-Bucket. Watch X-RateLimit-Remaining: when it hits 0, the next request will fail, so wait X-RateLimit-Reset-After seconds before sending it. This is the cheap way to never see a 429 at all.
When you do get one, the status is 429. The JSON body has message, retry_after (in seconds, and it can be a decimal such as 0.65) and global (true or false).
If global is true you hit the 50-per-second ceiling and Discord blocks every webhook on that source, so pausing one URL won't help; pause the whole sender.
Sleep for retry_after, then resend. Hammering again before that time passes only extends the penalty.
These three never succeed on retry, so retrying them just burns your rate budget.
| Status | Cause | How you see it | Fix |
|---|---|---|---|
| 400 | Bad payload: empty content, an embed over its size limits, malformed JSON |
Response body names the offending field | Correct the payload |
| 401 | Token portion of the URL is wrong | 401 Unauthorized on every call |
Copy the URL again from the channel's Integrations settings |
| 404 | Webhook was deleted or the ID is wrong | 404 Unknown Webhook |
Create a new webhook and replace the URL |
| 429 | Rate limit hit | retry_after in the body |
Wait, then resend |
| 5xx | Discord-side failure | 500, 502, 503 | Retry with backoff |
When a URL that worked yesterday returns a 401 or 404, someone has usually deleted the webhook. Alert a human, because no code can recover it.
Put messages in a queue and let one worker send them, so the rate limit lives in one place instead of in every caller. The retry pattern for that worker:
- Send the request.
- On 2xx, read
X-RateLimit-Remaining; if it is 0, sleep forX-RateLimit-Reset-After. - On 429, sleep for
retry_afterand resend the same message. - On 5xx, wait 1 second, then 2, then 4, and give up after about four tries, so you'll be delayed roughly 7 seconds before receiving an error.
- On 400, 401 or 404, drop the message to a dead-letter log and alert.
Batch where you can: one message accepts up to 10 embeds, so ten small updates can be one request instead of ten.
You can follow the rest of this with the builder open. Start free, no card.
Discord webhook or bot: choosing the right route
Once you have packed ten updates into a single request, the question's whether you ever need Discord to talk back. A webhook posts into one channel and nothing else.
If you don't need a reply, a webhook is enough; if you do, you need a bot or an interactions endpoint.
Nobody gets a call when a member joins, a message is posted, or a reaction is added, because webhooks don't send server activity events.
The table below sets the three routes against the six things that decide the choice. Read down the "reads messages" and "receives events" columns first: a webhook has a "no" in both, and that's the line where you stop being able to use one.
| Reads messages | Receives events | Buttons and commands | Hosting needed | Auth | Rate-limit scope | |
|---|---|---|---|---|---|---|
| Incoming webhook | No | No | No | None | Secret in the URL | Per webhook |
| Bot token with Gateway | Yes | Yes, over a persistent connection | Yes | A process that stays running | Bot token | Per route, plus global limits on the bot |
| Interactions endpoint | No | Only interactions, delivered as HTTP requests | Yes | A public HTTPS endpoint | Request signature checked with your app's public key | Per route for follow-up calls |
Which row you land on depends on what the user has to do, so the next three subsections go through them in that order.
Webhook: post-only and stateless
Open the channel's Integrations settings, create a webhook, and copy the URL. That URL is the whole credential: anyone who holds it can post to that channel, and there's nothing to scope down.

Treat it like a password and keep it out of public repos and shared screenshots.
Because a webhook holds no state, there's nothing to host. Your script, automation or agent sends a POST and forgets. The cost is that it never learns what happened afterwards. It can't see replies, and a person can't click anything it posts.
Discord bot token for reading and moderating
To read anything, a bot logs in with its token and opens a Gateway connection, which is how Discord pushes events to it. That connection's what lets it read messages, see reactions, notice new members and moderate.
It's also why you need a process that stays up: if it's down, it misses events.
For buttons and slash commands, an interactions endpoint is the lighter option. Discord sends an HTTP request to your URL when someone uses one, and you verify its signature before answering.
You get the clickable part without a long-lived connection, but you still don't see ordinary messages.
Stay on the webhook while the job is "post this text here." Move to an interactions endpoint the moment an approver needs a button, because a message that asks a question and has no way to answer will just get ignored.

Move to a bot with Gateway only when you must read channel messages or react to server activity.
Send Discord messages from other apps with Activepieces
With 751 integrations to trigger from, Activepieces lets you post to a Discord channel from nearly any app you already run, with no bot and no code, so your team can automate without waiting for engineering.

When the sender's your own code, a plain curl command or script is the better tool. The workflow below shows how little it takes.
Build the workflow: trigger, then Discord action
Choose a trigger for your Discord message
Start with the trigger. A flow can start from a trigger in another app, so pick the app you care about and use its trigger. Flows are unlimited on every plan, including free, so each source app can have its own.

Either way, the first step is what starts the run, and everything after it can use the data that step received.
Add the Discord action
The second step is the Discord integration's action for sending a message to a channel through a webhook. Paste the Discord webhook URL into its connection or URL field, then fill in the message.
This is where I'd stop and ask whether anyone will read it. Don't drop the whole payload in. Map two or three fields from the trigger, such as what happened, who did it, and a link back, and put them in a single sentence.

A channel full of raw JSON gets muted by the end of the week.
If the integration asks for a username or avatar, fill those in. They set how the post appears in the channel, which is the only thing a webhook can customize about its sender.
Test and publish your Discord webhook workflow
The screenshot below shows the shape of a finished flow on the builder canvas: three steps, with the last one selected, putting the final step in focus.
Its right panel lists the fields that step needs, including the message, and a "Generate Sample Data" section with a Test Step button.
Once the flow is built, run it and check the message in your Discord channel before you rely on it. If the text reads badly, change the mapping and test again before you publish.
Once live, a run costs 1 credit however many steps it has, and the free plan includes 1,000 credits a month.
Once the test message lands the way you want, publish the flow. From then on, each event that reaches the trigger produces one post.
Fallback: HTTP step to the webhook URL
If the Discord integration lacks a field you need, such as an embed layout, use an HTTP step instead. A webhook URL accepts a plain POST, so the step needs only three settings:
- Set the method to POST and paste the webhook URL as the URL.
- Add a
Content-Typeheader with the valueapplication/json. - In the body, send JSON with a
contentfield holding your message text, mapped from the trigger's data.
Run Test Step the same way. A message in the channel means it works. An error from Discord usually means the URL was copied incompletely or the body isn't valid JSON.
If the sender's your own code, skip all of this. One curl command or a few lines in a script does the same POST with fewer moving parts, and nothing sits between your code and the channel.
Frequently asked questions
Can a Discord webhook receive messages from users?
No. A webhook URL only accepts a POST and has no way to listen, so it can't see what anyone types in the channel, who reacts, or who joins.
If your flow needs to answer a user, read a slash command, or react to an event, that's the point where you move to a bot.
If you only need to push alerts, reports or build notices into the channel, the webhook stays the right tool.
Do Discord webhooks expire or cost anything?
Webhooks are free and have no expiry date. The URL keeps working until someone deletes the webhook, or the channel or server it belongs to is deleted. You won't get a renewal prompt, so a webhook created two years ago and forgotten is still live.
Open Server Settings, then Integrations, then Webhooks, and look at what's still listed there.
How do I stop someone abusing a leaked webhook URL?
Delete the webhook and create a new one. The token inside the URL's the only credential, so anyone holding the link can post as that webhook. You can't restrict it by IP address or by sender.
In Channel Settings, under Integrations, open the webhook, delete it, make a fresh one and update wherever the old URL was stored. The old link stops working immediately.
To make the next leak less likely, keep the URL in an environment variable or your automation tool's secret store, not in a repository or a shared document. Give each service its own webhook, so you can revoke one without breaking the others.
The damage is spam and impersonation, since a leaked webhook can post and can edit or delete its own messages, but it can't read the channel. Still, a channel full of fake alerts is enough to make people ignore the real ones.
Can one webhook post to several channels?
No. A webhook is created inside one channel and posts only there. You can aim it at a thread in that channel by adding the thread_id query parameter to the URL, but it can't reach a different channel.
For several channels, create one webhook per channel and call each URL in turn from your script or flow.
Name each webhook after its channel and purpose in the Name field, so the list under Integrations stays readable and you know which one to delete when something goes wrong.
Related reading
Build it
Set this up in minutes.
No code required. Connect your accounts, and Activepieces runs it from there.
Start free Talk to sales


