Update an alert channel
Changes a channel's name, destination, or enabled state. Leave url, secret, botToken, chatId, or memberIds out to keep what is stored. Sending memberIds replaces the whole recipient list and accepts at most 5. 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 <= 64The id of each membership to notify, between 1 and 5. A recipient is a member of the workspace who already has access to this website, so the alert only reaches someone who could open it in the dashboard. Their address is resolved from their profile on every send. Add another channel to reach more people.
1 <= items <= 5Enabling a channel that was switched off after failures resets its failure count.
Response Body
application/json
curl -X PATCH "https://example.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": [ { "memberId": "string", "userId": "string", "hasAccess": true, "email": "string", "firstName": "string", "lastName": "string", "picture": "string" } ], "enabled": true, "disabledReason": "string", "consecutiveFailures": 0, "createdAt": "2019-08-24T14:15:22Z", "updatedAt": "2019-08-24T14:15:22Z"}