Skip to main content
POST

Create an accounting account

Scope:accounting:chart-of-accounts.write
https://api.holded.com/api/v2/accounting-accounts

Creates a new accounting account in your chart of accounts. Accounting accounts categorize financial transactions for reporting and comply with your country's accounting plan. The response returns the new account `id`. Provide `number` to assign a specific account number. Provide `prefix` alone to auto-assign the next available number within that group. **AI assistant note:** `prefix` is the chart-of-accounts GROUP code (1–4 digits), NOT the full account number. To create an account with a specific number, use the `number` field and set `prefix` to the group it belongs to (the leading digits of the number, e.g. for number 70000013 use prefix 7000).

Request body

object
prefixintegerrequired

Chart-of-accounts group code (1–4 digits). The full account number is auto-assigned within this group when `number` is absent. Must be 1–4 digits.

numberinteger | nulloptional

Exact account number to assign (e.g. 70000013). Must start with `prefix`. When provided the number is used as-is and must be unique; otherwise the next available number in the group is assigned.

namestringrequired

Display name for the accounting account

descriptionstring | nulloptional

Optional description of the account purpose

colorstring | nulloptional

Hex color code for UI display

Request

python
import requests

url = "https://api.holded.com/api/v2/accounting-accounts"
headers = {
    "Authorization": "Bearer YOUR_API_KEY",
    "Accept": "application/json",
}

payload = {
    "prefix": 0,
    "number": 0,
    "name": "string",
    "description": "string",
    "color": "string"
}
response = requests.post(url, headers=headers, json=payload)
print(response.json())

Responses

Response

json
{
  "id": "507f1f77bcf86cd799439011"
}

Success responses

201Accounting account createdapplication/json
object
idstring

Error responses

400Bad requestapplication/json
401Invalid or missing API keyapplication/json
403Insufficient permissionsapplication/json
422Validation errorapplication/json
429Rate limit exceededapplication/json