categories

Store a new category

Creates a new category. The data required can be submitted as a JSON body or as a list of parameters.

post/v1/categories

Request

  • Base URL
    https://demo.firefly-iii.org/api
  • URL
    https://demo.firefly-iii.org/api/v1/categories
  • Auth
    • OAuth 2
      Authorization code: https://demo.firefly-iii.org/oauth/authorize
      Token URL: https://demo.firefly-iii.org/oauth/token
    • or HTTP bearer

Headers

X-Trace-Idstring uuid
Example:40c71bbb-c676-4f24-83cf-cc725d7d7a00

Unique identifier associated with this request.

Request body

namestring string required
notesstring string nullable

Example request

{
  "name": "Lunch",
  "notes": "Some example notes"
}

Response

New category stored, result in response.

Example response

{
  "data": {
    "type": "categories",
    "id": "2",
    "attributes": {
      "created_at": "2026-03-01T00:00:00+00:00",
      "updated_at": "2026-03-01T00:00:00+00:00",
      "name": "Lunch",
      "notes": "Some example notes",
      "primary_currency_id": "5",
      "primary_currency_name": "Euro",
      "primary_currency_code": "EUR",
      "primary_currency_symbol": "$",
      "primary_currency_decimal_places": 2,
      "spent": [
        {
          "currency_id": "5",
          "currency_code": "USD",
          "currency_symbol": "$",
          "currency_decimal_places": 2,
          "sum": "123.45"
        }
      ],
      "pc_spent": [
        {
          "currency_id": "5",
          "currency_code": "USD",
          "currency_symbol": "$",
          "currency_decimal_places": 2,
          "sum": "123.45"
        }
      ],
      "earned": [
        {
          "currency_id": "5",
          "currency_code": "USD",
          "currency_symbol": "$",
          "currency_decimal_places": 2,
          "sum": "123.45"
        }
      ],
      "pc_earned": [
        {
          "currency_id": "5",
          "currency_code": "USD",
          "currency_symbol": "$",
          "currency_decimal_places": 2,
          "sum": "123.45"
        }
      ],
      "transferred": [
        {
          "currency_id": "5",
          "currency_code": "USD",
          "currency_symbol": "$",
          "currency_decimal_places": 2,
          "sum": "123.45"
        }
      ],
      "pc_transferred": [
        {
          "currency_id": "5",
          "currency_code": "USD",
          "currency_symbol": "$",
          "currency_decimal_places": 2,
          "sum": "123.45"
        }
      ]
    }
  }
}

Changes

No recorded changes to this operation across all 1 revision of this API.