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 isActive flag is set to false.
  • 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 required
Prefixed 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 boolean
True if the account was deactivated instead of deleted (has transactions).
deleted boolean
True if the account was permanently deleted.
message string
Explanation 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.