/channels (POST)
const url = 'https://culipulse.dev/v1/channels';const options = { method: 'POST', headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'}, body: '{"type":"webhook","name":"example","url":"example","all_monitors":true,"monitor_ids":["example"]}'};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request POST \ --url https://culipulse.dev/v1/channels \ --header 'Authorization: Bearer <token>' \ --header 'Content-Type: application/json' \ --data '{ "type": "webhook", "name": "example", "url": "example", "all_monitors": true, "monitor_ids": [ "example" ] }'Authorizations
Section titled “Authorizations”Request Body
Section titled “Request Body”An account can have up to 20 notification destinations (all types). A create beyond that returns 400 channel_limit_reached. A webhook URL already used by another of your destinations returns 400 duplicate_webhook_url; this is checked before the test delivery is sent.
object
Telegram (default), slack or webhook.
Example
webhookWebhook only. Must be https. A test delivery is sent before the channel is saved.
Defaults to true.
Used when all_monitors is false. Duplicates and ids that are not yours are ignored. An empty list is allowed and means the channel receives nothing (a mute). More distinct ids than your plan’s monitor limit (or than the monitors you own, if that is higher) returns 400 too_many_monitors.
Responses
Section titled “Responses”Created
object
Webhook only. Returned once, at create. Store it now.
Telegram only. Open it to finish connecting.
Telegram only.
Slack only. Open it to finish connecting.
Examplegenerated
{ "id": "example", "signing_secret": "example", "deep_link": "example", "group_deep_link": "example", "authorize_url": "example"}Invalid request, or a limit was hit (code: channel_limit_reached at 20 destinations, too_many_monitors, duplicate_webhook_url)
object
Present on some 400s so a client can branch without parsing error. Known values: channel_limit_reached, too_many_monitors, duplicate_webhook_url.
The request field the error is about, when there is one.
The limit that was hit, when code names one.
Example
{ "error": "not found", "request_id": "req_abc123", "code": "channel_limit_reached"}