---
title: "Set a user preference"
method: PUT
path: "/api/preferences/{key}"
tags: ["Preferences"]
---

# Set a user preference

`PUT /api/preferences/{key}`

Set a user preference. Replaces the target resource or assignment with the supplied JSON representation.

## Request body

- SetPreferenceRequest — set Preference Request payload accepted by the API.
  - `value` string, required — value value for the set Preference Request object.

## Response `200`

Preference value

- PreferenceResponse — preference Response payload returned by the API.
  - `key` string, required — key value for the preference Response object.
  - `value` string, required — value value for the preference Response object.
  - `updatedAt` string — Time when the preference was last updated.

## Other responses

- `default` — Error response

---

[API](https://skmtc.dev/ibuildthecloud/apis/discobot-server-api.md) · [All operations](https://skmtc.dev/ibuildthecloud/apis/discobot-server-api/llms.txt) · [OpenAPI document](https://skmtc-service-production.skmtc.workers.dev/v1/apis/ibuildthecloud/discobot-server-api/revisions/4de3fcd6be56/schema)
