webhook_regenerate
Give a webhook a new token. Use it when the old token has leaked. The webhook keeps its ID, name, avatar, and channel, but the old URL is rejected from now on.
Request
Section titled “Request”{ "cmd": "webhook_regenerate", "id": "3f2b8c1e-5d4a-4b7e-9c61-2a8f0e7d9b34"}| Field | Type | Required | Description |
|---|---|---|---|
id |
string | Yes | Webhook ID. |
Response
Section titled “Response”{ "cmd": "webhook_regenerate", "webhook": { "id": "3f2b8c1e-5d4a-4b7e-9c61-2a8f0e7d9b34", "channel": "general", "name": "Build reports", "token": "d41e7a90-2c5b-4f8e-b3a1-9e6f0c2d8b57a1c4e9f2d0b3a6c7", "created_by": "<alice's user ID>", "created_at": 1758700000.123, "avatar": null }}The response includes the new token. Update the service that posts to the webhook. Nobody else receives a broadcast, and the change 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 regenerate token for webhook '<name>' |
The server couldn’t save webhooks.json. The old token still works. |
| Validation message | id is missing or blank, for example id: Required. |
