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

# Delete user

> Delete the calling user's data (GDPR erasure).

The purge — external connection revokes plus the multi-table cascade delete —
runs in a background Temporal workflow; this returns ``202 Accepted`` + the
workflow id immediately, so a large account can't outrun the request timeout
or stall the API event loop.



## OpenAPI

````yaml https://app.stainlessapi.com/api/spec/documented/hyperspell.yaml delete /auth/delete
openapi: 3.1.0
info:
  title: Hyperspell API
  summary: >-
    Hyperspell is the memory layer for AI apps and agents. Through the API, you
    can add memories, connect data sources to index them in real-time, and
    search memories with our natural language query engine.
  termsOfService: https://hyperspell.com/blog/tos
  contact:
    name: Hyperspell
    url: https://hyperspell.com/
    email: hello@hyperspell.com
  version: 0.32.1
servers:
  - url: https://api.hyperspell.com
    description: Production
security:
  - APIKey: []
    AsUser: []
paths:
  /auth/delete:
    delete:
      tags:
        - Authentication
      summary: Delete user
      description: >-
        Delete the calling user's data (GDPR erasure).


        The purge — external connection revokes plus the multi-table cascade
        delete —

        runs in a background Temporal workflow; this returns ``202 Accepted`` +
        the

        workflow id immediately, so a large account can't outrun the request
        timeout

        or stall the API event loop.
      operationId: delete_user_auth_delete_delete
      responses:
        '202':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/UserDeletionResponse'
      security:
        - APIKey: []
        - AsUser: []
      x-codeSamples:
        - lang: JavaScript
          source: |-
            import Hyperspell from '@hyperspell/hyperspell';

            const client = new Hyperspell({
              apiKey: process.env['HYPERSPELL_API_KEY'], // This is the default and can be omitted
            });

            const response = await client.auth.deleteUser();

            console.log(response.workflow_id);
        - lang: Python
          source: |-
            import os
            from hyperspell import Hyperspell

            client = Hyperspell(
                api_key=os.environ.get("HYPERSPELL_API_KEY"),  # This is the default and can be omitted
            )
            response = client.auth.delete_user()
            print(response.workflow_id)
        - lang: Go
          source: "package main\n\nimport (\n\t\"context\"\n\t\"fmt\"\n\n\t\"github.com/hyperspell/hyperspell-go\"\n\t\"github.com/hyperspell/hyperspell-go/option\"\n)\n\nfunc main() {\n\tclient := hyperspell.NewClient(\n\t\toption.WithAPIKey(\"My API Key\"),\n\t)\n\tresponse, err := client.Auth.DeleteUser(context.TODO())\n\tif err != nil {\n\t\tpanic(err.Error())\n\t}\n\tfmt.Printf(\"%+v\\n\", response.WorkflowID)\n}\n"
        - lang: CLI
          source: |-
            hyperspell auth delete-user \
              --api-key 'My API Key'
components:
  schemas:
    UserDeletionResponse:
      properties:
        success:
          type: boolean
          title: Success
        message:
          type: string
          title: Message
        workflow_id:
          type: string
          title: Workflow Id
      type: object
      required:
        - success
        - message
        - workflow_id
      title: UserDeletionResponse
  securitySchemes:
    APIKey:
      type: http
      description: >-
        API Key or JWT User Token. If using an API Key, set the X-As-User header
        to act as a specific user. A JWT User Token is always scoped to a
        specific user.
      scheme: bearer
      bearerFormat: Bearer <token>
    AsUser:
      type: apiKey
      description: >-
        Optionally set this header to act as a specific user when using an API
        Key, equivalent to first exchanging the API Key for a User Token
      in: header
      name: X-As-User

````