Update notification preferences
Updates notification preferences for the current user. Can update global preferences, business-specific preferences, or type-specific preferences.
Preference Levels:
- Global: No businessId or notificationType specified
- Business-level: businessId specified, no notificationType
- Type-specific: notificationType specified (optionally with businessId)
Updatable Fields:
- inAppEnabled: Enable/disable in-app notifications
- emailEnabled: Enable/disable email notifications
- pushEnabled: Enable/disable push notifications
- emailDigestFrequency: immediate, hourly, daily, weekly, never
- quietHoursStart: Start time for quiet hours (HH:mm format)
- quietHoursEnd: End time for quiet hours (HH:mm format)
- timezone: User's timezone for quiet hours calculation
Example Use Cases:
- Disable all email notifications:
{ emailEnabled: false } - Set quiet hours:
{ quietHoursStart: "22:00", quietHoursEnd: "08:00", timezone: "Asia/Jerusalem" } - Disable specific type:
{ notificationType: "document_viewed", inAppEnabled: false } - Daily digest for business:
{ businessId: "xxx", emailDigestFrequency: "daily" }
Business API key, e.g. vuz_ab12cdef... Created via Settings → Integrations → API Keys. Unlike partner keys, a public API key's STRING does not encode its environment — isolation instead comes from a completely separate sandbox database: a key minted on the Sandbox server (above) only ever reads/writes sandbox data and can never see or affect production, regardless of what the key looks like.
In: header
Request Body
application/json
TypeScript Definitions
Use the request body type in TypeScript.
Response Body
application/json
application/json
curl -X PUT "https://example.com/notifications/preferences" \ -H "Content-Type: application/json" \ -d '{}'{ "id": "550e8400-e29b-41d4-a716-446655440000", "userId": "550e8400-e29b-41d4-a716-446655440001", "businessId": "string", "notificationType": "document_created", "inAppEnabled": true, "emailEnabled": true, "pushEnabled": false, "emailDigestFrequency": "immediate", "quietHoursStart": "22:00", "quietHoursEnd": "08:00", "timezone": "Asia/Jerusalem", "createdAt": "2019-08-24T14:15:22Z", "updatedAt": "2019-08-24T14:15:22Z"}
