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

# Delete an account



## OpenAPI

````yaml DELETE /accounts/{account_id}
openapi: 3.0.1
info:
  title: Payroll API
  description: A full flagged payroll api provided by Teal
  version: 1.0.0
servers:
  - url: https://api.sandbox.goteal.co
    description: Sandbox server for experiments
  - url: https://api.goteal.co
    description: Production server
security:
  - ApiKeyAuth: []
  - MemberBearerAuth: []
paths:
  /accounts/{account_id}:
    description: >-
      Account are the payroll and HR platform accesses that users link to Teal,
      providing a stream of income and employment data
    delete:
      summary: Deletes an account for the user (e.g. a Xero account)
      parameters:
        - in: path
          name: account_id
          schema:
            type: string
          required: true
          description: ID of the account to delete
      responses:
        '204':
          description: No Content
          content:
            application/json:
              schema:
                type: object
                properties:
                  message:
                    type: string
                    example: Account deleted successfully.
        '401':
          $ref: '#/components/responses/UnauthorizedApiKey'
        '404':
          $ref: '#/components/responses/ResourceNotFound'
components:
  responses:
    UnauthorizedApiKey:
      description: Unauthorized if the X-API-KEY is not provided or is wrong
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Unauthorized'
    ResourceNotFound:
      description: Resource not found
      content:
        applcation/json:
          schema:
            $ref: '#/components/schemas/NotFound'
  schemas:
    Unauthorized:
      type: object
      properties:
        errors:
          type: string
          description: An array of messages describing the errors
          example:
            - No X-API-KEY header provided or wrong value
    NotFound:
      type: object
      properties:
        errors:
          type: string
          description: An array of messages describing the not found errors
          example:
            - >-
              The resource with id [8be3bb60-5ab4-4bd2-90e6-3b015691a827] does
              not exist
  securitySchemes:
    ApiKeyAuth:
      type: apiKey
      in: header
      name: X-API-KEY
    MemberBearerAuth:
      type: http
      scheme: bearer
      description: >-
        Bearer token for authentication. The token should be the one returned by
        the "/members/signin"

````