Create an account

POSThttps://app.speybooks.com/api/v1/accounts/

Creates a new account in the chart of accounts. The account code must be unique within the organisation. If a parent account is specified, it must exist and share the same account type.

Account codes are free-form strings (max 20 characters) but by convention follow UK numbering: 1xxx for assets, 2xxx for liabilities, 3xxx for equity, 4xxx for revenue, 5xxx+ for expenses.

Body parameters

accountTypestringrequired
Account type. Immutable after creation.
assetliabilityequityrevenueexpense
codestringrequired
Unique account code within the organisation (max 20 characters). By convention: 1xxx assets, 2xxx liabilities, 3xxx equity, 4xxx revenue, 5xxx expenses.
namestringrequired
Display name (max 200 characters).
controlTypestringoptionalnullable
Control account type identifier (e.g. trade_debtors). Only relevant if isControlAccount is true.
defaultVatRateintegeroptionalnullable
Default VAT rate as a whole percentage (e.g. 20 for 20%). Applied as suggestion when creating transaction lines.
descriptionstringoptionalnullable
Optional description of the account purpose (max 500 characters).
isActivebooleanoptional
Whether the account is active. Defaults to true.
isControlAccountbooleanoptional
Whether this is a control account (e.g. trade debtors). Defaults to false.
parentIdstringoptionalnullable
Prefixed ID of the parent account (e.g. acc_100). Parent must be the same account type.

Response

201Created successfully. Returns the new account ID, code, and name.
Show response fields
codestring
Account code as provided.
idstring
Prefixed account ID (e.g. acc_4100).
namestring
Account name as provided.

Error codes

400Validation failed. Check error.details for field-level errors, or invalid parent account.
409An account with this code already exists in the organisation.