List notification preferences
const url = 'https://work.optidata.cloud/api/notifications/preferences?locale=pt_BR';const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request GET \ --url 'https://work.optidata.cloud/api/notifications/preferences?locale=pt_BR' \ --header 'Authorization: Bearer <token>'Which notifications the caller receives, on which channels, grouped by
the app that emits them. The payload always describes every notification
the tenant can produce, merged with the caller’s stored choices; a
channel flagged is_mandatory cannot be switched off.
Authorizations
Section titled “Authorizations”Parameters
Section titled “ Parameters ”Query Parameters
Section titled “Query Parameters”Locale used for the label, description and group texts.
Example
pt_BRResponses
Section titled “ Responses ”The caller’s preferences.
Notification preferences of the caller, grouped by the app that emits them, already merged with each notification’s per-channel defaults.
object
object
object
Per-channel state, keyed by channel name.
object
object
Mandatory channels cannot be switched off.
Examples
{ "modules": [ { "app_id": 1, "label": "Drive", "notifications": [ { "key": "drive.share.permission_created", "label": "File shared with you", "description": "When someone shares a file or folder with you", "group": "Sharing", "channels": { "email": { "is_default": true, "is_mandatory": false, "is_enabled": true }, "web": { "is_default": true, "is_mandatory": false, "is_enabled": true } } } ] } ]}Missing, malformed or expired authentication key.
Authentication failures use an error key rather than message.
object
Examples
No bearer token sent
{ "error": "JWT passport exception: Missing bearer token in request"}The request body or query string failed validation.
object
The first validation message.
Validation messages keyed by field name.
object
Examples
{ "message": "The name field is required.", "errors": { "name": [ "The name field is required." ] }}Rate limit exceeded. Retry after the window resets.
Generic error envelope used by policy, binding and framework failures.
object
Human-readable description of the failure.
Examples
{ "message": "Too Many Attempts."}