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

# Erase a person's session recordings

> <Info>This API is in beta. Endpoints, fields, and behavior may still change, so avoid depending on it in production.</Info>

Permanently deletes everything the app recorded about one person (GDPR Article 17): their recordings, stored events and the share links they created or that point at those recordings. It can't be undone. A recording that gets new events while it's erased is kept and counted in `skipped_sessions`; erase again to remove it.

Name the person with `user_email`, `user_id` or both; at least one is required. `from_ts` and `to_ts` narrow it to recordings that started in that window.

Requires editor access to the app. This is limited to 60 requests per minute, shared with every operation that changes session recordings.



## OpenAPI

````yaml /developers/references/app-management/app-management-openapi.json delete /api/apps/{app_id}/session-recording-user-data
openapi: 3.1.0
info:
  title: Base44 App Management API
  version: 1.0.0
servers:
  - url: https://app.base44.com
security:
  - PersonalAccessTokenAuth: []
paths:
  /api/apps/{app_id}/session-recording-user-data:
    delete:
      summary: Erase a person's session recordings
      description: >-
        <Info>This API is in beta. Endpoints, fields, and behavior may still
        change, so avoid depending on it in production.</Info>


        Permanently deletes everything the app recorded about one person (GDPR
        Article 17): their recordings, stored events and the share links they
        created or that point at those recordings. It can't be undone. A
        recording that gets new events while it's erased is kept and counted in
        `skipped_sessions`; erase again to remove it.


        Name the person with `user_email`, `user_id` or both; at least one is
        required. `from_ts` and `to_ts` narrow it to recordings that started in
        that window.


        Requires editor access to the app. This is limited to 60 requests per
        minute, shared with every operation that changes session recordings.
      operationId: >-
        erase_recording_user_data_api_apps__app_id__session_recording_user_data_delete
      parameters:
        - name: app_id
          in: path
          required: true
          schema:
            type: string
            maxLength: 64
            pattern: ^[a-zA-Z0-9._-]+$
            description: ID of the app.
            title: App Id
          description: ID of the app.
          example: 6820f3a4e7b91d003c45a1f2
        - name: user_email
          in: query
          required: false
          schema:
            type: string
            maxLength: 256
            pattern: ^[A-Za-z0-9._%+\-@]+$
            description: The person's email, as they sign in to the app.
            title: User Email
          description: The person's email, as they sign in to the app.
          example: jane@example.com
        - name: user_id
          in: query
          required: false
          schema:
            type: string
            maxLength: 256
            pattern: ^[^$\{\}\\\s]+$
            description: >-
              The person's user ID, or the ID the app set with the recorder's
              `setUserID`.
            title: User Id
          description: >-
            The person's user ID, or the ID the app set with the recorder's
            `setUserID`.
          example: 68a0c1d2e3f4a5b6c7d8e9f0
        - name: from_ts
          in: query
          required: false
          schema:
            type: string
            format: date-time
            description: Only recordings that started at or after this ISO 8601 UTC time.
            title: From Ts
          description: Only recordings that started at or after this ISO 8601 UTC time.
          example: '2026-10-01T00:00:00Z'
        - name: to_ts
          in: query
          required: false
          schema:
            type: string
            format: date-time
            description: Only recordings that started at or before this ISO 8601 UTC time.
            title: To Ts
          description: Only recordings that started at or before this ISO 8601 UTC time.
          example: '2026-10-31T23:59:59Z'
      responses:
        '200':
          description: What was deleted.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/UserDataErasure'
              example:
                deleted_sessions: 3
                deleted_chunks: 41
                deleted_share_tokens: 1
                skipped_sessions: 0
        '400':
          description: '`invalid_request`: send `user_email`, `user_id` or both.'
          content:
            application/json:
              examples:
                invalid_request:
                  summary: invalid_request
                  value:
                    error:
                      code: invalid_request
                      message: user_email or user_id required
                      details: {}
              schema:
                $ref: '#/components/schemas/StandardErrorEnvelope'
        '401':
          description: '`unauthenticated`: missing or invalid credentials.'
          content:
            application/json:
              examples:
                unauthenticated:
                  summary: unauthenticated
                  value:
                    error:
                      code: unauthenticated
                      message: Not authenticated
                      details: {}
              schema:
                $ref: '#/components/schemas/StandardErrorEnvelope'
        '404':
          description: >-
            `not_found`: no such app, you don't have editor access to the app,
            or it's past retention.
          content:
            application/json:
              examples:
                not_found:
                  summary: not_found
                  value:
                    error:
                      code: not_found
                      message: Recording not found.
                      details: {}
              schema:
                $ref: '#/components/schemas/StandardErrorEnvelope'
        '413':
          description: >-
            `too_many_recordings`: more than 9,999 recordings match; narrow
            `from_ts` and `to_ts`.
          content:
            application/json:
              examples:
                too_many_recordings:
                  summary: too_many_recordings
                  value:
                    error:
                      code: too_many_recordings
                      message: >-
                        Erasure exceeds 9999-session cap. Narrow with the
                        from_ts/to_ts time window and run multiple deletes.
                      details: {}
              schema:
                $ref: '#/components/schemas/StandardErrorEnvelope'
        '422':
          description: >-
            `invalid_request`: a parameter or the body failed validation;
            `details.errors` lists why.
          content:
            application/json:
              examples:
                invalid_request:
                  summary: invalid_request
                  value:
                    error:
                      code: invalid_request
                      message: Invalid request
                      details:
                        errors: []
              schema:
                $ref: '#/components/schemas/StandardErrorEnvelope'
        '429':
          description: '`rate_limited`: more than 60 requests per minute.'
          content:
            application/json:
              examples:
                rate_limited:
                  summary: rate_limited
                  value:
                    error:
                      code: rate_limited
                      message: Rate limit exceeded
                      details: {}
              schema:
                $ref: '#/components/schemas/StandardErrorEnvelope'
        '502':
          description: '`upstream_unavailable`: recording storage didn''t answer; retry.'
          content:
            application/json:
              examples:
                upstream_unavailable:
                  summary: upstream_unavailable
                  value:
                    error:
                      code: upstream_unavailable
                      message: Internal server error
                      details: {}
              schema:
                $ref: '#/components/schemas/StandardErrorEnvelope'
        '503':
          description: >-
            Database temporarily unavailable (`database_unavailable`): the data
            cluster did not answer in time. Retry after the `Retry-After`
            seconds.
          headers:
            Retry-After:
              description: Seconds to wait before retrying.
              schema:
                type: integer
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/StandardErrorEnvelope'
              examples:
                database_unavailable:
                  summary: database_unavailable
                  value:
                    error:
                      code: database_unavailable
                      message: Database temporarily unavailable, please retry
                      details: {}
      security:
        - PersonalAccessTokenAuth:
            - full_access
        - WorkspaceApiKeyAuth:
            - full_access
        - WorkspaceApiKeyBearerAuth:
            - full_access
