Skip to content

Bulk-upsert preference cells for a user

PUT
/v1/preferences/users/{externalUserId}
curl --request PUT \
--url https://your-notavia-host/v1/preferences/users/example \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '{ "preferences": [ { "category_key": "example", "channel": "email", "opted_in": true } ] }'
externalUserId
required
string
Media type application/json
object
preferences
required
Array<object>
object
category_key
required
string
channel
required

Notification channel identifier.

string
Allowed values: email in_app webhook sms slack teams discord
opted_in
required
boolean

Updated preferences.

Media type application/json
object
data
Array<object>
object
category_key
string
channel

Notification channel identifier.

string
Allowed values: email in_app webhook sms slack teams discord
opted_in
boolean
Example
{
"data": [
{
"channel": "email"
}
]
}

Validation or request error.

Media type application/json
object
error
required
object
type
required
string
code
required
string
message
required
string
param
string
nullable
Example generated
{
"error": {
"type": "example",
"code": "example",
"message": "example",
"param": "example"
}
}

Missing or invalid credentials.

Media type application/json
object
error
required
object
type
required
string
code
required
string
message
required
string
param
string
nullable
Example generated
{
"error": {
"type": "example",
"code": "example",
"message": "example",
"param": "example"
}
}

Credentials do not have the required scope.

Media type application/json
object
error
required
object
type
required
string
code
required
string
message
required
string
param
string
nullable
Example generated
{
"error": {
"type": "example",
"code": "example",
"message": "example",
"param": "example"
}
}