Get effective preferences for a user
GET
/v1/preferences/users/{externalUserId}
const url = 'https://your-notavia-host/v1/preferences/users/example';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://your-notavia-host/v1/preferences/users/example \ --header 'Authorization: Bearer <token>'Authorizations
Section titled “Authorizations ”Parameters
Section titled “ Parameters ”Path Parameters
Section titled “Path Parameters ” externalUserId
required
string
Responses
Section titled “ Responses ”Effective preferences.
Media type application/json
object
data
Array<object>
object
category_key
string
channel
Notification channel identifier.
string
opted_in
boolean
Example
{ "data": [ { "channel": "email" } ]}Missing or invalid credentials.
Media type application/json
object
error
required
object
type
required
string
code
required
string
message
required
string
param
string
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
Example generated
{ "error": { "type": "example", "code": "example", "message": "example", "param": "example" }}