- To remove test Accounts that you created while building the integration.
- To stay below the 11,000 active Account limit while you test a high-volume Chart of Accounts. See How to Handle a High-Volume Chart of Accounts.
Impact of Deleting an Account
Pleo deletes the Account immediately. It does not check the Account against Pleo Categories or expense items first. As a result:- Pleo never returns a
409. The request returns204, even when the Account is mapped to a Pleo Category or used on expense items. - Category mappings are cleared. Pleo Categories that were mapped to the deleted Account no longer show an Account in the Pleo web app (Settings > Accounting > Categories).
- Exported expenses are affected. Expenses that used the Account through a Category show a Missing account number error in the Pleo web app. This includes expenses that were already exported and appear in the Accounting > Export > Exported tab.
- Recreating the Account does not restore the mappings. A recreated Account gets a new
id, so you must reconfigure the Category mappings and the Accounts on the affected expenses. - The deletion cannot be undone. A deleted Account cannot be restored.
Prerequisites
Before you begin:- You have the
idof the Account to delete. You receive it when you create the Account, or you can retrieve it as described in How to Sync Accounts - Your integration is authenticated using one of the supported authentication methods
- Your integration can call Pleo’s Chart of Accounts API endpoints
Steps
1. Delete the Account
API Endpoint: DELETE/v1/chart-of-accounts/{accountId}
When a test Account is no longer needed in staging, send a DELETE request with the Account’s id in the path. The request has no body. You can delete an Account whether it is active or archived.
Example Pseudo:
Example Request
- OAuth 2.0
- API Key
Example Response
A successful request returns204 No Content with an empty body.
2. Confirm the Account Is Gone (Optional)
API Endpoint: GET/v1/chart-of-accounts/{accountId}
To confirm the deletion, retrieve the Account by its id. After a 204, the request returns 404. The Account also no longer appears in search results, even when you set includeArchived: true.
- OAuth 2.0
- API Key
Error Codes
Related Reading
- How to Create, Update, and Archive Accounts
- How to Sync Accounts
- How to Handle a High-Volume Chart of Accounts
- Account Limits and High-Volume Sync Guidance
- Delete an Account (API reference)