---
title: "Update User Full Preference"
method: PATCH
path: "/v1/user/{distinct_id}/preference/"
---

# Update User Full Preference

`PATCH /v1/user/{distinct_id}/preference/`

API to update user preferences across all channels and categories with translated names and descriptions in the response.

## Path parameters

- `distinct_id` string, required

## Query parameters

- `tenant_id` string

## Request body

- object
  - `channel_preferences` object[] — Use this to update channel level user preferences. Set `is_restricted - true` if the channel is opted_out by the user. This will only send critical notifications to the user which can't be opted out
    - `channel` string — Add channel as `email`, `inbox`, `sms`, `whatsapp`, `androidpush`, `slack`, `iospush`, `webpush`
    - `is_restricted` boolean — set `is_restricted = true` if user wants to receive notification in mandatory categories on this channel. Mandatory categories are `can't unsubscribe` categories and the above channel is added as `mandatory channel` in that category
  - `categories` object[] — Use this to update user preference across categories and channels inside a category.
    - `category` string — notification category slug
    - `preference` 'opt_in' | 'opt_out' — set `opt_in` to turn on notifications on all or selected channels, `opt_out` to turn-off notifications
    - `opt_out_channels` string[] — List of channels to opt-out from this category. Only applicable when preference is `opt_in`
    - `opt_in_channels` string[] — List of channels to opt-in for this category. Only applicable when preference is `opt_in`
    - `digest_schedule` object, nullable — User's preferred digest schedule for this category. Set to `null` to fall back to tenant's default.
      - `id` string — ID of the selected digest schedule option
      - `time` string — Override time if applicable and edit_policy is `editable`. Format: HH:MM
      - `dtstart` string, date-time — Override start date if applicable and edit_policy is `editable`
      - `weekdays` string[] — Override weekdays if applicable and edit_policy is `editable`
      - `monthdays` object[] — Override monthdays if applicable and edit_policy is `editable`
        - `pos` integer
        - `day` string
    - `properties` object[] — Override values for category condition properties. Only properties with edit_policy `editable` can be overridden.
      - `key` string — Property key identifier
      - `value` unknown

## Response `200`

200

- object
  - `sections` object[]
    - `name` string, nullable
    - `slug` string, nullable
    - `description` string, nullable
    - `tags` string[], nullable
    - `subcategories` object[]
      - `name` string
      - `category` string
      - `description` string, nullable
      - `tags` string[], nullable
      - `effective_tags` string[], nullable
      - `original_preference` 'opt_in' | 'opt_out' | 'cant_unsubscribe', nullable
      - `preference` 'opt_in' | 'opt_out' | 'cant_unsubscribe'
      - `is_editable` boolean
      - `channels` object[]
        - `channel` string
        - `preference` 'opt_in' | 'opt_out'
        - `is_editable` boolean
  - `channel_preferences` object[]
    - `channel` string
    - `is_restricted` boolean

## Other responses

- `404` — 404

---

[API](https://skmtc.net/suprsend/apis/suprsend-api.md) · [All operations](https://skmtc.net/suprsend/apis/suprsend-api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/suprsend/suprsend-api/versions/8bd2574bd2c3/schema)
