> ## Documentation Index
> Fetch the complete documentation index at: https://developers.pleo.io/llms.txt
> Use this file to discover all available pages before exploring further.

# Delete an account

> 
Deletes an existing account in Pleo.

Only accounts not linked to any accounting entries can be deleted. Trying to delete an account linked to accounting entries will result in an error. If an account is linked, it can only be archived. Use UPDATE endpoint to archive an account.




## OpenAPI

````yaml delete /v1/chart-of-accounts/{accountId}
openapi: 3.0.1
info:
  title: Chart of Accounts API
  description: Bookkeeping Core OpenAPI definitions
  termsOfService: https://pleo.io/terms/
  contact:
    email: team.actina@pleo.io
  license:
    name: Apache 2.0
    url: http://www.apache.org/licenses/LICENSE-2.0.html
  version: 24.9.0
servers:
  - url: https://external.pleo.io
    description: Production server
  - url: https://external.staging.pleo.io
    description: Staging server
security:
  - bearerAuth: []
  - basicAuth: []
tags:
  - name: BookkeepingCore
    description: This resource is associated with the BookkeepingCore API
  - name: Accounts
    description: >
      This API enables you to create an account in Pleo, search for an account
      by its ID, update details of an account recorded in Pleo, delete an
      account from Pleo, or apply specific filters to retrieve a list of
      accounts managed in Pleo.


      💡**Note**


      Please note that only response codes specific to the API behaviour are
      documented. Otherwise, we follow HTTP response codes.
  - name: Aggregated Bookkeeping Category Groups
    description: >-
      This API enables you to read aggregated bookkeeping category groups.


      💡**Note**


      Please note that only response codes specific to the API behaviour are
      documented. Otherwise, we follow HTTP response codes.
  - name: Aggregated Contra Accounts
    description: >-
      This API enables you to read aggregated contra accounts.


      💡**Note**


      Please note that only response codes specific to the API behaviour are
      documented. Otherwise, we follow HTTP response codes.
  - name: Bookkeeping Categories
    description: >
      This API enables you to perform operations on a bookkeeping category.


      💡**Note**


      Please note that only response codes specific to the API behaviour are
      documented. Otherwise, we follow HTTP response codes..
  - name: Bookkeeping Category Groups
    description: >-
      This API enables you to perform operations on a bookkeeping category
      group.


      💡**Note**


      Please note that only response codes specific to the API behaviour are
      documented. Otherwise, we follow HTTP response codes.
  - name: Contra Accounts
    description: >
      This API enables you to manage contra accounts.


      💡**Note**


      Please note that only response codes specific to the API behaviour are
      documented. Otherwise, we follow HTTP response codes..
  - name: Bookkeeping Preferences Resource
paths:
  /v1/chart-of-accounts/{accountId}:
    delete:
      tags:
        - Accounts
      summary: Delete an account
      description: >

        Deletes an existing account in Pleo.


        Only accounts not linked to any accounting entries can be deleted.
        Trying to delete an account linked to accounting entries will result in
        an error. If an account is linked, it can only be archived. Use UPDATE
        endpoint to archive an account.
      operationId: deleteAccountV1
      parameters:
        - name: accountId
          in: path
          description: ID of the account to delete.
          required: true
          style: simple
          explode: false
          schema:
            type: string
            format: uuid
          example: 123e4567-e89b-12d3-a456-426614174015
      responses:
        '204':
          description: Deletion of account successful.
        '404':
          description: Account not found.
        '409':
          description: >-
            Account linked to accounting entries and cannot be deleted. Use
            UPDATE endpoint to archive the account.
components:
  securitySchemes:
    bearerAuth:
      type: http
      description: >-
        JWT Bearer token authentication. Include the token in the Authorization
        header as: `Bearer <token>`
      scheme: bearer
      bearerFormat: JWT
    basicAuth:
      type: http
      description: >-
        Basic HTTP authentication using API key. Use your API key as the
        username and leave the password empty. The credentials will be Base64
        encoded automatically.
      scheme: basic

````