---
title: "Update user preference"
method: PUT
path: "/{WSID}/{version}/subscriptions/preference"
tags: ["Manage User Subscriptions & Preferences"]
---

# Update user preference

`PUT /{WSID}/{version}/subscriptions/preference`

This API enables you to update the channel preference of a user for multiple subscription topics. In the JSON payload, enter the subscription ID as keys to update the channel preference. To update the user preference for all subscription topics at once (global preference), use 'all' instead of the subscription id.

**Note:** If the channel configuration for a subscription topic is set to 'required', then the user preference for the channel cannot be updated.

## Path parameters

- `WSID` string, required
- `version` 'live' | 'test', required

## Query parameters

- `distinct_id` string, required

## Request body

- UpdateSubscriptionMultiple
  - `user_preference` object, required
    - `SXXXXXXXXX` PreferenceChannels
      - `discord` 'opted-out' | 'opted-in'
      - `email` 'opted-out' | 'opted-in'
      - `inapp` 'opted-out' | 'opted-in'
      - `push` 'opted-out' | 'opted-in'
      - `slack` 'opted-out' | 'opted-in'
      - `sms` 'opted-out' | 'opted-in'
      - `teams` 'opted-out' | 'opted-in'
      - `voice` 'opted-out' | 'opted-in'
      - `webpush` 'opted-out' | 'opted-in'
      - `whatsapp` 'opted-out' | 'opted-in'

## Response `200`

Subscription updated successfully

- object
  - `SXXXXXXXXX` PreferenceChannels, required
    - `discord` 'opted-out' | 'opted-in'
    - `email` 'opted-out' | 'opted-in'
    - `inapp` 'opted-out' | 'opted-in'
    - `push` 'opted-out' | 'opted-in'
    - `slack` 'opted-out' | 'opted-in'
    - `sms` 'opted-out' | 'opted-in'
    - `teams` 'opted-out' | 'opted-in'
    - `voice` 'opted-out' | 'opted-in'
    - `webpush` 'opted-out' | 'opted-in'
    - `whatsapp` 'opted-out' | 'opted-in'

## Other responses

- `400` — Distinct ID, channel, or status is not provided
- `401` — API Key or Workspace ID is invalid. User is unauthorised.

---

[API](https://skmtc.net/fynoio/apis/fyno-rest-api.md) · [All operations](https://skmtc.net/fynoio/apis/fyno-rest-api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/fynoio/fyno-rest-api/versions/021088e9cb30/schema)
