Skip to main content
POST
/
v1
/
platform
/
businesses
/
{business_id}
/
general-ledger
/
chart-of-accounts
Create account
curl --request POST \
  --url https://sandbox.thredfi.com/v1/platform/businesses/{business_id}/general-ledger/chart-of-accounts/ \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "code": "<string>",
  "name": "<string>",
  "account_type": "asset",
  "account_subtype": "current_assets",
  "parent_id": "<string>",
  "description": "<string>",
  "external_id": "<string>",
  "institution_name": "<string>",
  "iban": "<string>",
  "sort_code": "<string>",
  "account_number_mask": "<string>",
  "balance_behavior": "",
  "is_cash_account": false,
  "is_non_cash_expense": false,
  "custom_fields": "<unknown>"
}
'
{
  "id": "234567ab-cdef-4567-8901-234567890123",
  "code": "1100",
  "name": "Business Bank Account",
  "currency": "GBP",
  "account_type": "asset",
  "account_type_display": "Asset",
  "account_subtype": "current_assets",
  "account_subtype_display": "Current Assets",
  "parent_account_code": null,
  "current_balance": 1250050,
  "current_balance_formatted": "£12,500.50",
  "debit_balance": 1500000,
  "credit_balance": 249950,
  "has_children": true,
  "hierarchy_level": 0,
  "is_active": true,
  "description": "Primary operating bank account for daily transactions",
  "institution_name": "Barclays Bank PLC",
  "iban": "GB29BUKB20201555555555",
  "sort_code": "20-20-15",
  "account_number_mask": "****5555",
  "total_debits": 234,
  "total_credits": 189,
  "last_entry_date": "2024-03-28T14:30:00Z",
  "last_entry_reference": "JE-2024-0042",
  "sub_accounts": []
}

Documentation Index

Fetch the complete documentation index at: https://docs.thredfi.com/llms.txt

Use this file to discover all available pages before exploring further.

Authorizations

Authorization
string
header
required

Partner-level JWT token (unscoped). Token payload includes partner_id. Business access is validated via partner ownership. Format: Bearer <your-jwt-token>

Use this for: Multi-business operations where the business_id is specified in the URL and partner has access to multiple businesses.

Path Parameters

business_id
string
required
Pattern: ^[0-9a-f-]+$

Body

Serializer for creating accounts via the Chart of Accounts API.

Supports flexible parent identification (UUID, code, or external_id). Implements idempotency via external_id field.

code
string
required

Unique account code within business (e.g., '1000', 'REV-SALES')

Required string length: 1 - 50
name
string

Account display name. Maps to custom_name field.

Maximum string length: 255
account_type
enum<string>

Account type: asset, liability, equity, revenue, expense

  • asset - Asset
  • liability - Liability
  • equity - Equity
  • revenue - Revenue
  • expense - Expense
Available options:
asset,
liability,
equity,
revenue,
expense,
account_subtype
enum<string>

Account subtype for granular categorization

  • current_assets - Current Assets
  • non_current_assets - Non-current Assets
  • current_liabilities - Current Liabilities
  • non_current_liabilities - Non-current Liabilities
  • share_capital - Share Capital
  • share_premium - Share Premium
  • reserves - Reserves
  • retained_earnings - Retained Earnings
  • revenue - Revenue
  • other_operating_income - Other Operating Income
  • finance_income - Finance Income
  • direct_costs - Direct Costs
  • operating_expenses - Operating Expenses
  • finance_costs - Finance Costs
  • income_tax - Income Tax
Available options:
current_assets,
non_current_assets,
current_liabilities,
non_current_liabilities,
share_capital,
share_premium,
reserves,
retained_earnings,
revenue,
other_operating_income,
finance_income,
direct_costs,
operating_expenses,
finance_costs,
income_tax,
parent_id
string | null

Parent account identifier - accepts UUID, code, or external_id

description
string

Human-readable description of account purpose

external_id
string

External system identifier. Enables idempotent creation.

Maximum string length: 100
institution_name
string

Financial institution name (e.g., 'Barclays Bank PLC')

Maximum string length: 255
iban
string

International Bank Account Number (EU/UK format)

