webhook_delete
Delete a webhook. Its token stops working at once. Messages it already posted stay in the channel.
Request
Section titled “Request”{ "cmd": "webhook_delete", "id": "3f2b8c1e-5d4a-4b7e-9c61-2a8f0e7d9b34"}| Field | Type | Required | Description |
|---|---|---|---|
id |
string | Yes | ID of the webhook to delete. |
Response
Section titled “Response”{ "cmd": "webhook_delete", "id": "3f2b8c1e-5d4a-4b7e-9c61-2a8f0e7d9b34", "deleted": true}Nobody else receives a broadcast. The deletion is recorded in the audit log.
Permissions
Section titled “Permissions”Requires manage_server. It is blocked while you are timed out.
Errors
Section titled “Errors”val |
When |
|---|---|
Webhook not found |
No webhook has that ID. |
Failed to delete webhook '<name>' |
The server couldn’t save webhooks.json. The webhook still exists. |
| Validation message | id is missing or blank, for example id: Required. |
See also
Section titled “See also”webhook_regenerate, to replace a leaked token without deleting the webhookwebhook_list
