Update notification preferences
PUT
/notifications/preferences
const url = 'http://localhost:8000/api/v1/notifications/preferences';const options = { method: 'PUT', headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'}, body: '{"channels":{"email":true,"push":true,"inapp":true},"types":{"reminders":true,"insights":true,"inactivity":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:8000/api/v1/notifications/preferences \ --header 'Authorization: Bearer <token>' \ --header 'Content-Type: application/json' \ --data '{ "channels": { "email": true, "push": true, "inapp": true }, "types": { "reminders": true, "insights": true, "inactivity": true } }'Authorizations
Section titled “Authorizations ”Request Body
Section titled “Request Body ” Media type application/json
object
channels
object
email
boolean
push
boolean
inapp
boolean
types
object
reminders
boolean
insights
boolean
inactivity
boolean
Example generated
{ "channels": { "email": true, "push": true, "inapp": true }, "types": { "reminders": true, "insights": true, "inactivity": true }}Responses
Section titled “ Responses ”Preferences updated