staqlydocs
REST APIAPI referenceAlerts

Update an alert channel

Update an alert channel

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.

PATCH
/v1/alerts/{id}

config keys are merged into the stored config; null removes a key. Sending a masked secret back keeps the stored one. Changing where messages go (a Telegram chat_id, say) requires the secret again (422). Re-enabling resets the failure count.

Authorization

headerAuthorizationBearer <token>

API key (stk_...), or in the Community Edition the access token (stk_local_...)

Path Parameters

id*string

Header Parameters

Idempotency-Key?string

Replays 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.

Lengthlength <= 200

Request Body

application/json
  1. body
name?string
Lengthlength <= 100
type?string

Required on create; immutable

Value in"telegram""slack""discord""ntfy""email"
enabled?boolean
config?

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?integer

Batch events within this window into one message (0 = immediately)

Range0 <= value <= 86400

Response Body

OK

application/json
  1. response
id*string
name*string
type*string
Value in"telegram""slack""discord""ntfy""email"
enabled*boolean
config*

Settings with secrets masked

events*array<string>
collection_ids*array<string>
digest_window_seconds*integer
fail_count*integer

Consecutive failed sends; the channel is disabled at NOTIFY_MAX_FAILS

last_error*string
disabled_reason*string
last_sent_at*|
Formatdate-time
created_at*string
Formatdate-time
updated_at*string
Formatdate-time
curl -X PATCH 'https://staqly.example.com/v1/alerts/string' \  -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"}