On-Call API › Microsoft Teams
Add a Teams channel
Adds a Microsoft Teams channel by its Workflows webhook URL (https, on
powerplatform.com or logic.azure.com). With all_alerts, every alert is
posted to it; otherwise only escalation steps that name it post there.
Permission (API-key scope): oncall:settings:write.
Authorization
bearerAuth(oncall:settings:write)apiKeyHeader(oncall:settings:write)
Request body required
kindstring requirednamestring requiredwebhook_urlstring (uri) requiredA Teams Workflows webhook URL.all_alertsboolean
Responses
201
The channel.
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 kind is not teams, name is empty or over 200 characters, or the webhook URL is not a Teams Workflows URL (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.
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 POST 'https://evohub.io/api/v1/chat/channels' \
-H 'Content-Type: application/json' \
-H 'Authorization: Bearer <TOKEN>' \
-d '{
"kind": "teams",
"name": "Ops alerts",
"all_alerts": true,
"webhook_url": "https://prod-00.westeurope.logic.azure.com/workflows/0123456789abcdef/triggers/manual/paths/invoke"
}'