Create an accounting account
Scope: accounting:chart-of-accounts.write https://api.alladdin.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 prefix integer required
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.
number integer | null optional
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.
name string required
Display name for the accounting account
description string | null optional
Optional description of the account purpose
color string | null optional
Hex color code for UI display
Request
import requests
url = "https://api.alladdin.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
{
"id": "507f1f77bcf86cd799439011"
}Success responses
201 Accounting account created application/json object id string
Error responses
400 Bad request application/json 401 Invalid or missing API key application/json 403 Insufficient permissions application/json 422 Validation error application/json 429 Rate limit exceeded application/json
