Create an alert channel
Adds a destination for this website's alerts. Chat and webhook channels need an https URL on a public host, and a chat channel's URL must belong to that service's webhooks. Private and internal addresses are rejected, and the host is checked again on every send. Webhook deliveries are signed with your secret so the receiver can verify them. A Telegram channel takes a bot token and a chat id instead of a URL. Send a test alert afterwards to confirm it works. Counts against the plan's channel limit.
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.
The fields depend on type. Chat channels take an incoming-webhook url and the URL must belong to the chosen service, a webhook channel also takes a signing secret, a telegram channel takes botToken and chatId, and an email channel takes to instead of a URL. Microsoft Teams expects a Power Automate workflow URL.
The fields depend on type. Chat channels take an incoming-webhook url and the URL must belong to the chosen service, a webhook channel also takes a signing secret, a telegram channel takes botToken and chatId, and an email channel takes to instead of a URL. Microsoft Teams expects a Power Automate workflow URL.
Display name for the channel.
1 <= length <= 255A chat service, notified through an incoming webhook.
An https URL on a public host. It is checked again on every send, and never returned.
1 <= length <= 2048Defaults to true.
Response Body
application/json
curl -X POST "https://api-next.centralcsp.com/v1/workspaces/string/websites/string/alerts/channels" \ -H "Content-Type: application/json" \ -d '{ "name": "Security channel", "type": "slack", "url": "https://hooks.slack.com/services/T000/B000/XXXX" }'{ "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"}