Delete an account
DELETE
https://app.speybooks.com/api/v1/accounts/{id}Removes an account from the chart. The behaviour depends on the account's state:
- System accounts cannot be deleted (returns 400).
- Accounts with transactions are deactivated instead of deleted. The
isActiveflag is set tofalse. - Accounts with children cannot be deleted until child accounts are removed or reassigned (returns 400).
- Accounts with no transactions or children are permanently deleted.
To reactivate a deactivated account, use the update endpoint.
Path parameters
id string requiredPrefixed account ID (e.g. acc_1200).
Response
200 Account deleted or deactivated. If the account has posted transactions, it is deactivated instead of deleted. Check the response for deleted vs deactivated status.
Show response fields
deactivated booleanTrue if the account was deactivated instead of deleted (has transactions).
deleted booleanTrue if the account was permanently deleted.
message stringExplanation when the account was deactivated rather than deleted.
Error codes
400 Cannot delete system account, or account has child accounts that must be removed first.
404 Account not found.