---
title: "Update a custom column"
method: PATCH
path: "/v1/custom_columns/{custom_column_id}"
tags: ["Custom column"]
---

# Update a custom column

`PATCH /v1/custom_columns/{custom_column_id}`

## Request

- Base URL: `https://api.cardda.com`
- URL: `https://api.cardda.com/v1/custom_columns/{custom_column_id}`
- Auth: HTTP bearer

Updates a custom column. The caller must be a member of the company that owns the column.
All fields are optional; only the provided fields are changed.

## Path parameters

- `custom_column_id` string, uuid, required

## Headers

- `company-id` string, uuid, required

## Request body

- CustomColumnUpdate: Payload to update a custom column. All fields are optional; only the provided fields are changed. The caller must be a member of the company that owns the column.
  - `label` string
  - `internal_name` string
  - `field` string
  - `source_table` string
  - `default_value` string
  - `applicable_models` string[]
  - `options` object[]
    - `key` string
    - `value` string
  - `required_on_purchase_orders` boolean: Whether a purchase order cannot be requested without this column. Only valid on a column whose `applicable_models` include `purchase_orders` (422 otherwise); removing `purchase_orders` from them later switches it off. Only honoured when the caller has `custom_columns_manage`: without it, it is silently dropped. Applies on create (the order must be born with a value) and on edit (a value cannot be emptied); orders that already existed are not changed. Omit it to keep the current value; `null` is rejected with a 422 (it must be `true` or `false`).

## Response `200`

Custom column updated

- CustomColumn: A custom column definition — a company-configurable field ("rendición" / expense-tracking metadata) that can be attached to transactions and other applicable models. Values are stored per record and surfaced through `custom_column_values`.
  - `id` string, uuid, required
  - `company_id` string, uuid, required
  - `label` string: Human-facing label shown in the UI.
  - `internal_name` string, nullable: Internal name used for programmatic references.
  - `field` string: The field/input type of the column. `options` drives a select-style column with a fixed set of choices.
  - `source_table` string, nullable: The source table the column reads from, when applicable.
  - `default_value` string, nullable: Default value applied when no value is set.
  - `applicable_models` string[]: The models this column applies to (e.g. `transactions`, `card_transactions`, `payables`).
  - `options` object[]: For option-type columns, the allowed key/value choices.
    - `key` string
    - `value` string
  - `required_on_purchase_orders` boolean: Whether a purchase order cannot be requested without this column. Only valid on a column whose `applicable_models` include `purchase_orders` (422 otherwise); removing `purchase_orders` from them later switches it off. Only honoured when the caller has `custom_columns_manage`: without it, it is silently dropped. Applies on create (the order must be born with a value) and on edit (a value cannot be emptied); orders that already existed are not changed.
  - `created_at` string, date-time
  - `updated_at` string, date-time

## Other responses

- `401`: Unauthorized
- `404`: Custom column not found
- `422`: Validation error

---

[API](https://skmtc.dev/cardda/apis/accounting-api.md) - [All operations](https://skmtc.dev/cardda/apis/accounting-api/llms.txt) - [OpenAPI document](https://skmtc.dev/cardda/apis/accounting-api/revisions/49cf78d0f7ab?raw)
