---
title: "Update existing category."
method: PUT
path: "/v1/categories/{id}"
tags: ["categories"]
---

# Update existing category.

`PUT /v1/categories/{id}`

## Request

- Base URL: `https://demo.firefly-iii.org/api`
- URL: `https://demo.firefly-iii.org/api/v1/categories/{id}`
- 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 existing category.

## Path parameters

- `id` string, required

## Headers

- `X-Trace-Id` string, uuid

## Request body

- CategoryUpdate
  - `name` string, string, required
  - `notes` string, string, nullable

## Response `200`

Updated category stored, result in response

- CategorySingle
  - `data` CategoryRead, required
    - `type` string, string, required: Immutable value
    - `id` string, string, required
    - `attributes` CategoryProperties, required
      - `created_at` string, date-time
      - `updated_at` string, date-time
      - `name` string, string, required
      - `notes` string, string, nullable
      - `object_has_currency_setting` boolean: This object never has its own currency setting, so this value is always false.
      - `primary_currency_id` string, string: The currency ID of the administration's primary currency.
      - `primary_currency_name` string, string: The currency name of the administration's primary currency.
      - `primary_currency_code` string, string: The currency code of the administration's primary currency.
      - `primary_currency_symbol` string, string: The currency symbol of the administration's primary currency.
      - `primary_currency_decimal_places` integer: The currency decimal places of the administration's primary currency.
      - `spent` ArrayEntryWithCurrencyAndSum[]: Amount(s) spent in the currencies in the database for this category. ONLY present when start and date are set.
        - `currency_id` string, string
        - `currency_code` string, string
        - `currency_symbol` string, string
        - `currency_decimal_places` integer: Number of decimals supported by the currency
        - `sum` string, amount: The amount earned, spent or transferred.
      - `pc_spent` ArrayEntryWithCurrencyAndSum[]: Amount(s) spent in the primary currency in the database for this category. ONLY present when start and date are set.
        - `currency_id` string, string
        - `currency_code` string, string
        - `currency_symbol` string, string
        - `currency_decimal_places` integer: Number of decimals supported by the currency
        - `sum` string, amount: The amount earned, spent or transferred.
      - `earned` ArrayEntryWithCurrencyAndSum[]: Amount(s) earned in the currencies in the database for this category. ONLY present when start and date are set.
        - `currency_id` string, string
        - `currency_code` string, string
        - `currency_symbol` string, string
        - `currency_decimal_places` integer: Number of decimals supported by the currency
        - `sum` string, amount: The amount earned, spent or transferred.
      - `pc_earned` ArrayEntryWithCurrencyAndSum[]: Amount(s) earned in the primary currency in the database for this category. ONLY present when start and date are set.
        - `currency_id` string, string
        - `currency_code` string, string
        - `currency_symbol` string, string
        - `currency_decimal_places` integer: Number of decimals supported by the currency
        - `sum` string, amount: The amount earned, spent or transferred.
      - `transferred` ArrayEntryWithCurrencyAndSum[]: Amount(s) transferred in the currencies in the database for this category. ONLY present when start and date are set.
        - `currency_id` string, string
        - `currency_code` string, string
        - `currency_symbol` string, string
        - `currency_decimal_places` integer: Number of decimals supported by the currency
        - `sum` string, amount: The amount earned, spent or transferred.
      - `pc_transferred` ArrayEntryWithCurrencyAndSum[]: Amount(s) transferred in primary currency in the database for this category. ONLY present when start and date are set.
        - `currency_id` string, string
        - `currency_code` string, string
        - `currency_symbol` string, string
        - `currency_decimal_places` integer: Number of decimals supported by the currency
        - `sum` string, amount: The amount earned, spent or transferred.

## 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-4-17.md) - [All operations](https://skmtc.dev/firefly-iii/apis/firefly-iii-api-v6-4-17/llms.txt) - [OpenAPI document](https://skmtc.dev/firefly-iii/apis/firefly-iii-api-v6-4-17/revisions/ea021802490b?raw)
