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

# Delete Account

> Schedule account deletion with a 30-day GDPR grace period.

Instead of immediately hard-deleting, this sets deletion_scheduled_at = now()+30 days,
revokes all active sessions (forces re-authentication), and returns 202.
A Celery Beat task runs daily and performs the actual hard-delete once the grace period
expires. Users can cancel by re-authenticating and calling POST /auth/account/cancel-deletion.

Cascade behaviour (applied at hard-delete time):
- Workspaces where user is the sole member are deleted entirely (including Stripe customer).
- Workspaces where user is the sole owner but has other members → 409 (transfer first).
- Workspaces where there are other owners → user's membership removed; workspace survives.



## OpenAPI

````yaml /openapi.json post /api/v1/auth/account/delete
openapi: 3.1.0
info:
  description: Change Impact Engine for multi-repo systems
  title: Riftmap
  version: 1.12.3
servers: []
security: []
paths:
  /api/v1/auth/account/delete:
    post:
      tags:
        - auth
      summary: Delete Account
      description: >-
        Schedule account deletion with a 30-day GDPR grace period.


        Instead of immediately hard-deleting, this sets deletion_scheduled_at =
        now()+30 days,

        revokes all active sessions (forces re-authentication), and returns 202.

        A Celery Beat task runs daily and performs the actual hard-delete once
        the grace period

        expires. Users can cancel by re-authenticating and calling POST
        /auth/account/cancel-deletion.


        Cascade behaviour (applied at hard-delete time):

        - Workspaces where user is the sole member are deleted entirely
        (including Stripe customer).

        - Workspaces where user is the sole owner but has other members → 409
        (transfer first).

        - Workspaces where there are other owners → user's membership removed;
        workspace survives.
      operationId: delete_account_api_v1_auth_account_delete_post
      parameters:
        - in: header
          name: X-Workspace-Id
          required: false
          schema:
            anyOf:
              - type: string
              - type: 'null'
            title: X-Workspace-Id
        - in: cookie
          name: riftmap_access
          required: false
          schema:
            anyOf:
              - type: string
              - type: 'null'
            title: Riftmap Access
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/DeleteAccountBody'
        required: true
      responses:
        '202':
          content:
            application/json:
              schema: {}
          description: Successful Response
        '422':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
          description: Validation Error
      security:
        - APIKeyHeader: []
        - HTTPBearer: []
components:
  schemas:
    DeleteAccountBody:
      properties:
        password:
          anyOf:
            - type: string
            - type: 'null'
          title: Password
      title: DeleteAccountBody
      type: object
    HTTPValidationError:
      properties:
        detail:
          items:
            $ref: '#/components/schemas/ValidationError'
          title: Detail
          type: array
      title: HTTPValidationError
      type: object
    ValidationError:
      properties:
        ctx:
          title: Context
          type: object
        input:
          title: Input
        loc:
          items:
            anyOf:
              - type: string
              - type: integer
          title: Location
          type: array
        msg:
          title: Message
          type: string
        type:
          title: Error Type
          type: string
      required:
        - loc
        - msg
        - type
      title: ValidationError
      type: object
  securitySchemes:
    APIKeyHeader:
      in: header
      name: X-API-Key
      type: apiKey
    HTTPBearer:
      description: API key as Bearer token (rfm_live_... prefix)
      scheme: bearer
      type: http

````