Send the team's alerts somewhere: kind "telegram" (a bot token and a chatId), "discord" or "slack" (the channel's webhookUrl), or "webhook" (your webhookUrl, and a secret to sign each request with). Pyo keeps it encrypted. Team owners and admins.
API key access: full.
apiKeyAuthorizationBearer <pyo_…>An API key from the dashboard's API keys page: Authorization: Bearer pyo_…. Keys can expire, and an expired one gets a 401.
application/jsonSend the team's alerts somewhere: kind "telegram" (a bot token and a chatId), "discord" or "slack" (the channel's webhookUrl), or "webhook" (your webhookUrl, and a secret to sign each request with). Pyo keeps it encrypted. Team owners and admins.
API key access: full.
op*"addAlertChannel""addAlertChannel"id*stringA new id you choose: alc_ then 4 to 40 lowercase letters, digits, dashes or underscores.
teamId*stringkind*string"telegram", "discord", "slack" or "webhook".
name*stringevents?array<string>|What it gets: "deploy_failed", "server_offline" (and back online), "server_pressure" (low on disk space or memory, and fine again), "backup_failed" and "certificate" (expiring, or couldn't renew). All of them when omitted.
webhookUrl?|Discord's or Slack's webhook URL, or your own (https, or http to a private network address).
token?|The Telegram bot's token, from @BotFather.
chatId?|The Telegram chat: its id (negative for groups and channels) or a public channel's @name.
secret?|A webhook's signing secret: each request then has X-Pyo-Signature, HMAC-SHA256 of "." as "sha256=".
Done. Always ok: true, and some operations add more, such as a new API key or a join command. A warning comes with a change that went through but won't fully take effect yet, such as more replicas than the servers have room for.
application/jsoncurl -X POST 'https://your-pyo.example.com/api/v1/ops' \
-H 'Content-Type: application/json' \
-d '{
"id": "alc_8kq2x7ad",
"kind": "slack",
"name": "Ops chat",
"op": "addAlertChannel",
"teamId": "team_8kq2x7ad"
}'{}