---
title: "Update preference"
method: PUT
path: "/v1/preferences/{name}"
tags: ["preferences"]
---

# Update preference

`PUT /v1/preferences/{name}`

## Request

- Base URL: `https://demo.firefly-iii.org/api`
- URL: `https://demo.firefly-iii.org/api/v1/preferences/{name}`
- Auth: one of:
  - OAuth 2
    - Authorization code: `https://demo.firefly-iii.org/oauth/authorize`
    - Token URL: `https://demo.firefly-iii.org/oauth/token`
  - HTTP bearer

Update a user's preference.

## Path parameters

- `name` string, string, required

## Headers

- `X-Trace-Id` string, uuid

## Request body

- PreferenceUpdate
  - `data` union, required
    - boolean
    - string
    - object
    - StringArrayItem[]

## Response `200`

Updated preference.

- PreferenceSingle
  - `data` PreferenceRead, required
    - `type` string, string, required: Immutable value
    - `id` string, string, required
    - `attributes` Preference, required
      - `created_at` string, date-time
      - `updated_at` string, date-time
      - `name` string, string, required
      - `data` union, required
        - boolean
        - string
        - object
        - StringArrayItem[]

## Other responses

- `400`: Bad request
- `401`: Unauthenticated
- `404`: Page not found
- `422`: Validation error. The body will have the exact details.
- `500`: Internal exception

---

[API](https://skmtc.dev/firefly-iii/apis/firefly-iii-api-v6-3-0-beta-2.md) - [All operations](https://skmtc.dev/firefly-iii/apis/firefly-iii-api-v6-3-0-beta-2/llms.txt) - [OpenAPI document](https://skmtc.dev/firefly-iii/apis/firefly-iii-api-v6-3-0-beta-2/revisions/a5f6f8195556?raw)
