On-Call API › Microsoft Teams
Update a Teams channel
PATCH/api/v1/chat/channels/{id}
Changes the name, all_alerts or the webhook URL. Only the fields sent change.
Permission (API-key scope): oncall:settings:write.
Authorization
bearerAuth(oncall:settings:write)apiKeyHeader(oncall:settings:write)
Parameters
Path parameters
idstring requiredThe chat channel's id.
Request body required
namestringall_alertsbooleanwebhook_urlstring (uri)
Responses
200
The channel after the change.
dataChatChannel requiredShow ChatChannel properties
idstringorg_idstringkindstringnamestringall_alertsbooleanEvery alert is posted here.created_bystringcreated_atstring (date-time)updated_atstring (date-time)
successboolean required
400
The body is not JSON (INVALID_REQUEST), or a field is invalid (VALIDATION_FAILED).
errorobject requiredcodestring requiredmessagestring requireddetailsarray of object requiredfieldstringmessagestring
401
No API key was sent, or it is unknown, revoked or expired (UNAUTHORIZED).
errorobject requiredcodestring requiredMachine-readable code. Branch on this.messagestring requiredHuman-readable explanation.
403
The key lacks the scope this endpoint needs (FORBIDDEN).
errorobject requiredcodestring requiredMachine-readable code. Branch on this.messagestring requiredHuman-readable explanation.
404
No such channel (NOT_FOUND).
errorobject requiredcodestring requiredMachine-readable code. Branch on this.messagestring requiredHuman-readable explanation.
429
Too many requests (RATE_LIMITED). Wait Retry-After seconds.
Retry-AfterintegerSeconds to wait.
errorobject requiredcodestring requiredMachine-readable code. Branch on this.messagestring requiredHuman-readable explanation.
500
Something went wrong on EvoHub's side (INTERNAL_ERROR). Retry later.
errorobject requiredcodestring requiredMachine-readable code. Branch on this.messagestring requiredHuman-readable explanation.
Example request
curl -X PATCH 'https://evohub.io/api/v1/chat/channels/e4f5a6b7-c8d9-4e0f-a1b2-c3d4e5f6a7b8' \
-H 'Content-Type: application/json' \
-H 'Authorization: Bearer <TOKEN>' \
-d '{
"all_alerts": false
}'