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

# Delete the account

> Permanently erases the account, its API keys, and the billing and webhook data attached to it. Irreversible, and any remaining credit is forfeited.

Both fields are required: the password proves it is really you, the email proves you know which account is being destroyed. Downstream data is removed first, so a failure part way through leaves the account intact and the call can be retried. API keys stop working immediately.



## OpenAPI

````yaml /api-reference/auth.json delete /api/auth/account
openapi: 3.1.0
info:
  title: truscan auth
  version: 1.0.0
  description: >-
    Identity: accounts, sessions, password resets and API keys.


    This is the only service that verifies a credential, because it is the
    service that issues them. Every other service decodes the identity the edge
    already verified.


    Protected routes accept either credential, a dashboard session JWT or an
    `tru_` API key, on the same path. There is no key-only variant of any route.
servers:
  - url: https://api.truscan.co
    description: Production
security: []
tags:
  - name: session
    description: Sign up, sign in, password reset
  - name: keys
    description: API key management
paths:
  /api/auth/account:
    delete:
      tags:
        - account
      summary: Delete the account
      description: >-
        Permanently erases the account, its API keys, and the billing and
        webhook data attached to it. Irreversible, and any remaining credit is
        forfeited.


        Both fields are required: the password proves it is really you, the
        email proves you know which account is being destroyed. Downstream data
        is removed first, so a failure part way through leaves the account
        intact and the call can be retried. API keys stop working immediately.
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              required:
                - password
                - email
              properties:
                password:
                  type: string
                email:
                  type: string
                  format: email
      responses:
        '200':
          description: Deleted. The session cookie is cleared.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Envelope'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '422':
          $ref: '#/components/responses/Unauthorized'
      security:
        - session: []
        - apiKey: []
components:
  schemas:
    Envelope:
      type: object
      required:
        - success
        - result
        - message
      properties:
        success:
          type: boolean
        result: {}
        message:
          type: string
    Failure:
      type: object
      required:
        - success
        - result
        - message
      properties:
        success:
          type: boolean
          const: false
        result:
          type: object
          properties:
            code:
              type: string
        message:
          type: string
          description: Written for a person. Safe to show as-is.
  responses:
    Unauthorized:
      description: No valid credential was presented.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Failure'
  securitySchemes:
    session:
      type: http
      scheme: bearer
      bearerFormat: JWT
      description: A dashboard session, verified at the edge.
    apiKey:
      type: http
      scheme: bearer
      description: >-
        An `tru_` API key, resolved at the edge. Accepted on every route a
        session is.

````