---
title: "Update accounting account"
method: PATCH
path: "/accountingaccounts/{companyId}/{accountingCode}"
tags: ["AccountingAccounts"]
---

# Update accounting account

`PATCH /accountingaccounts/{companyId}/{accountingCode}`

Updates the active status, type, name, collective flag, additional info or attributes of an accounting account identified by `accountingCode`. Updating an `accountingCode` that does not match any existing account returns `200` without creating or changing anything — no `404` is raised. Sending an empty `additionalInfo` object leaves any previously stored metadata unchanged. Entries in `attributes` with an empty or missing `customId` or `value` are silently discarded.

## Path parameters

- `accountingCode` string, required
- `companyId` string, required

## Request body

- PatchAccountingsAccountsRequestSchema
  - `active` boolean, nullable — Whether the accounting account is active.
  - `type` 'banks' | 'analytics' | 'accountings'
  - `accountingName` string, nullable — Display name of the accounting account.
  - `collective` boolean, nullable — Whether this is a collective (grouping) accounting account rather than an individual one.
  - `additionalInfo` object, nullable — Free-form key/value metadata to attach to the account. Sending an empty object leaves any previously stored metadata unchanged instead of clearing it.
  - `attributes` AttributeValueRequestACCOUNTSchema[], nullable — Custom attribute values to attach to the account. Entries with an empty or missing `customId` or `value` are silently discarded.
    - `customId` string, nullable — Custom ID of the attribute definition this value belongs to. Entries missing `customId` or `value` are silently discarded.
    - `value` string, nullable — Value assigned to the attribute.
    - `valueCustomId` string, nullable — Custom ID of the selected option, for list-type attributes.

## Response `200`

Successful Response

- UpsertAccountingsAccountsResponseSchema
  - `id` string, required — Embat resource ID
  - `accountingCode` string, required — Client-provided accounting code.

## Other responses

- `401` — Unauthorized. The bearer token is missing, invalid or expired.
- `404` — Not found. The requested resource or `companyId` does not exist.
- `422` — Validation Error
- `500` — Unexpected error. Contact support if it persists.

---

[API](https://skmtc.net/embat/apis/embat-api.md) · [All operations](https://skmtc.net/embat/apis/embat-api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/embat/embat-api/versions/36ca48bf4489/schema)
