Channels
Update a channel
Changes only the fields you send. The settings object of the channel's type replaces the current settings, including secrets: send them again. Other types' objects are refused (422); create a new channel to change the type. Enabling clears an automatic disable.
patch/channels/{channel}
Request
- Base URLhttps://api.spectate.net/v1
- AuthHTTP bearer
Path parameters
channelstring uuid required
Channel ID.
Request body
Example request
{
"name": "On-call email",
"email": {
"address": "oncall@example.com"
},
"slack": {
"channel": "C0123456789",
"channel_name": "#alerts"
},
"discord": {
"webhook_url": "https://discord.com/api/webhooks/123/abc"
},
"microsoft_teams": {
"webhook_url": "https://discord.com/api/webhooks/123/abc"
},
"webhook": {
"url": "https://hooks.example.com/spectate",
"headers": [
{
"key": "Authorization",
"value": "Bearer s3cr3t"
}
]
},
"pushover": {
"user_key": "uQiRzpo4DXghDmr9QzzfQu27cmVRsG",
"api_token": "azGDORePK8gMaC0QOYAMyEEuzJnyUi",
"priority": 1
},
"sms": {
"phone_number": "+31612345678"
},
"voice": {
"phone_number": "+31612345678"
}
}Response
The updated channel.
Example response
{
"name": "On-call email",
"email": {
"address": "oncall@example.com"
},
"slack": {
"channel": "C0123456789",
"channel_name": "#alerts"
},
"telegram": {
"chat_id": "-1001234567890",
"chat_title": "Ops alerts"
},
"webhook": {
"host": "hooks.example.com"
},
"pushover": {
"user_key": "uQiRzpo4DXghDmr9QzzfQu27cmVRsG",
"priority": 1
},
"sms": {
"phone_number": "+31612345678"
},
"voice": {
"phone_number": "+31612345678"
}
}Changes
No recorded changes to this operation across all 1 revision of this API.