---
title: "Update an expense category"
method: PATCH
path: "/expense-categories/{id}"
tags: ["Expense Categories"]
---

# Update an expense category

`PATCH /expense-categories/{id}`

## Request

- Base URL: `https://www.ruddr.io/api/workspace`
- URL: `https://www.ruddr.io/api/workspace/expense-categories/{id}`
- Auth: HTTP bearer

## Path parameters

- `id` string, required

## Request body

- object
  - `name` string: The name of the expense category. Max 255 characters.
  - `invoiceItemId` string: The ID of the invoice item to assign to this expense category. The invoice item must be of type `expense`.
  - `isActive` boolean: Whether the expense category is active.
  - `requireAttendees` boolean: Whether expenses using this category require attendees.
  - `requireReceipt` boolean: Whether expenses using this category require a receipt.
  - `requireNotes` boolean: Whether expenses using this category require notes.
  - `unitName` string: For unit-based expense categories, the label of the unit (e.g., `"mile"`). Max 255 characters. Must be provided together with `unitAmount`.
  - `unitAmount` number: For unit-based expense categories, the amount per unit (e.g., `0.655`). Must be provided together with `unitName`.
  - `code` string: The code of the expense category. Max 255 characters.

## Response `200`

200

- ExpenseCategory
  - `id` string: The unique identifier for the object.
  - `name` string: The name of the expense category.
  - `isActive` boolean: Whether the expense category is active.
  - `requireAttendees` boolean: Whether expenses using this category require attendees.
  - `requireReceipt` boolean: Whether expenses using this category require a receipt.
  - `requireNotes` boolean: Whether expenses using this category require notes.
  - `unitName` string, nullable: For unit-based expense categories, the label of the unit (e.g., `"mile"`). `null` if the category is not unit-based.
  - `unitAmount` number, nullable: For unit-based expense categories, the amount per unit (e.g., `0.655`). `null` if the category is not unit-based.
  - `code` string, nullable: The code of the expense category.
  - `createdAt` string, date-time: The timestamp when the object was created.
  - `invoiceItem` object: The invoice item associated with this expense category.
    - `id` string: The unique identifier for the object.
    - `name` string: The name of the invoice item.

## Other responses

- `400`: 400
- `404`: 404
- `409`: 409

---

[API](https://skmtc.dev/ruddr/apis/ruddr-api.md) · [All operations](https://skmtc.dev/ruddr/apis/ruddr-api/llms.txt) · [OpenAPI document](https://skmtc.dev/ruddr/apis/ruddr-api/revisions/01c3f2a969ba?raw)
