TypeScript
const options = { method: 'PATCH', headers: {cookie: 'session=', 'Content-Type': 'application/json'}, body: JSON.stringify({ channels: {slack: {enabled: true, webhookUrl: '<string>', channel: '<string>'}}, subscriptions: {} }) }; fetch('https://api.example.com/v1/regions/global/notifications/settings', options) .then(res => res.json()) .then(res => console.log(res)) .catch(err => console.error(err));
{ "success": true, "data": { "channels": { "inApp": { "enabled": true }, "email": { "enabled": true, "address": "jsmith@example.com", "digestFrequency": "realtime" }, "slack": { "enabled": true, "webhookUrl": "<string>", "channel": "<string>" } }, "subscriptions": {} }, "meta": {} }
Update userβs notification preferences
Session-based authentication via HTTP-only cookie
Show child attributes
Settings updated
true
User notification settings
Was this page helpful?