Maximum string length: 34
sort_code
string

UK sort code (flexible format: XX-XX-XX or XXXXXX)

Maximum string length: 8
account_number_mask
string

Masked account number for display (e.g., '****4300')

Maximum string length: 20
balance_behavior
enum<string>

Override balance calculation behavior. Leave blank for standard accounting rules.

  • `` - Auto-detect
  • debit_positive - Debit Positive
  • credit_positive - Credit Positive
Available options:
,
debit_positive,
credit_positive
is_cash_account
boolean
default:false

Mark as cash or cash equivalent for cash flow purposes

is_non_cash_expense
boolean
default:false

Mark as non-cash expense (depreciation, amortization). Only valid for expense accounts.

custom_fields
any

Business-specific metadata as JSON object

Response

Detailed serializer for account with additional information.

id
string<uuid>
required
read-only

Unique account identifier

code
string
required
read-only

Account code from chart of accounts (e.g., '1000', '4000')

name
string
required
read-only

Account name from chart of accounts

currency
string
required
read-only

Account currency from business base currency (GBP, EUR, USD)

account_type
enum<string>
required
read-only

Account type code (asset, liability, equity, revenue, expense)

  • asset - Asset
  • liability - Liability
  • equity - Equity
  • revenue - Revenue
  • expense - Expense
Available options:
asset,
liability,
equity,
revenue,
expense
account_type_display
string | null
required
read-only

Human-readable account type (e.g., 'Current Asset', 'Revenue')

account_subtype
enum<string>
required
read-only

Account subtype code for more granular classification (bank, cash, etc.)

  • current_assets - Current Assets
  • non_current_assets - Non-current Assets
  • current_liabilities - Current Liabilities
  • non_current_liabilities - Non-current Liabilities
  • share_capital - Share Capital
  • share_premium - Share Premium
  • reserves - Reserves
  • retained_earnings - Retained Earnings
  • revenue - Revenue
  • other_operating_income - Other Operating Income
  • finance_income - Finance Income
  • direct_costs - Direct Costs
  • operating_expenses - Operating Expenses
  • finance_costs - Finance Costs
  • income_tax - Income Tax
Available options:
current_assets,
non_current_assets,
current_liabilities,
non_current_liabilities,
share_capital,
share_premium,
reserves,
retained_earnings,
revenue,
other_operating_income,
finance_income,
direct_costs,
operating_expenses,
finance_costs,
income_tax
account_subtype_display
string | null
required
read-only

Account subtype for more granular classification

parent_account_code
string | null
required
read-only

Parent account code if this is a sub-account (null for top-level accounts)

current_balance
integer
required
read-only

Current balance in cents

current_balance_formatted
string
required
read-only

Formatted balance with currency symbol (e.g., '£12,500.50')

debit_balance
integer
required
read-only

Debit balance in cents

credit_balance
integer
required
read-only

Credit balance in cents

period_balance
integer
required
read-only

Period balance in cents (null if no period filter applied)

period_balance_formatted
string | null
required
read-only

Formatted period balance with currency symbol (null if no period filter)

has_children
boolean
required
read-only

Whether this account has sub-accounts (nested hierarchy)

hierarchy_level
integer
required
read-only

Depth in account hierarchy (0 for root accounts)

is_active
boolean
required
read-only

Whether this account is active and accepting transactions

description
string
required
read-only

Detailed account description

institution_name
string | null
required
read-only

Bank institution name (for bank accounts only)

iban
string | null
required
read-only

International Bank Account Number (for bank accounts)

sort_code
string | null
required
read-only

UK bank sort code (for UK bank accounts, format: XX-XX-XX)

account_number_mask
string | null
required
read-only

Masked account number showing last 4 digits (e.g., '****5555')

total_debits
integer
required
read-only

Total number of debit transactions (count, not amount)

total_credits
integer
required
read-only

Total number of credit transactions (count, not amount)

last_entry_date
string<date-time> | null
required
read-only

Date of most recent journal entry

last_entry_reference
string
required
read-only

Reference of most recent journal entry

sub_accounts
object[]
required
read-only

List of sub-accounts if this is a parent account (empty array if no children)