> ## Documentation Index
> Fetch the complete documentation index at: https://docs-beta.layerfi.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Delete ledger account

> Deletes a ledger account. The account must not have any transactions or child accounts.



## OpenAPI

````yaml delete /v1/businesses/{businessId}/ledger/accounts/{accountId}
openapi: 3.0.1
info:
  title: API
  version: latest
servers: []
security:
  - BearerAuth: []
tags: []
externalDocs:
  url: /
paths:
  /v1/businesses/{businessId}/ledger/accounts/{accountId}:
    delete:
      tags: []
      summary: Delete ledger account
      description: >-
        Deletes a ledger account. The account must not have any transactions or
        child accounts.
      operationId: business.ledger.accounts.accountId.delete
      parameters:
        - name: businessId
          in: path
          description: The UUID of the business
          required: true
          schema:
            type: string
        - name: accountId
          in: path
          description: The ID or stable_name of the ledger account to delete
          required: true
          schema:
            type: string
        - name: Content-Type
          in: header
          description: Content-Type must be set to application/json
          schema:
            type: string
      responses:
        '204':
          description: Account successfully deleted
        '400':
          description: Account cannot be deleted (has transactions or child accounts)
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiError'
        '404':
          description: Business or account not found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiError'
      deprecated: false
components:
  schemas:
    ApiError:
      type: object
      properties: {}
      example: ''
      description: ''
  securitySchemes:
    BearerAuth:
      type: http
      scheme: bearer
      bearerFormat: JWT

````