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

# Erase one app user: every record with their user.hash, and each of their sessions

> Scheduled until a day from now (cancelable meanwhile), then every record of the project that carries this `user.hash` and every session that does, whole, are deleted, with the sessions' replays and crash reports. A session where the app called setUser with another hash midway goes whole too. Another project with the same hash is untouched. Records the app sends after the erasure ran are not erased: stop sending the hash first. Owners and admins; audited without the hash.



## OpenAPI

````yaml /api-reference/openapi.json post /orgs/{orgId}/projects/{projectId}/user-erasures
openapi: 3.1.0
info:
  title: Apsio API
  version: 0.1.0
  description: >-
    Read API v0: your projects, release health and comparisons, missing symbols,
    issues, sessions, vitals, cohort comparisons, performance (app start,
    screens, hangs, MetricKit) and network endpoints and traces for one project.
    Authenticate with a project token as a bearer token, with an OAuth access
    token from Apsio's authorization server (MCP clients), or, from the console,
    with the session cookie of a member of the project's organization.
servers:
  - url: https://api.apsio.io/v1
security: []
paths:
  /orgs/{orgId}/projects/{projectId}/user-erasures:
    post:
      summary: >-
        Erase one app user: every record with their user.hash, and each of their
        sessions
      description: >-
        Scheduled until a day from now (cancelable meanwhile), then every record
        of the project that carries this `user.hash` and every session that
        does, whole, are deleted, with the sessions' replays and crash reports.
        A session where the app called setUser with another hash midway goes
        whole too. Another project with the same hash is untouched. Records the
        app sends after the erasure ran are not erased: stop sending the hash
        first. Owners and admins; audited without the hash.
      parameters:
        - schema:
            type: string
            pattern: ^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$
            example: 0192f3a4-0000-7000-8000-00000000a001
          required: true
          name: orgId
          in: path
        - schema:
            type: string
            pattern: ^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$
            example: 0192f3a4-0000-7000-8000-00000000a001
          required: true
          name: projectId
          in: path
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                user_hash:
                  type: string
                  pattern: ^[A-Za-z0-9+/=_.:-]{1,256}$
                  example: 3f9a0c5e1b7d
                reason:
                  type: string
                  minLength: 1
                  maxLength: 1000
                  example: 'Request #1234'
              required:
                - user_hash
                - reason
      responses:
        '201':
          description: The erasure, scheduled
      security:
        - session: []
components:
  securitySchemes:
    session:
      type: apiKey
      in: cookie
      name: apsio_session
      description: >-
        The console session, set by /v1/auth/callback (`__Host-apsio_session`
        when host-only).

````

This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.