components:
  schemas:
    UserDataErasure:
      properties:
        deleted_sessions:
          type: integer
          title: Deleted Sessions
          description: Recordings deleted.
          example: 3
        deleted_chunks:
          type: integer
          title: Deleted Chunks
          description: Stored event batches deleted.
          example: 41
        deleted_share_tokens:
          type: integer
          title: Deleted Share Tokens
          description: Share links deleted.
          example: 1
        skipped_sessions:
          type: integer
          title: Skipped Sessions
          description: >-
            Recordings that got new events while being erased; erase again to
            remove them.
          example: 0
      type: object
      required:
        - deleted_sessions
        - deleted_chunks
        - deleted_share_tokens
        - skipped_sessions
      title: UserDataErasure
    StandardErrorEnvelope:
      properties:
        error:
          $ref: '#/components/schemas/StandardError'
          description: What went wrong.
      type: object
      required:
        - error
      title: StandardErrorEnvelope
      description: The error body returned in the standard envelope.
    StandardError:
      properties:
        code:
          type: string
          title: Code
          description: >-
            Stable machine-readable cause of the failure. Match on this, not on
            `message`.
          example: not_found
        message:
          type: string
          title: Message
          description: Human-readable explanation. It isn't a stable contract.
          example: App not found
        details:
          additionalProperties: true
          type: object
          title: Details
          description: >-
            Structured context for the failure, or an empty object when there's
            none.
          example: {}
      type: object
      required:
        - code
        - message
      title: StandardError
  securitySchemes:
    PersonalAccessTokenAuth:
      type: http
      scheme: bearer
      description: >-
        Personal access token, sent as `Authorization: Bearer <token>`. Each
        operation lists the permission it needs: `read_only` or `full_access`. A
        full-access token can call every operation. A read-only token can call
        only the operations that list `read_only`; anything else returns 403
        `read_only_credential_route_not_allowed`.
    WorkspaceApiKeyAuth:
      type: apiKey
      in: header
      name: api_key
      description: >-
        Workspace API key, sent as `api_key: <key>`. Each operation that accepts
        one lists what the key needs: a permission, `read_only` or
        `full_access`, like a personal access token, or a scope. A key without
        the scope gets 403 `workspace_api_key_scope_required`.
    WorkspaceApiKeyBearerAuth:
      type: http
      scheme: bearer
      description: >-
        Workspace API key, sent as `Authorization: Bearer <key>`. Accepted
        wherever `api_key` is, with the same permission.

````

## Related topics

- [Export a person's session recordings](https://docs.base44.com/api-reference/export-a-persons-session-recordings.md)
- [Recording and replaying user sessions](https://docs.base44.com/documentation/performance-and-seo/session-recordings.md)
- [List session recordings](https://docs.base44.com/api-reference/list-session-recordings.md)
- [Update session recording](https://docs.base44.com/api-reference/update-session-recording.md)
- [Delete session recording](https://docs.base44.com/api-reference/delete-session-recording.md)


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