---
title: "Update an accounting dimension"
method: PATCH
path: "/v2/accounting/dimensions/{dimensionKey}"
---

# Update an accounting dimension

`PATCH /v2/accounting/dimensions/{dimensionKey}`

## Request

- Base URL: `https://api.slash.com`
- URL: `https://api.slash.com/v2/accounting/dimensions/{dimensionKey}`
- Auth: API key in header `X-API-Key`

Turn a dimension on or off, rename it, or set the default value new entries are coded with. Required dimensions can't be turned off, and neither they nor `account` can be renamed.

## Request body

- AccountingDimensionUpdate: Switch a dimension on or off for coding, rename it, or set the value new entries are coded with. Provide any combination of `enabled`, `name` and `defaultValueId`; omitted fields keep their current value.
  - `connectionId` string: The connection the dimension belongs to. Optional when the legal entity has exactly one connection; required when it has several.
  - `enabled` boolean: Whether line items can be coded on this dimension. `required` dimensions cannot be disabled.
  - `name` string: New display name, shown in the dashboard. `required` dimensions and `account` cannot be renamed, and `Account` is reserved as a name.
  - `defaultValueId` string, nullable: The value entries are coded with when nothing else applies, or `null` to stop defaulting. Must be an enabled value of this dimension; disabling that value later clears the default. `custom_field` dimensions take no default.

## Response `200`

The dimension as updated.

- AccountingDimension: One axis a line item can be coded on: the general-ledger account, a vendor, a class, a custom field, and so on. Which dimensions exist depends on the connection's platform and settings. Every dimension has values, listed at `GET /v2/accounting/dimensions/{dimensionKey}/values`.
  - `key` string, required: Stable identifier used in every other accounting endpoint. Platform dimensions use fixed keys (`account`, `vendor`, `customer`, `class`, `department`, `location`, `project`, `subsidiary`); custom fields use `customField:` followed by the field's key; generic dimensions use the key defined on the connection.
  - `connectionId` string, required: The connection this dimension belongs to.
  - `name` string, required: Display name shown in the dashboard.
  - `type` 'platform' | 'generic' | 'custom_field', required: `platform` dimensions are the platform's own objects and their values carry that object's id prefix (`accounting_account_`, `accounting_vendor_`, ...). `generic` dimensions are stored on the connection itself and their values use the `acc_dim_val_` prefix. `custom_field` dimensions are platform custom fields exposed through the same interface; their values are the field's options, each identified by the option value itself.
  - `parentKey` string: Key of the dimension whose value narrows this one, when the platform nests dimensions (for example `cost_code` under `project` on Procore). Values can then be filtered by `parentValueId`. Hierarchies inside a single dimension, such as sub-accounts or sub-classes, are not nesting: those values report their parent in `metadata.parentExternalId`.
  - `required` boolean, required: Every editable line item must carry a value for this dimension before the entry can sync.
  - `mappable` boolean, required: Whether accounting rules can set this dimension automatically.
  - `enabled` boolean, required: Whether the dimension is switched on for coding. Disabled dimensions are still listed so you can recognize keys that appear on older entries.
  - `defaultValueId` string: The value new line items receive when none is provided.
  - `customField` object: Present on `custom_field` dimensions. Custom fields are not coded with value ids: their raw values live in `customFields` on the entry (for `entry` level fields) or on each line item (for `line_item` level fields), keyed by `fieldKey`. `select` and `multiselect` fields list their allowed options as this dimension's values.
    - `fieldKey` string, required: The key to use in `customFields`.
    - `fieldType` 'boolean' | 'select' | 'string' | 'number' | 'multiselect', required: The type of value the field accepts.
    - `level` 'entry' | 'line_item', required: Whether the value is set once per entry or per line item.

## Other responses

- `400`: - `connection_id_required` — The legal entity has several accounting connections, so the request must say which one with `connectionId`. List them with `GET /v2/accounting/connections`. - `custom_field_options_read_only` — Custom field options are defined on the accounting platform, so they cannot be turned on or off or set as a default here. Change them there and resync the connection. - `dimension_name_reserved` — The name belongs to a built-in dimension. - `dimension_not_renamable` — Required dimensions and `account` keep the name the connection gives them. Any other optional dimension can be renamed. - `dimension_required` — Required dimensions are always on. - `dimension_value_disabled` — The value is turned off for coding. Turn it on with `PATCH /v2/accounting/dimensions/{dimensionKey}/values/{valueId}`. - `invalid_request (request shape)` — The body, query, or headers failed validation, or a required header is missing. `details` has one entry per failing location, keyed by JSON pointer or header name.
- `401`: - `unauthorized` — API key authentication is missing or invalid.
- `403`: - `forbidden` — The credential is not permitted to perform this action on the resource. When the resource is a field of the request, `details` names that `field` and the `id` it received. - `forbidden (legal entity)` — The credential is not permitted to act for the selected legal entity. - `not_available` — Public API v2 is not yet available. Use [Public API v1](https://docs.slash.com/introduction) in the meantime. - `user_api_key_required` — The API key is scoped to a legal entity rather than a user. Every v2 request needs a user API key, created under Settings → API keys in the Slash dashboard, together with the `x-legal-entity` header.
- `404`: - `not_found` — No resource matches the identifier. When the identifier is a field of the request, `details` names that `field` and the `id` it received.
- `429`: The request exceeded the applicable rate limit. The response body is plain text, not the error object; clients must not depend on its wording.
- `500`: - `internal` — Slash could not complete the request. Quote `referenceId` when contacting Slash support.

## Changes

- **2026-10-16** `8b5d371ffeea`: 1 info
  - endpoint added

[Operation history](https://skmtc.dev/slashfi/apis/slash-public-api/changes/v2/accounting/dimensions/:dimensionKey/patch.md)

---

[API](https://skmtc.dev/slashfi/apis/slash-public-api.md) - [All operations](https://skmtc.dev/slashfi/apis/slash-public-api/llms.txt) - [OpenAPI document](https://skmtc.dev/slashfi/apis/slash-public-api/revisions/eaed2d63c9e2?raw)
