Skip to content

List notification preferences

GET
/notifications/preferences
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.

locale
string

Locale used for the label, description and group texts.

Example
pt_BR

The caller’s preferences.

Media typeapplication/json

Notification preferences of the caller, grouped by the app that emits them, already merged with each notification’s per-channel defaults.

object
modules
Array<object>
object
app_id
integer
label
string
notifications
Array<object>
object
key
string
label
string
description
string
group
string
channels

Per-channel state, keyed by channel name.

object
key
additional properties
object
is_default
boolean
is_mandatory

Mandatory channels cannot be switched off.

boolean
is_enabled
boolean
Examples
Examplepreferences
{
"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.

Media typeapplication/json

Authentication failures use an error key rather than message.

object
error
required
string
Examples
Examplemissing

No bearer token sent

{
"error": "JWT passport exception: Missing bearer token in request"
}

The request body or query string failed validation.

Media typeapplication/json
object
message
required

The first validation message.

string
errors
required

Validation messages keyed by field name.

object
key
additional properties
Array<string>
Examples
Exampleinvalid
{
"message": "The name field is required.",
"errors": {
"name": [
"The name field is required."
]
}
}

Rate limit exceeded. Retry after the window resets.

Media typeapplication/json

Generic error envelope used by policy, binding and framework failures.

object
message
required

Human-readable description of the failure.

string
Examples
Examplethrottled
{
"message": "Too Many Attempts."
}