Skip to main content
This how-to explains how to delete an Account (Chart of Accounts entry) in Pleo. The examples use the staging environment, but the steps are the same in production. Unlike archiving, deleting also removes the Account’s mappings to Pleo Categories. The effect reaches expenses in the Pleo web app, even those that were already exported and appear in the Accounting > Export > Exported tab. Archiving is reversible and leaves both the mappings and the expenses unchanged. For this reason, we recommend that you archive Accounts in production instead of deleting them. In staging, use the Delete endpoint to remove Accounts while you build and test your integration, for example:

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 returns 204, 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 id of 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

Example Response

A successful request returns 204 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.

Error Codes