---
title: "Update or Create user preferences for a specific subscription topic"
method: PUT
path: "/users/{user_id}/preferences/{topic_id}"
tags: ["User Preferences"]
---

# Update or Create user preferences for a specific subscription topic

`PUT /users/{user_id}/preferences/{topic_id}`

Sets a user's opt-in status and channel choices for one subscription topic, overriding the tenant default for that topic only.

## Path parameters

- `user_id` string, required
- `topic_id` string, required

## Query parameters

- `tenant_id` string, nullable

## Request body

- object
  - `topic` UsersTopicPreferenceUpdate, required
    - `status` 'OPTED_IN' | 'OPTED_OUT' | 'REQUIRED', required
    - `custom_routing` ChannelClassification[], nullable — The channels to deliver this topic on when has_custom_routing is true. One or more of: direct_message, email, push, sms, webhook, inbox.
    - `has_custom_routing` boolean, nullable — Set to true to route this topic to the channels in custom_routing instead of the topic's default routing.

## Response `200`

- UsersUserPreferencesUpdateResponse
  - `message` string, required

## Other responses

- `400`

---

[API](https://skmtc.net/trycourier/apis/courier.md) · [All operations](https://skmtc.net/trycourier/apis/courier/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/trycourier/courier/versions/04f69fbf96a5/schema)
