Create an alert channel
Create an alert channel (alerts:manage)
Every request sends Authorization: Bearer ...: the access token in local mode, an API key stk_... in cloud mode. Use Send to try it against your cloud instance with your API key.
Telegram, Slack, Discord, ntfy or email. Secrets are stored encrypted and returned masked.
Default events: post.published, post.failed, channel.needs_reconnect. Messages carry a
dashboard link to the post and, for post.target_published, the public URL.
AuthorizationBearer <token>API key (stk_...), or in the Community Edition the access token (stk_local_...)
Idempotency-Key?stringReplays the stored response when the same key is repeated with the same method, path,
query string and body within 24 hours (422 idempotency_mismatch with a different
request, 409 idempotency_in_progress while the first one runs). Not applied to
multipart uploads or to responses that carry a secret.
length <= 200application/json- body
name*stringlength <= 100type*stringRequired on create; immutable
"telegram""slack""discord""ntfy""email"enabled?booleanconfig*Type-specific delivery settings. Secret fields are write-only (returned masked, e.g. "••••abcd"). telegram: bot_token*, chat_id*. slack: webhook_url* or bot_token*+channel*. discord: webhook_url* or bot_token*+channel*. ntfy: topic*, server_url (default https://ntfy.sh), access_token, priority. email: host*, port, username, password, from*, to*, tls (starttls|tls|none). On update, keys are merged into the stored config and null removes a key.
events?array<string>Event patterns (glob, "*"). Default ["post.published", "post.failed", "channel.needs_reconnect"].
collection_ids?array<string>digest_window_seconds?integerBatch events within this window into one message (0 = immediately)
0 <= value <= 86400Created
application/json- response
id*stringname*stringtype*string"telegram""slack""discord""ntfy""email"enabled*booleanconfig*Settings with secrets masked
events*array<string>collection_ids*array<string>digest_window_seconds*integerfail_count*integerConsecutive failed sends; the channel is disabled at NOTIFY_MAX_FAILS
last_error*stringdisabled_reason*stringlast_sent_at*|date-timecreated_at*stringdate-timeupdated_at*stringdate-timecurl -X POST 'https://staqly.example.com/v1/alerts' \ -H 'Content-Type: application/json' \ -d '{}'{ "id": "string", "name": "string", "type": "telegram", "enabled": true, "config": {}, "events": [ "string" ], "collection_ids": [ "string" ], "digest_window_seconds": 0, "fail_count": 0, "last_error": "string", "disabled_reason": "string", "last_sent_at": "2019-08-24T14:15:22Z", "created_at": "2019-08-24T14:15:22Z", "updated_at": "2019-08-24T14:15:22Z"}