Accounts
Accounts are the foundation of your chart of accounts. Each account represents a category for tracking financial activity, such as Cash, Accounts Receivable, or Revenue.
Key Concept: Accounts are the foundation of your chart of accounts in double-entry bookkeeping. Each account tracks financial activity and maintains a running balance through debit/credit entries.
The Account Object
/organizations/:organization_id/accounts{
"id": "act_xxxxxxxxxxxxxxxx",
"object": "account",
"organization_id": "org_xxxxxxxxxxxxxxxx",
"name": "Cash",
"code": "1000",
"type": "asset",
"subtype": "current_asset",
"currency": "USD",
"description": "Primary operating cash account",
"is_active": true,
"parent_id": null,
"balance": {
"debit": 150000.00,
"credit": 50000.00,
"net": 100000.00
},
"created_at": "2024-01-15T10:30:00Z",
"updated_at": "2024-01-20T14:22:00Z"
}
Attributes
| Attribute | Type | Description |
|---|---|---|
id | string | Unique identifier with act_ prefix |
organization_id | string | The organization this account belongs to |
name | string | Display name of the account |
code | string | Account code (e.g., "1000", "4100") |
account_type | enum | One of: asset, liability, equity, revenue, expense |
subtype | string | Optional subtype classification |
currency | string | ISO 4217 currency code |
is_active | boolean | Whether the account is active |
parent_id | string | Parent account ID for hierarchical charts |
balance | object | Current balance with debit, credit, and net amounts |
Common Account Types & Codes:
- Assets: 1000-1999 (Cash: 1000, AR: 1100, Inventory: 1200)
- Liabilities: 2000-2999 (AP: 2000, Loans: 2100)
- Equity: 3000-3999 (Retained Earnings: 3000, Capital: 3100)
- Revenue: 4000-4999 (Sales: 4000, Interest Income: 4100)
- Expenses: 5000-5999 (Office Supplies: 5000, Salaries: 5100)
Create an Account
/organizations/:organization_id/accountsCreates a new account in the chart of accounts.
Authentication Required
This endpoint requires authentication. Include your API key in the Authorization header:
Authorization: Bearer YOUR_API_KEY
Path Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
organization_id | string | Yes | The organization ID |
Request Body
| Parameter | Type | Required | Description |
|---|---|---|---|
name | string | Yes | Display name of the account |
code | string | Yes | Unique account code (numeric, e.g. "1000") |
account_type | enum | Yes | Account type: asset, liability, equity, revenue, expense. Also accepted as type. |
currency_id | string | No | Currency ID (defaults to org default) |
description | string | No | Account description |
parent_account_id | string | No | Parent account for hierarchy |
Response
{
"id": "act_xxxxxxxxxxxxxxxx",
"object": "account",
"name": "Cash",
"code": "1000",
"type": "asset",
"is_active": true,
"created_at": "2024-01-15T10:30:00Z"
}
Retrieve an Account
/organizations/:organization_id/accounts/:idRetrieves the details of an existing account.
Update an Account
/organizations/:organization_id/accounts/:idUpdates the specified account by setting the values of the parameters passed.
Request Body
| Parameter | Type | Description |
|---|---|---|
name | string | Display name |
description | string | Account description |
is_active | boolean | Active status |
List All Accounts
/organizations/:organization_id/accountsReturns a list of accounts. The accounts are returned sorted by code.
Query Parameters
| Parameter | Type | Description |
|---|---|---|
account_type | enum | Filter by account type (asset, liability, equity, revenue, expense) |
status | enum | Filter by status (active, inactive, suspended) |
limit | integer | Number of results (default: 100, max: 100) |
offset | integer | Pagination offset (default: 0) |
Response
{
"object": "list",
"data": [
{
"id": "act_xxx",
"name": "Cash",
"code": "1000",
"type": "asset",
"balance": { "net": 100000.00 }
},
{
"id": "act_yyy",
"name": "Accounts Receivable",
"code": "1100",
"type": "asset",
"balance": { "net": 25000.00 }
}
],
"has_more": true,
"total_count": 45
}
Get Account Balance
/organizations/:organization_id/accounts/:id/balanceReturns the current balance for an account, optionally at a specific point in time.
Query Parameters
| Parameter | Type | Description |
|---|---|---|
as_of | datetime | Balance as of this date/time |
currency | string | Convert balance to this currency |
Response
{
"account_id": "act_xxxxxxxxxxxxxxxx",
"as_of": "2024-01-31T23:59:59Z",
"balance": {
"debit": "150000.00",
"credit": "50000.00",
"net": "100000.00"
},
"currency": "USD"
}
Get Account Transactions
/organizations/:organization_id/accounts/:id/transactionsReturns a list of transactions that affected the specified account, showing how the account balance changed over time.
Path Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
organization_id | string | Yes | The organization ID |
id | string | Yes | The account ID |
Query Parameters
| Parameter | Type | Description |
|---|---|---|
from_date | date | Start date for transaction history |
to_date | date | End date for transaction history |
limit | integer | Number of transactions (default: 20, max: 100) |
offset | integer | Pagination offset |
Response
{
"account_id": "act_xxxxxxxxxxxxxxxx",
"transactions": [
{
"transaction_id": "txn_xxxxxxxxxxxxxxxx",
"date": "2024-01-15",
"description": "Office Supplies Purchase",
"debit": "500.00",
"credit": "0.00",
"balance": "99500.00"
},
{
"transaction_id": "txn_yyyyyyyyyyyyyyyy",
"date": "2024-01-20",
"description": "Client Payment Received",
"debit": "0.00",
"credit": "2500.00",
"balance": "102000.00"
}
],
"has_more": false,
"total_count": 2
}
Delete an Account
/organizations/:organization_id/accounts/:idDeletes an account if it has no associated transactions. This operation cannot be undone.
Path Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
organization_id | string | Yes | The organization ID |
id | string | Yes | The account ID |
Response
{
"id": "act_xxxxxxxxxxxxxxxx",
"deleted": true
}
Deletion Restrictions
Accounts can only be deleted if they have no associated transactions. If an account has transaction history, it must be marked as inactive instead of deleted for audit and compliance purposes.
Need help?
Create a free account to access our support portal. Once signed in, use the Support tab in your dashboard to submit a support ticket — our team typically responds within 24 hours.
- ✨ For LLMs/AI assistants: Read our structured API reference