---
title: "Create or run companies chart of accounts"
method: POST
path: "/accountant/companies/{customerId}/chart-of-accounts"
tags: ["Accountant Portal"]
---

# Create or run companies chart of accounts

`POST /accountant/companies/{customerId}/chart-of-accounts`

## Request

- Base URL: `https://api.medianfi.com/api/v1`
- URL: `https://api.medianfi.com/api/v1/accountant/companies/{customerId}/chart-of-accounts`
- Auth: one of:
  - HTTP bearer
  - API key in header `X-API-Key`

Generated minimal contract (#1940): parameters, auth, and status codes are authoritative; see the route handler for the exact body/response shape. Enrichment tracked by the x-median-spec-stage marker. Service-principal access reviewed 2026-09-10 (#1982).

## Request body

- object

## Response `200`

Exact replay (#2883): an active account with the same code, name, type, detail type, subtype, parent and normal balance already exists; it is returned and nothing is written

- object

## Other responses

- `201`: GL account created, audited with the acting accountant
- `401`: Authentication required
- `403`: Insufficient permissions or not a company member
- `404`: Resource not found
- `409`: Account code already exists with different fields (GL_ACCOUNT_CODE_CONFLICT) or belongs to a retired account (GL_ACCOUNT_CODE_RETIRED)

---

[API](https://skmtc.dev/medianfi/apis/median-api.md) · [All operations](https://skmtc.dev/medianfi/apis/median-api/llms.txt) · [OpenAPI document](https://skmtc.dev/medianfi/apis/median-api/revisions/20090ea32b0d?raw)
