Change an alert channel. What you leave out stays as it is. An empty secret stops signing. 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/jsonChange an alert channel. What you leave out stays as it is. An empty secret stops signing. Team owners and admins.
API key access: full.
op*"updateAlertChannel""updateAlertChannel"id*stringname?string|nullevents?array<string>|nullwebhookUrl?string|nulltoken?string|nullchatId?string|nullsecret?string|nullDone. 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 '{
"chatId": "-1001234567890",
"events": [
"deploy_failed",
"server_offline"
],
"id": "alc_8kq2x7ad",
"name": "Ops chat",
"op": "updateAlertChannel",
"secret": "a-long-random-secret",
"token": "123456789:AAExampleBotTokenFromBotFather0000",
"webhookUrl": "https://hooks.slack.com/services/T0000/B0000/XXXXXXXX"
}'{}