Update Notification Preferences
const url = 'https://api.ultimateteam.ai/api/v1/notifications/preferences';const options = { method: 'PUT', headers: {'X-API-Key': '<X-API-Key>', 'Content-Type': 'application/json'}, body: '{"agent_alerts":true,"approval_requests":true,"daily_brief":true,"proactive_insights":true,"quiet_hours_end":1,"quiet_hours_start":1,"timezone":"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.ultimateteam.ai/api/v1/notifications/preferences \ --header 'Content-Type: application/json' \ --header 'X-API-Key: <X-API-Key>' \ --data '{ "agent_alerts": true, "approval_requests": true, "daily_brief": true, "proactive_insights": true, "quiet_hours_end": 1, "quiet_hours_start": 1, "timezone": "example" }'Update the current user’s notification preferences.
Only fields present in the request body are updated.
Args: body: The fields to update. user: The authenticated user context.
Returns: The updated notification preferences.
Authorizations
Section titled “Authorizations”Request Bodyrequired
Section titled “Request Bodyrequired”Request body for updating notification preferences.
All fields are optional – only provided fields are updated.
Attributes: approval_requests: Toggle for approval request notifications. agent_alerts: Toggle for critical agent alert notifications. daily_brief: Toggle for daily brief notifications. quiet_hours_start: Hour (0-23) when quiet hours begin. quiet_hours_end: Hour (0-23) when quiet hours end. timezone: IANA timezone string.
object
Examplegenerated
{ "agent_alerts": true, "approval_requests": true, "daily_brief": true, "proactive_insights": true, "quiet_hours_end": 1, "quiet_hours_start": 1, "timezone": "example"}Responses
Section titled “ Responses ”Successful Response
Response body for notification preferences.
Attributes: approval_requests: Whether to receive approval request notifications. agent_alerts: Whether to receive critical agent alert notifications. daily_brief: Whether to receive daily brief availability notifications. quiet_hours_start: Hour (0-23) when quiet hours begin. quiet_hours_end: Hour (0-23) when quiet hours end. timezone: IANA timezone string for quiet hours calculation.
object
Examplegenerated
{ "agent_alerts": true, "approval_requests": true, "daily_brief": true, "proactive_insights": true, "quiet_hours_end": 1, "quiet_hours_start": 1, "timezone": "example"}Validation Error
object
object
object
Examplegenerated
{ "detail": [ { "ctx": {}, "input": "example", "loc": [ "example" ], "msg": "example", "type": "example" } ]}