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

# Retrieve a run deletion receipt



## OpenAPI

````yaml /openapi.json get /v1/runs/{run_id}/deletion
openapi: 3.1.0
info:
  description: >
    Create realtime avatar sessions.


    ### Authentication

    All `/v1/*` endpoints except `GET /v1/status` and `GET /v1/billing/plans`

    require an API key. Most use a Bearer header:


    ```

    Authorization: Bearer sk_live_...

    ```


    Agora Generic Avatar endpoints `POST /v1/agora/session/start` and

    `DELETE /v1/agora/session/stop` use the same full secret in an `X-API-Key`

    header:


    ```

    X-API-Key: sk_live_...

    ```


    A key created at https://app.protoface.com is a production key for

    https://api.protoface.com, ready to use without an activation step or an

    environment switch. `sk_live_` is the only customer API key prefix.

    The full secret is shown once at creation. The dashboard key list later

    shows only `sk_live_` plus the last four characters; that identifier cannot

    authenticate. Replace `sk_live_...` in examples with the full secret.


    Test with `GET /v1/models` and the Authorization header above. Your plan

    and credit balance do not gate this call. Insufficient credits on a

    billable call return HTTP 402.


    ### Idempotency

    `POST /v1/sessions` may include an `Idempotency-Key` header (any opaque
    string,

    <= 255 chars). Retries with the same key inside 24 hours return the first

    response. The header is optional.


    ### Errors

    Every non-2xx response is a JSON body of the form:


    ```json

    {
      "error": {
        "type": "invalid_request",
        "code": "transport.unsupported",
        "message": "transport.type=pipecat is not supported",
        "param": "transport.type",
        "request_id": "req_01HXY..."
      }
    }

    ```


    Switch on `error.code` (stable lower_snake_case or dotted), not
    `error.message`.

    The message provides readable context, but its wording may change.


    | `error.code` | HTTP | When |

    | --- | --- | --- |

    | `missing_authorization` | 401 | On Bearer endpoints: Authorization header
    absent, scheme not Bearer (case-insensitive), token not prefixed with
    `sk_live_`, or fewer than 16 characters after the prefix. The key was not
    looked up. |

    | `missing_api_key` | 401 | The `X-API-Key` header is absent or empty on an
    Agora endpoint. |

    | `api_key.unknown` | 401 | The supplied API key matched no key. |

    | `api_key.revoked` | 401 | The key is revoked. |

    | `api_key.expired` | 401 | The key is past its expiry. |

    | `api_key.environment` | 401 | The key belongs to a different environment
    than this host. |

    | `org.suspended` | 403 | The account is suspended. |

    | `api_key.scope_required` | 403 | The key is valid but lacks a required
    scope. |


    `missing_authorization` is a header parse failure, not an account activation

    error. Its message describes the expected `Authorization: Bearer sk_live_…`

    header. Rotating keys does not fix a request that still sends a missing or

    malformed header. Check the outgoing header with the secret redacted; never

    send the secret to support. Include `request_id` when asking for help.

    See https://docs.protoface.com/guides/authentication and

    https://docs.protoface.com/reference/errors#authentication-codes.


    ### Pagination

    List endpoints use cursor pagination:


    ```

    GET /v1/sessions?limit=20&starting_after=sess_01HXY...

    ```


    Response shape:


    ```json

    {
      "object": "list",
      "data": [...],
      "has_more": true,
      "next_cursor": "sess_01HXY..."
    }

    ```
  summary: Protoface — realtime avatar API for developers.
  title: Protoface API
  version: 0.1.0
servers:
  - description: Production
    url: https://api.protoface.com
security: []
tags:
  - description: >-
      Create, retrieve, list, and end realtime avatar sessions. Sessions stream
      audio in and video out; their lifecycle drives billing.
    name: sessions
  - description: >-
      Avatar definitions. Includes platform stock avatars and customer-uploaded
      avatars.
    name: avatars
  - description: Reusable multimodal inputs and outputs for asynchronous model runs.
    name: assets
  - description: Provider-neutral model contracts and modality capabilities.
    name: models
  - description: Async model execution with typed multimodal inputs and outputs.
    name: runs
  - description: Aggregate usage for billing reconciliation.
    name: usage
  - description: >-
      Public platform metadata — currently just status. Unauthenticated.
      Internal load-balancer and task health probes exist on this host but are
      not part of the documented surface.
    name: platform
  - description: Direct media sessions for the `pipecat-protoface` avatar video service.
    name: pipecat
  - description: Public billing plan metadata for signup and pricing UI.
    name: billing
