---
title: "Set a preference"
method: PUT
path: "/users/me/preferences/{key}"
tags: ["Users"]
---

# Set a preference

`PUT /users/me/preferences/{key}`

## Request

- Base URL: `https://api.production.yourmedley.com`
- URL: `https://api.production.yourmedley.com/users/me/preferences/{key}`
- Auth: HTTP bearer

Create or update a preference for the authenticated user

## Path parameters

- `key` string, required

## Request body

- object
  - `value` unknown, required

## Response `200`

Preference saved successfully

- object
  - `success` boolean
  - `data` unknown

## Other responses

- `400`: Bad request - value is required
- `401`: Unauthorized

---

[API](https://skmtc.dev/withmedley/apis/medley-api.md) - [All operations](https://skmtc.dev/withmedley/apis/medley-api/llms.txt) - [OpenAPI document](https://skmtc.dev/withmedley/apis/medley-api/revisions/40aaac5ca6bd?raw)
