On-Call API › Message templates
Save the voice-call template
PUT/api/v1/voice-template
Saves the voice template (at most 1000 characters; surrounding spaces are
trimmed). An empty body removes it and calls go back to the default wording.
Permission (API-key scope): oncall:settings:write.
Authorization
bearerAuth(oncall:settings:write)apiKeyHeader(oncall:settings:write)
Request body required
bodystringPlaceholders in braces, e.g.{alert.title}or{service}.
Responses
200
The saved template, or an empty one after removal.
dataVoiceTemplate requiredShow VoiceTemplate properties
bodystringupdated_atstring (date-time)RFC 3339; absent when no template is saved.
successboolean required
400
The body is not JSON (INVALID_BODY), or the template is longer than 1000 characters (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 PUT 'https://evohub.io/api/v1/voice-template' \
-H 'Content-Type: application/json' \
-H 'Authorization: Bearer <TOKEN>' \
-d '{
"body": "Service {service} in {env}: {alert.title}."
}'