paths:
  /v1/runs/{run_id}/deletion:
    get:
      tags:
        - runs
      summary: Retrieve a run deletion receipt
      operationId: getRunDeletion
      parameters:
        - in: path
          name: run_id
          required: true
          schema:
            title: Run Id
            type: string
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/RunDeletionView'
          description: Successful Response
        '402':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiErrorEnvelope'
          description: The organization has insufficient credits for this run.
        '403':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiErrorEnvelope'
          description: The API key's scopes do not permit this operation.
        '409':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiErrorEnvelope'
          description: The request conflicts with the current state of the run.
        '422':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiErrorEnvelope'
          description: Request body or parameters failed validation.
        '429':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiErrorEnvelope'
          description: >-
            Rate limit or queue capacity reached. Retry after the indicated
            delay.
      security:
        - ApiKey: []
components:
  schemas:
    RunDeletionView:
      properties:
        completed_at:
          anyOf:
            - format: date-time
              type: string
            - type: 'null'
        error:
          anyOf:
            - type: string
            - type: 'null'
          description: >-
            Set when storage purge failed, or when deletion completed but some
            input assets were retained because they cannot be distinguished from
            library uploads.
        id:
          type: string
        object:
          const: run.deletion
          default: run.deletion
          type: string
        requested_at:
          format: date-time
          type: string
        run_id:
          type: string
        started_at:
          anyOf:
            - format: date-time
              type: string
            - type: 'null'
        status:
          type: string
      required:
        - id
        - run_id
        - status
        - requested_at
      title: RunDeletionView
      type: object
    ApiErrorEnvelope:
      additionalProperties: false
      description: Wire format for every non-2xx public API response.
      examples:
        - error:
            code: transport.unsupported
            message: transport.type=pipecat is not supported
            param: transport.type
            request_id: req_01HXY5K8E7QYG3X8Z6N9R7S0VR
            type: invalid_request
      properties:
        error:
          $ref: '#/components/schemas/ApiError'
      required:
        - error
      title: ApiErrorEnvelope
      type: object
    ApiError:
      additionalProperties: false
      description: Concrete error returned inside `ApiErrorEnvelope.error`.
      properties:
        code:
          description: >-
            Stable machine-readable subcode (lower_snake_case). SDKs should
            switch on this, not `message`.
          type: string
        message:
          description: Human-readable summary. Not stable; do not parse.
          type: string
        param:
          anyOf:
            - type: string
            - type: 'null'
          description: Offending request field (dot-path), if applicable.
        request_id:
          description: Echo of the `X-Request-Id` response header for support.
          type: string
        type:
          $ref: '#/components/schemas/ErrorType'
      required:
        - type
        - code
        - message
        - request_id
      title: ApiError
      type: object
    ErrorType:
      description: |-
        Top-level error categories. Maps roughly to HTTP status.

        `code` (a free-form lower_snake_case string on `ApiError`) is the
        machine-readable subcode SDKs should switch on; `type` is the broad
        category.
      enum:
        - invalid_request
        - authentication
        - permission
        - not_found
        - conflict
        - unprocessable
        - rate_limit
        - quota_exceeded
        - internal
        - service_unavailable
      title: ErrorType
      type: string
  securitySchemes:
    ApiKey:
      bearerFormat: sk_live_*
      description: >-
        Production API key created at https://app.protoface.com for
        https://api.protoface.com; no activation step or environment switch.
        Pass the full secret shown once at creation as `Authorization: Bearer
        sk_live_…`, not the short dashboard identifier. HTTP 401
        `missing_authorization` means the header did not parse; the key was not
        looked up. A token that passes parsing can return `api_key.unknown`,
        `api_key.revoked`, `api_key.expired`, or `api_key.environment`. See
        https://docs.protoface.com/reference/errors#authentication-codes.
      scheme: bearer
      type: http

````

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