Notification Preferences
Update current user notification preferences (upsert)
PUT
/notification-preferences
const url = 'https://api.inspow.tech/api/v1/notification-preferences';const options = { method: 'PUT', headers: {'Content-Type': 'application/json'}, body: '{"userId":"example","channels":{"socket":true,"email":true,"whatsapp":true},"events":{},"updatedBy":"example"}'};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request PUT \ --url https://api.inspow.tech/api/v1/notification-preferences \ --header 'Content-Type: application/json' \ --data '{ "userId": "example", "channels": { "socket": true, "email": true, "whatsapp": true }, "events": {}, "updatedBy": "example" }'Request Body required
Sección titulada «Request Body required » Media type application/json
object
userId
string
channels
object
socket
required
boolean
email
required
boolean
whatsapp
required
boolean
events
Per-event channels overrides
object
updatedBy
string
Example generated
{ "userId": "example", "channels": { "socket": true, "email": true, "whatsapp": true }, "events": {}, "updatedBy": "example"}