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

GET/organizations/:organization_id/accounts
Auth required
{
  "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

AttributeTypeDescription
idstringUnique identifier with act_ prefix
organization_idstringThe organization this account belongs to
namestringDisplay name of the account
codestringAccount code (e.g., "1000", "4100")
account_typeenumOne of: asset, liability, equity, revenue, expense
subtypestringOptional subtype classification
currencystringISO 4217 currency code
is_activebooleanWhether the account is active
parent_idstringParent account ID for hierarchical charts
balanceobjectCurrent 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

POST/organizations/:organization_id/accounts
Auth required
1 credits

Creates 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

ParameterTypeRequiredDescription
organization_idstringYesThe organization ID

Request Body

ParameterTypeRequiredDescription
namestringYesDisplay name of the account
codestringYesUnique account code (numeric, e.g. "1000")
account_typeenumYesAccount type: asset, liability, equity, revenue, expense. Also accepted as type.
currency_idstringNoCurrency ID (defaults to org default)
descriptionstringNoAccount description
parent_account_idstringNoParent 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

GET/organizations/:organization_id/accounts/:id
Auth required

Retrieves the details of an existing account.


Update an Account

PUT/organizations/:organization_id/accounts/:id
Auth required
1 credits

Updates the specified account by setting the values of the parameters passed.

Request Body

ParameterTypeDescription
namestringDisplay name
descriptionstringAccount description
is_activebooleanActive status

List All Accounts

GET/organizations/:organization_id/accounts
Auth required

Returns a list of accounts. The accounts are returned sorted by code.

Query Parameters

ParameterTypeDescription
account_typeenumFilter by account type (asset, liability, equity, revenue, expense)
statusenumFilter by status (active, inactive, suspended)
limitintegerNumber of results (default: 100, max: 100)
offsetintegerPagination 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

GET/organizations/:organization_id/accounts/:id/balance
Auth required

Returns the current balance for an account, optionally at a specific point in time.

Query Parameters

ParameterTypeDescription
as_ofdatetimeBalance as of this date/time
currencystringConvert 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

GET/organizations/:organization_id/accounts/:id/transactions
Auth required

Returns a list of transactions that affected the specified account, showing how the account balance changed over time.

Path Parameters

ParameterTypeRequiredDescription
organization_idstringYesThe organization ID
idstringYesThe account ID

Query Parameters

ParameterTypeDescription
from_datedateStart date for transaction history
to_datedateEnd date for transaction history
limitintegerNumber of transactions (default: 20, max: 100)
offsetintegerPagination 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

DELETE/organizations/:organization_id/accounts/:id
Auth required
1 credits

Deletes an account if it has no associated transactions. This operation cannot be undone.

Path Parameters

ParameterTypeRequiredDescription
organization_idstringYesThe organization ID
idstringYesThe 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.