# Bot API reference

> Every route of Klang’s bot API and every event of its gateway, with the fields Klang sends, real examples, the errors and the rate limits. How requests and answers work across the whole API.

## How to use this reference

These pages describe what Klang’s bot API does today, route by route and event by event. Each
example is a real answer from a Klang server, shortened in places: long lists keep one or two
items. The IDs in them are real Klang IDs, in the form bots see them.

- [Users and the app](https://docs.klang.gg/bots/reference/users/): the gateway’s address, the bot itself, other
  people, its app, its servers and direct messages.
- [Servers](https://docs.klang.gg/bots/reference/guilds/): a server, its channels, roles and members.
- [Channels](https://docs.klang.gg/bots/reference/channels/): one channel, thread or direct message.
- [Messages](https://docs.klang.gg/bots/reference/messages/): reading, sending, editing and deleting messages,
  reactions and “is typing”.
- [Moderation](https://docs.klang.gg/bots/reference/moderation/): kicking, banning, timeouts, nicknames, roles and
  bulk deletes.
- [Managing a server](https://docs.klang.gg/bots/reference/management/): channels, their permission overwrites,
  roles, invites and the audit log.
- [Threads](https://docs.klang.gg/bots/reference/threads/): starting, changing and deleting threads, following them,
  and the active and archived ones.
- [Pins, polls, emojis, stickers and AutoMod](https://docs.klang.gg/bots/reference/server-content/): pinning
  messages, polls and their votes, a server’s emojis and stickers, and its AutoMod rules.
- [Webhooks](https://docs.klang.gg/bots/reference/webhooks/): creating, listing, changing, moving and deleting a
  server’s webhooks.
- [Commands](https://docs.klang.gg/bots/reference/commands/): registering, editing and deleting slash, user and
  message commands, and reading who can use them.
- [Interactions](https://docs.klang.gg/bots/reference/interactions/): answering an interaction (a message, an update
  of a component’s message, a modal), follow-ups, and editing and deleting the answers.
- [Components](https://docs.klang.gg/bots/reference/components/): buttons, select menus, layout components and the
  fields of a modal, with their limits.
- [Objects](https://docs.klang.gg/bots/reference/objects/): every object those routes and events return, field by
  field.
- [Gateway events](https://docs.klang.gg/bots/reference/gateway-events/): opcodes, the first frames and every event
  Klang dispatches.
- [Errors](https://docs.klang.gg/bots/reference/errors/): the error body and every code Klang sends.

For the routes and events Klang doesn’t have yet, see the
[compatibility table](https://docs.klang.gg/bots/compatibility/). The two pages list the same routes; if you find
they disagree, tell us at [hi@klang.gg](mailto:hi@klang.gg).

## Base URL and versions

```text
https://api.klang.gg/api/v10
```

`/api/v9` answers the same routes in the same way, for libraries that still ask for it. Any
other version, or a path outside the bot API, answers `404`.

## Authentication

Every route except `GET /gateway`, the webhook routes and the answers to an interaction needs the
bot’s token in the `Authorization` header, after the word `Bot` and a space:

```bash
curl https://api.klang.gg/api/v10/users/@me \
  -H "Authorization: Bot $KLANG_BOT_TOKEN"
```

A missing, malformed, reset or suspended token answers `401` with `code` `0`. So do a `Bearer`
token and the cookie of a Klang session: the bot API only takes bot tokens, and a bot token
doesn’t open the API the Klang app uses.

## Requests

- **Bodies are JSON**, sent with `Content-Type: application/json`. The routes that take files
  also take `multipart/form-data`, with the JSON in `payload_json` (see
  [Sending files](https://docs.klang.gg/bots/files/)). A body that isn’t valid JSON answers
  `50109`. An empty body counts as no body, whatever its `Content-Type`.
- **IDs travel as strings.** Klang also reads them as JSON numbers, keeping all 19 digits, because
  some libraries send them that way.
- **Both kinds of ID work.** Klang reads the IDs bots get and the unshifted ones its own app shows
  (see [IDs](https://docs.klang.gg/bots/differences/#ids)), in paths, query strings and bodies.
- **Fields Klang doesn’t know are ignored**, so a body built for Discord’s API goes through. The
  route’s section says which known fields are accepted and do nothing.
- **Booleans in a query string** are the words `true` and `false`.
- **Bad input answers `50035`**, with an `errors` object that points at each field. See
  [Errors](https://docs.klang.gg/bots/reference/errors/).

## Responses

- **JSON, with `Content-Type: application/json`** exactly, without a `charset`. Routes that
  change something and have nothing to return answer `204` with an empty body.
- **Field names are snake_case** and IDs are strings, as in Discord’s API.
- **A field Klang has no data for is still there** when Discord’s API always sends it, with its
  empty value: `null`, `false`, `0`, `""` or `[]`. The tables in [Objects](https://docs.klang.gg/bots/reference/objects/)
  say which fields are always empty in Klang.
- **Optional fields are left out** when they don’t apply, such as `reactions` on a message nobody
  reacted to, or `bot` on a person.
- **Dates** are ISO 8601 strings in UTC, with milliseconds: `2026-11-15T02:25:15.115Z`.
- **Permissions** are decimal strings of Discord’s bits. See
  [Permissions](https://docs.klang.gg/bots/differences/#permissions).
- **Images** (avatars, icons, banners) are hashes. Libraries build their addresses on
  `https://media.klangcdn.com`: see [Images](https://docs.klang.gg/bots/libraries/#images).

## Routes

| Route                                                                                              | Page                                                                                                                   | Bucket                             |
| -------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------- | ---------------------------------- |
| `GET /gateway`                                                                                     | [Users and the app](https://docs.klang.gg/bots/reference/users/#gateway-address)                                                            | —                                  |
| `GET /gateway/bot`                                                                                 | [Users and the app](https://docs.klang.gg/bots/reference/users/#gateway-for-a-bot)                                                          | —                                  |
| `GET /users/@me`                                                                                   | [Users and the app](https://docs.klang.gg/bots/reference/users/#the-bots-user)                                                              | —                                  |
| `GET /users/{user.id}`                                                                             | [Users and the app](https://docs.klang.gg/bots/reference/users/#another-user)                                                               | `read-users`                       |
| `GET /applications/@me`, `GET /oauth2/applications/@me`                                            | [Users and the app](https://docs.klang.gg/bots/reference/users/#the-bots-app)                                                               | —                                  |
| `PATCH /applications/@me`                                                                          | [Users and the app](https://docs.klang.gg/bots/reference/users/#set-the-interactions-url)                                                   | `interactions-url-check`           |
| `GET /users/@me/guilds`                                                                            | [Users and the app](https://docs.klang.gg/bots/reference/users/#the-bots-servers)                                                           | `read-guild`                       |
| `DELETE /users/@me/guilds/{guild.id}`                                                              | [Users and the app](https://docs.klang.gg/bots/reference/users/#leave-a-server)                                                             | —                                  |
| `POST /users/@me/channels`                                                                         | [Users and the app](https://docs.klang.gg/bots/reference/users/#open-a-direct-message)                                                      | `dm-create`                        |
| `GET /guilds/{guild.id}`                                                                           | [Servers](https://docs.klang.gg/bots/reference/guilds/#a-server)                                                                            | `read-guild`                       |
| `GET /guilds/{guild.id}/channels`                                                                  | [Servers](https://docs.klang.gg/bots/reference/guilds/#its-channels)                                                                        | `read-guild`                       |
| `GET /guilds/{guild.id}/roles`                                                                     | [Servers](https://docs.klang.gg/bots/reference/guilds/#its-roles)                                                                           | `read-guild`                       |
| `GET /guilds/{guild.id}/members`                                                                   | [Servers](https://docs.klang.gg/bots/reference/guilds/#its-members)                                                                         | `read-members`                     |
| `GET /guilds/{guild.id}/members/{user.id}`                                                         | [Servers](https://docs.klang.gg/bots/reference/guilds/#one-member)                                                                          | `read-users`                       |
| `GET /channels/{channel.id}`                                                                       | [Channels](https://docs.klang.gg/bots/reference/channels/#a-channel)                                                                        | `read-message`                     |
| `GET /channels/{channel.id}/messages`                                                              | [Messages](https://docs.klang.gg/bots/reference/messages/#a-page-of-messages)                                                               | `read-messages`                    |
| `GET /channels/{channel.id}/messages/{message.id}`                                                 | [Messages](https://docs.klang.gg/bots/reference/messages/#one-message)                                                                      | `read-message`                     |
| `POST /channels/{channel.id}/messages`                                                             | [Messages](https://docs.klang.gg/bots/reference/messages/#send-a-message)                                                                   | `message`                          |
| `PATCH /channels/{channel.id}/messages/{message.id}`                                               | [Messages](https://docs.klang.gg/bots/reference/messages/#edit-a-message)                                                                   | `message-edit`                     |
| `DELETE /channels/{channel.id}/messages/{message.id}`                                              | [Messages](https://docs.klang.gg/bots/reference/messages/#delete-a-message)                                                                 | `message-edit`                     |
| `POST /channels/{channel.id}/typing`                                                               | [Messages](https://docs.klang.gg/bots/reference/messages/#is-typing)                                                                        | `typing`                           |
| `PUT /channels/{channel.id}/messages/{message.id}/reactions/{emoji}/@me`                           | [Messages](https://docs.klang.gg/bots/reference/messages/#add-a-reaction)                                                                   | `reaction`                         |
| `DELETE /channels/{channel.id}/messages/{message.id}/reactions/{emoji}/@me`                        | [Messages](https://docs.klang.gg/bots/reference/messages/#remove-a-reaction)                                                                | —                                  |
| `POST /channels/{channel.id}/messages/bulk-delete`                                                 | [Moderation](https://docs.klang.gg/bots/reference/moderation/#delete-messages-in-bulk)                                                      | `bulk-delete`                      |
| `DELETE /guilds/{guild.id}/members/{user.id}`                                                      | [Moderation](https://docs.klang.gg/bots/reference/moderation/#kick-someone)                                                                 | —                                  |
| `PATCH /guilds/{guild.id}/members/{user.id}`                                                       | [Moderation](https://docs.klang.gg/bots/reference/moderation/#change-a-member)                                                              | `nickname`, `timeout`              |
| `PATCH /guilds/{guild.id}/members/@me`                                                             | [Moderation](https://docs.klang.gg/bots/reference/moderation/#change-the-bots-nickname)                                                     | `nickname`                         |
| `PUT`, `DELETE /guilds/{guild.id}/members/{user.id}/roles/{role.id}`                               | [Moderation](https://docs.klang.gg/bots/reference/moderation/#give-or-take-a-role)                                                          | —                                  |
| `PUT`, `DELETE /guilds/{guild.id}/bans/{user.id}`                                                  | [Moderation](https://docs.klang.gg/bots/reference/moderation/#ban-someone)                                                                  | —                                  |
| `GET /guilds/{guild.id}/bans`, `GET /guilds/{guild.id}/bans/{user.id}`                             | [Moderation](https://docs.klang.gg/bots/reference/moderation/#the-bans)                                                                     | `read-bans`, `read-users`          |
| `POST /guilds/{guild.id}/channels`                                                                 | [Managing a server](https://docs.klang.gg/bots/reference/management/#create-a-channel)                                                      | `channel-create`                   |
| `PATCH /channels/{channel.id}`                                                                     | [Managing a server](https://docs.klang.gg/bots/reference/management/#change-a-channel), [Threads](https://docs.klang.gg/bots/reference/threads/#change-a-thread) | `manage-channels`, `thread-manage` |
| `DELETE /channels/{channel.id}`                                                                    | [Managing a server](https://docs.klang.gg/bots/reference/management/#delete-a-channel)                                                      | `manage-channels`, `thread-manage` |
| `PATCH /guilds/{guild.id}/channels`                                                                | [Managing a server](https://docs.klang.gg/bots/reference/management/#order-the-channels)                                                    | `manage-channels`                  |
| `PUT`, `DELETE /channels/{channel.id}/permissions/{overwrite.id}`                                  | [Managing a server](https://docs.klang.gg/bots/reference/management/#set-an-overwrite)                                                      | `manage-channels`                  |
| `POST /guilds/{guild.id}/roles`, `PATCH`, `DELETE …/roles/{role.id}`                               | [Managing a server](https://docs.klang.gg/bots/reference/management/#create-a-role)                                                         | `manage-roles`                     |
| `PATCH /guilds/{guild.id}/roles`                                                                   | [Managing a server](https://docs.klang.gg/bots/reference/management/#order-the-roles)                                                       | `manage-roles`                     |
| `POST /channels/{channel.id}/invites`                                                              | [Managing a server](https://docs.klang.gg/bots/reference/management/#create-an-invite)                                                      | `invite-create`                    |
| `GET /channels/{channel.id}/invites`, `GET /guilds/{guild.id}/invites`                             | [Managing a server](https://docs.klang.gg/bots/reference/management/#the-invites)                                                           | `read-invites`                     |
| `GET /invites/{invite.code}`                                                                       | [Managing a server](https://docs.klang.gg/bots/reference/management/#an-invite-by-its-code)                                                 | `invite-preview`                   |
| `DELETE /invites/{invite.code}`                                                                    | [Managing a server](https://docs.klang.gg/bots/reference/management/#revoke-an-invite)                                                      | —                                  |
| `GET /guilds/{guild.id}/audit-logs`                                                                | [Managing a server](https://docs.klang.gg/bots/reference/management/#the-audit-log)                                                         | `read-audit-log`                   |
| `POST /channels/{channel.id}/messages/{message.id}/threads`, `POST /channels/{channel.id}/threads` | [Threads](https://docs.klang.gg/bots/reference/threads/#start-a-thread-from-a-message)                                                      | `thread-create`                    |
| `PUT`, `DELETE /channels/{thread.id}/thread-members/@me`                                           | [Threads](https://docs.klang.gg/bots/reference/threads/#join-and-leave)                                                                     | `thread-manage`                    |
| `GET /channels/{thread.id}/thread-members`, `…/thread-members/{user.id}`                           | [Threads](https://docs.klang.gg/bots/reference/threads/#who-follows-a-thread)                                                               | `read-members`, `read-users`       |
| `GET /guilds/{guild.id}/threads/active`                                                            | [Threads](https://docs.klang.gg/bots/reference/threads/#active-threads)                                                                     | `read-guild`                       |
| `GET /channels/{channel.id}/threads/archived/public`                                               | [Threads](https://docs.klang.gg/bots/reference/threads/#archived-threads)                                                                   | `thread-list`                      |
| `GET /channels/{channel.id}/messages/pins`                                                         | [Pins, polls, emojis, stickers and AutoMod](https://docs.klang.gg/bots/reference/server-content/#list-the-pins)                             | `read-messages`                    |
| `PUT`, `DELETE /channels/{channel.id}/messages/pins/{message.id}`                                  | [Pins, polls, emojis, stickers and AutoMod](https://docs.klang.gg/bots/reference/server-content/#pin-and-unpin)                             | `message-edit`                     |
| `GET /channels/{channel.id}/polls/{message.id}/answers/{answer.id}`                                | [Pins, polls, emojis, stickers and AutoMod](https://docs.klang.gg/bots/reference/server-content/#who-voted)                                 | `poll-voters`                      |
| `POST /channels/{channel.id}/polls/{message.id}/expire`                                            | [Pins, polls, emojis, stickers and AutoMod](https://docs.klang.gg/bots/reference/server-content/#close-a-poll)                              | `message-edit`                     |
| `GET /guilds/{guild.id}/emojis`, `…/emojis/{emoji.id}`                                             | [Pins, polls, emojis, stickers and AutoMod](https://docs.klang.gg/bots/reference/server-content/#list-and-read-them)                        | `read-guild`                       |
| `POST /guilds/{guild.id}/emojis`, `PATCH`, `DELETE …/emojis/{emoji.id}`                            | [Pins, polls, emojis, stickers and AutoMod](https://docs.klang.gg/bots/reference/server-content/#create-an-emoji)                           | `emojis`                           |
| `GET /guilds/{guild.id}/stickers`, `…/stickers/{sticker.id}`                                       | [Pins, polls, emojis, stickers and AutoMod](https://docs.klang.gg/bots/reference/server-content/#stickers)                                  | `read-guild`                       |
| `POST /guilds/{guild.id}/stickers`, `PATCH`, `DELETE …/stickers/{sticker.id}`                      | [Pins, polls, emojis, stickers and AutoMod](https://docs.klang.gg/bots/reference/server-content/#create-a-sticker)                          | `stickers`                         |
| `GET /guilds/{guild.id}/auto-moderation/rules`, `…/rules/{rule.id}`                                | [Pins, polls, emojis, stickers and AutoMod](https://docs.klang.gg/bots/reference/server-content/#list-and-read-the-rules)                   | `read-guild`                       |
| `POST /guilds/{guild.id}/auto-moderation/rules`, `PATCH`, `DELETE …/rules/{rule.id}`               | [Pins, polls, emojis, stickers and AutoMod](https://docs.klang.gg/bots/reference/server-content/#create-change-and-delete-a-rule)           | `automod`                          |
| `GET /channels/{channel.id}/webhooks`, `GET /guilds/{guild.id}/webhooks`                           | [Webhooks](https://docs.klang.gg/bots/reference/webhooks/#list-webhooks)                                                                    | `read-webhooks`                    |
| `POST /channels/{channel.id}/webhooks`                                                             | [Webhooks](https://docs.klang.gg/bots/reference/webhooks/#create-a-webhook)                                                                 | `webhook-manage`                   |
| `GET /webhooks/{webhook.id}`                                                                       | [Webhooks](https://docs.klang.gg/bots/reference/webhooks/#get-a-webhook)                                                                    | `read-webhooks`                    |
| `PATCH`, `DELETE /webhooks/{webhook.id}`                                                           | [Webhooks](https://docs.klang.gg/bots/reference/webhooks/#change-a-webhook)                                                                 | `webhook-manage`                   |
| `GET /applications/{app.id}/commands`, and per server                                              | [Commands](https://docs.klang.gg/bots/reference/commands/#list-commands)                                                                    | `read-commands`                    |
| `POST /applications/{app.id}/commands`, and per server                                             | [Commands](https://docs.klang.gg/bots/reference/commands/#create-a-command)                                                                 | `commands-write`                   |
| `PUT /applications/{app.id}/commands`, and per server                                              | [Commands](https://docs.klang.gg/bots/reference/commands/#replace-all-commands)                                                             | `commands-write`                   |
| `GET /applications/{app.id}/commands/{command.id}`, and per server                                 | [Commands](https://docs.klang.gg/bots/reference/commands/#one-command)                                                                      | `read-commands`                    |
| `PATCH /applications/{app.id}/commands/{command.id}`, and per server                               | [Commands](https://docs.klang.gg/bots/reference/commands/#edit-a-command)                                                                   | `commands-write`                   |
| `DELETE /applications/{app.id}/commands/{command.id}`, and per server                              | [Commands](https://docs.klang.gg/bots/reference/commands/#delete-a-command)                                                                 | `commands-write`                   |
| `GET /applications/{app.id}/guilds/{guild.id}/commands/permissions`, and of one command            | [Commands](https://docs.klang.gg/bots/reference/commands/#command-permissions)                                                              | `read-commands`                    |
| `POST /interactions/{interaction.id}/{interaction.token}/callback`                                 | [Interactions](https://docs.klang.gg/bots/reference/interactions/#answer-an-interaction)                                                    | None                               |
| `POST /webhooks/{app.id}/{interaction.token}`                                                      | [Interactions](https://docs.klang.gg/bots/reference/interactions/#send-a-follow-up)                                                         | `interaction-webhook`              |
| `GET`, `PATCH`, `DELETE /webhooks/{app.id}/{interaction.token}/messages/{message.id}`              | [Interactions](https://docs.klang.gg/bots/reference/interactions/#messages-with-the-interactions-token)                                     | `interaction-webhook`              |

## Rate limits

Every request counts against the **global limit**: 50 per second per bot, or per IP address for
requests without a valid token. Routes with a bucket count against it too. A dash in the table
above means the global limit only. The answers to an interaction are the exception: they don’t
count against the global limit at all (“None” above), and the follow-ups and edits only count
against `interaction-webhook`.

| Bucket                   | Limit               | Counted per                                                                                               |
| ------------------------ | ------------------- | --------------------------------------------------------------------------------------------------------- |
| `message`                | 5 every 5 seconds   | Bot and channel                                                                                           |
| `message-edit`           | 10 every 10 seconds | Bot, for edits and deletes together                                                                       |
| `reaction`               | 10 every 10 seconds | Bot                                                                                                       |
| `typing`                 | 5 every 10 seconds  | Bot and channel                                                                                           |
| `dm-create`              | 10 every 10 minutes | Bot, only when a new DM is opened                                                                         |
| `read-members`           | 10 every 10 seconds | Bot, whichever server                                                                                     |
| `read-messages`          | 10 every 5 seconds  | Bot, whichever channel                                                                                    |
| `read-message`           | 50 every 10 seconds | Bot, for a message or a channel                                                                           |
| `read-guild`             | 10 every 10 seconds | Bot, for a server, its channels and roles, and its servers                                                |
| `read-users`             | 20 every 5 seconds  | Bot, for a user, a member or one ban                                                                      |
| `bulk-delete`            | 5 every 10 seconds  | Bot                                                                                                       |
| `nickname`               | 20 every 10 minutes | Bot and server                                                                                            |
| `timeout`                | 30 every 10 minutes | Bot, for timing out and lifting timeouts                                                                  |
| `read-bans`              | 10 every 10 seconds | Bot, for the list of bans                                                                                 |
| `read-commands`          | 20 every 10 seconds | Bot, for its commands and their permissions, wherever                                                     |
| `commands-write`         | 20 every 20 seconds | App, for creating, replacing, editing and deleting commands, global and per server together               |
| `interaction-webhook`    | 5 every 2 seconds   | Interaction, for its follow-ups and its messages                                                          |
| `manage-channels`        | 20 every 10 seconds | Bot and server, for changing, ordering and deleting channels and their overwrites                         |
| `manage-roles`           | 20 every 10 seconds | Bot and server, for creating, changing, ordering and deleting roles                                       |
| `channel-create`         | 20 every 10 minutes | Server, shared with the people in the app                                                                 |
| `invite-create`          | 10 every 10 minutes | Server, shared with the people in the app                                                                 |
| `invite-preview`         | 60 every minute     | Bot, for looking up an invite by its code                                                                 |
| `read-invites`           | 10 every 10 seconds | Bot, for a channel’s and a server’s invites                                                               |
| `read-audit-log`         | 10 every 10 seconds | Bot, for the audit log                                                                                    |
| `thread-create`          | 10 every 10 minutes | Bot, for starting threads                                                                                 |
| `thread-manage`          | 30 every minute     | Bot, for changing, deleting, joining and leaving threads                                                  |
| `thread-list`            | 30 every minute     | Bot, for a channel’s archived threads                                                                     |
| `interactions-url-check` | 10 every 10 minutes | App, for each check of an interactions endpoint URL, from the portal or the API                           |
| `poll-voters`            | 30 every minute     | Bot, for who voted in a poll                                                                              |
| `emojis`                 | 30 every 10 minutes | Server, shared with the people in the app                                                                 |
| `stickers`               | 30 every 10 minutes | Server, shared with the people in the app                                                                 |
| `automod`                | 30 every 10 minutes | Server, shared with the people in the app                                                                 |
| `read-webhooks`          | 10 every 10 seconds | Bot, for a channel’s or a server’s webhooks and one webhook                                               |
| `webhook-manage`         | 20 every 10 minutes | Bot, for creating, changing and deleting webhooks, as people have it; with a webhook’s token, per webhook |

The bucket names are ours, for these pages: the API sends an opaque ID in
`X-RateLimit-Bucket` instead. Routes in the same bucket send the same ID. How the headers and the
`429` answer work is in [Limits and rate limits](https://docs.klang.gg/bots/limits/#rest-rate-limits).

A response from a route with a bucket carries its headers, even when it succeeds:

```http
HTTP/1.1 200 OK
Content-Type: application/json
X-RateLimit-Bucket: 88a32224e61b0e1dcbdee4406179cfd5
X-RateLimit-Limit: 5
X-RateLimit-Remaining: 4
X-RateLimit-Reset: 1794709517.881
X-RateLimit-Reset-After: 1.000
```

## Webhooks

The webhook routes also answer under the bot API’s base, so libraries that build webhook URLs
from it reach them. They don’t take a bot token: the webhook’s token in the path is the key.

| Route                                                                 | What it does                                                                                                                     |
| --------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------- |
| `POST /webhooks/{webhook.id}/{webhook.token}`                         | Posts a message. See [Execute a webhook](https://docs.klang.gg/webhooks/execute/).                                                                    |
| `GET /webhooks/{webhook.id}/{webhook.token}`                          | The webhook, without its token.                                                                                                  |
| `PATCH`, `DELETE /webhooks/{webhook.id}/{webhook.token}`              | Renames it, changes its avatar or deletes it. See [With the webhook’s token](https://docs.klang.gg/bots/reference/webhooks/#with-the-webhooks-token). |
| `PATCH /webhooks/{webhook.id}/{webhook.token}/messages/{message.id}`  | Edits a message that webhook posted.                                                                                             |
| `DELETE /webhooks/{webhook.id}/{webhook.token}/messages/{message.id}` | Deletes a message that webhook posted.                                                                                           |
| `POST /webhooks/{webhook.id}/{webhook.token}/github`                  | Takes GitHub’s events. See [GitHub](https://docs.klang.gg/webhooks/github/).                                                                          |

They’re the same routes as `https://api.klang.gg/api/webhooks/…`, with the same bodies, limits
and errors, which [Webhooks](https://docs.klang.gg/webhooks/) documents. The IDs they return are the ones bots see.

With your app’s ID and an interaction’s token instead of a webhook’s, the same paths send
follow-ups and edit the answers to that interaction: see
[Interactions](https://docs.klang.gg/bots/reference/interactions/#messages-with-the-interactions-token).
