Update an alert channel
Changes a channel's name, destination, or enabled state. Leave url, secret, botToken, chatId, or to out to keep what is stored. A channel switched off after repeated delivery failures is cleared and starts fresh when you enable it again.
Requires the manager role on the website and the alerting plan feature.
An OpenID Connect access token issued by Keycloak, acting as the signed-in user.
In: header
Path Parameters
Request Body
application/json
TypeScript Definitions
Use the request body type in TypeScript.
Display name for the channel.
1 <= length <= 255An https URL on a public host. It is checked again on every send, and never returned.
1 <= length <= 2048Shared secret used to sign each delivery, so the receiver can check it came from us. Stored and never returned.
8 <= length <= 255The bot's token from @BotFather, like 1234567890:AA…. Stored and never returned.
1 <= length <= 255The chat to notify: a numeric chat or group id (groups are negative), or a public channel's @username. The bot must be a member of the chat.
1 <= length <= 64Between 1 and 10 addresses to notify.
1 <= items <= 10Enabling a channel that was switched off after failures resets its failure count.
Response Body
application/json
curl -X PATCH "https://api-next.centralcsp.com/v1/workspaces/string/websites/string/alerts/channels/string" \ -H "Content-Type: application/json" \ -d '{}'{ "id": "string", "workspaceId": "string", "websiteId": "string", "name": "Security channel", "type": "string", "configPreview": "https://hooks.slack.com/…AbCd", "hasSecret": true, "emailRecipients": [ "string" ], "enabled": true, "disabledReason": "string", "consecutiveFailures": 0, "createdAt": "2019-08-24T14:15:22Z", "updatedAt": "2019-08-24T14:15:22Z"}