Create an account
POST
https://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
accountTypestringrequiredAccount type. Immutable after creation.
assetliabilityequityrevenueexpensecodestringrequiredUnique account code within the organisation (max 20 characters). By convention: 1xxx assets, 2xxx liabilities, 3xxx equity, 4xxx revenue, 5xxx expenses.
namestringrequiredDisplay name (max 200 characters).
controlTypestringoptionalnullableControl account type identifier (e.g. trade_debtors). Only relevant if isControlAccount is true.
defaultVatRateintegeroptionalnullableDefault VAT rate as a whole percentage (e.g. 20 for 20%). Applied as suggestion when creating transaction lines.
descriptionstringoptionalnullableOptional description of the account purpose (max 500 characters).
isActivebooleanoptionalWhether the account is active. Defaults to true.
isControlAccountbooleanoptionalWhether this is a control account (e.g. trade debtors). Defaults to false.
parentIdstringoptionalnullablePrefixed 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
codestringAccount code as provided.
idstringPrefixed account ID (e.g. acc_4100).
namestringAccount 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.