put
https://api-v2.pandavideo.com.br/notifications/preferences
Enables or disables event-channel pairs. Only the pairs sent are changed; the response is the full matrix. Send {"action":"restore_defaults"} to reset all preferences to their defaults.
Recent Requests
Log in to see full request history
| Time | Status | User Agent | |
|---|---|---|---|
Retrieving recent requests… | |||
Loading…
Enables or disables event-channel pairs. Only the pairs sent are changed; the response is the full matrix (same format as the GET).
Request body
Send a preferences array with the pairs to update:
{
"preferences": [
{ "event_type": "CAPTIONS_READY", "channel": "EMAIL", "enabled": true },
{ "event_type": "BILLING_FAILED", "channel": "SMS", "enabled": true }
]
}Each item requires event_type, channel and enabled.
Restore defaults
To reset all preferences to their default values, send:
{ "action": "restore_defaults" }Do not include preferences when using action.
Errors
| Error code | Cause |
|---|---|
CHANNEL_UNAVAILABLE | The channel is not available for this event (e.g. SMS for a VIDEO event). The detail field shows the pair. |
INVALID_PREFERENCE | Unknown event type or channel name. |
CONFLICTING_PREFERENCE | Same event-channel pair sent with different enabled values, or conflicting 85%/100% bandwidth/storage preferences. |
BadRequest | preferences is not an array, or enabled is not a boolean. |
Example error
{ "errCode": "CHANNEL_UNAVAILABLE", "errMsg": "channel is not available for this event.",
"detail": "event_type=VIDEO_READY channel=SMS" }
Bandwidth and storage 85% alerts (BANDWIDTH_NEAR_LIMIT,STORAGE_NEAR_LIMIT) follow the preference of the 100% alert. Sending both with different values returnsCONFLICTING_PREFERENCE.
