---
title: "Update preferences"
method: PATCH
path: "/notifications/user_preferences/update/v1"
tags: ["/notifications", "/user_preferences"]
---

# Update preferences

`PATCH /notifications/user_preferences/update/v1`

Updates notification preferences with explicit events, opt-in, or opt-out operations. | (UserNotificationPreferencesUpdateRequest) -> (NotificationUserPreferences1)

## Request body

- UserNotificationPreferencesUpdateRequest — Update notification preferences in a single request. Priority/semantics (applied in order): 1. opt_out_of_all_on_channels - clears all events for specified channels 2. opt_in_to_all_on_channels - sets all events for specified channels 3. set_events_by_channel - replaces entire event list for specified channels 4. add_events_by_channel - adds specific events to specified channels 5. remove_events_by_channel - removes specific events from specified channels Fields: - set_events_by_channel: Replace entire event list for channels. Empty list = remove all events for that channel. - add_events_by_channel: Add specific events to channels (additive). - remove_events_by_channel: Remove specific events from channels (subtractive). - opt_in_to_all_on_channels: Opt into all available events for the specified channels. - opt_out_of_all_on_channels: Opt out of all events for the specified channels.
  - `set_events_by_channel` object, nullable
  - `add_events_by_channel` object, nullable
  - `remove_events_by_channel` object, nullable
  - `opt_in_to_all_on_channels` NotificationChannelsEnum[], nullable
  - `opt_out_of_all_on_channels` NotificationChannelsEnum[], nullable

## Response `200`

Successful Response

- NotificationUserPreferences1
  - `schema_version` 1, required
  - `user_id` string, required — Must be a string starting with `user_`
  - `created_at_timestamp` string, date-time, required
  - `last_edited_at_timestamp` string, date-time, required
  - `email_events` NotificationEventsForUsersEnum[]
  - `push_events` NotificationEventsForUsersEnum[]
  - `sms_events` NotificationEventsForUsersEnum[]
  - `_id` string, required

## Other responses

- `422` — Validation Error

---

[API](https://skmtc.dev/chrt/apis/chrt-fastapi.md) · [All operations](https://skmtc.dev/chrt/apis/chrt-fastapi/llms.txt) · [OpenAPI document](https://skmtc-service-production.skmtc.workers.dev/v1/apis/chrt/chrt-fastapi/revisions/ea04e157edb3/schema)
