On-Call API › My notifications
Update a notification method
Changes one of the caller's notification methods. Only the fields sent change; PUT and PATCH do the same thing.
These are the caller's own, across every organization they belong to. Meant for a person; with an organization API key the key itself is the caller.
Permission: none — any valid API key or signed-in member of the organization.
Authorization
Parameters
Path parameters
idstring requiredThe notification preference's id.
Request body required
Only the fields sent change.
channelNotificationChanneltargetstringpriorityintegerenabledbooleanquiet_startstringquiet_endstring
Responses
200
The preference after the change.
dataNotificationPreference requiredShow NotificationPreference properties
idstringorg_idstringThe organization it was created from.user_idstringchannelNotificationChanneltargetstringPhone number, email address, or empty for push.priorityinteger0 is tried first.enabledbooleanquiet_startstringStored for older clients; no longer used. Use the notification schedule.quiet_endstringStored for older clients; no longer used.created_atstring (date-time)updated_atstring (date-time)
successboolean required
400
The body is not JSON (INVALID_BODY), or a value is refused (VALIDATION_ERROR).
errorobject requiredcodestring requiredMachine-readable code. Branch on this.messagestring requiredHuman-readable explanation.
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.
404
The caller has no preference with this id (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 PUT 'https://evohub.io/api/v1/notification-preferences/string' \
-H 'Content-Type: application/json' \
-H 'Authorization: Bearer <TOKEN>' \
-d '{
"enabled": false
}'