# Discord

> Discord alert channels through a channel webhook - where to get the URL, what it accepts and what the message looks like.

A Discord channel posts alerts to one Discord channel through its webhook.

1. In Discord, open the channel's settings, then **Integrations → Webhooks**, create a webhook and copy its URL. It looks like `https://discord.com/api/webhooks/123456789012345678/AbC…`.
2. On the project's **Alerts** page, choose **Add channel** → **Discord** and paste the URL.
3. **Send test** to see a message arrive.

The URL must be `https://discord.com/api/webhooks/<id>/<token>` (or the same on `discordapp.com`), without a port. A `?thread_id=…` query is kept, so alerts can go to a thread. The URL is stored encrypted; the dashboard and the API show only the host afterwards.

## The message

- The same text as on other channels, at most 2000 characters, ending with an **Acknowledge** link on DOWN and escalation messages.
- Markdown in check names is escaped, and the message mentions no one: `@everyone` or a role in a name does not ping anybody.

## When Discord refuses

When Discord answers 401, 403, 404 or 410 (the webhook was deleted or its token is wrong), or redirects, the channel is **Not delivering** at once. Create a new webhook and add it as a new channel. When Discord answers 429, delivery waits as long as Discord asks.

Everything else (what is sent, retries, order) works as for the [other channels](https://docs.monitorly.cloud/alerts.md).
