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
accountType string requiredAccount type. Immutable after creation.
assetliabilityequityrevenueexpensecode string requiredUnique account code within the organisation (max 20 characters). By convention: 1xxx assets, 2xxx liabilities, 3xxx equity, 4xxx revenue, 5xxx expenses.
name string requiredDisplay name (max 200 characters).
controlType string optional nullableControl account type identifier (e.g. trade_debtors). Only relevant if isControlAccount is true.
defaultVatRate integer optional nullableDefault VAT rate as a whole percentage (e.g. 20 for 20%). Applied as suggestion when creating transaction lines.
description string optional nullableOptional description of the account purpose (max 500 characters).
isActive boolean optionalWhether the account is active. Defaults to true.
isControlAccount boolean optionalWhether this is a control account (e.g. trade debtors). Defaults to false.
parentId string optional nullablePrefixed ID of the parent account (e.g. acc_100). Parent must be the same account type.
Response
201 Created successfully. Returns the new account ID, code, and name.
Show response fields
code stringAccount code as provided.
id stringPrefixed account ID (e.g. acc_4100).
name stringAccount name as provided.
Error codes
400 Validation failed. Check error.details for field-level errors, or invalid parent account.
409 An account with this code already exists in the organisation.