Update notification preferences
PUT
/api/v1/me/profile/notifications
const url = 'http://localhost:3000/api/v1/me/profile/notifications';const options = { method: 'PUT', headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'}, body: '{"emailNotifications":true,"smsNotifications":true,"pushNotifications":true,"marketingEmails":true}'};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request PUT \ --url http://localhost:3000/api/v1/me/profile/notifications \ --header 'Authorization: Bearer <token>' \ --header 'Content-Type: application/json' \ --data '{ "emailNotifications": true, "smsNotifications": true, "pushNotifications": true, "marketingEmails": true }'Authorizations
Section titled “Authorizations ”Request Body required
Section titled “Request Body required ” Media type application/json
object
emailNotifications
Email notifications enabled
boolean
smsNotifications
SMS notifications enabled
boolean
pushNotifications
Push notifications enabled
boolean
marketingEmails
Marketing emails enabled
boolean
Example generated
{ "emailNotifications": true, "smsNotifications": true, "pushNotifications": true, "marketingEmails": true}Responses
Section titled “ Responses ” Media type application/json
object
id
required
User ID
string
email
required
User email
string
name
User display name
string
phone
Phone number
string
timezone
required
Timezone
string
locale
required
Locale
string
emailNotifications
required
Email notifications enabled
boolean
smsNotifications
required
SMS notifications enabled
boolean
pushNotifications
required
Push notifications enabled
boolean
marketingEmails
required
Marketing emails enabled
boolean
bio
User bio
string
jobTitle
Job title
string
department
Department
string
location
Location
string
createdAt
required
Created at
string format: date-time
updatedAt
required
Updated at
string format: date-time
lastLoginAt
Last login timestamp
string format: date-time
isSuperAdmin
required
Whether the user is a super admin
boolean
roles
required
Effective roles for the current user
Array<string>
Example
{ "timezone": "UTC", "locale": "en", "emailNotifications": true, "smsNotifications": false, "pushNotifications": true, "marketingEmails": false, "isSuperAdmin": false, "roles": [ "admin" ]}