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

> ## Agent Instructions
> Start with https://docs.scrip.dev/agents.md and https://docs.scrip.dev/which-endpoints-you-need.md. Your application only needs a few API calls as users earn and spend (`POST /v1/events`, balance/history reads, and redemptions); program setup happens in the dashboard or setup scripts.
> Use `https://api-sandbox.scrip.dev` with `sk_test_` keys for testing, and `https://api.scrip.dev` with `sk_live_` keys for production. Keep API keys on your server.
> Pass your own user ID as `external_id` on events and prefix it with `ext:` in participant URL paths (e.g., `GET /v1/participants/ext:user_123/balances`). By default (`on_unknown_participant: CREATE`), the first event for a new `external_id` creates and enrolls the participant automatically.
> Events process asynchronously: `POST /v1/events` returns `202 Accepted` when queued, and rules evaluate in the background. Pass an `idempotency_key` (such as an order ID) on every event, and wait for the `event.completed` webhook or poll `GET /v1/events/{event_id}` before reading updated balances.
> Connect the hosted MCP server at https://mcp.scrip.dev/mcp (OAuth, defaults to Sandbox) to inspect programs, validate and simulate rules, and trace events. Append `.md` to any docs URL for Markdown, or fetch https://docs.scrip.dev/openapi.json for full endpoint schemas.

# List failure causes

> List event failures by their first error code and current state, grouped by rewards program or across programs.

Groups failed events by the `error_code` they first failed with (`first_error_code`) and breaks down their current state (`open`, `failed_again`, `retrying`, `completed`, and `acknowledged`). An event retains its `first_error_code` across retries, so each row tracks both total historical impact (`event_count`, `participant_count`) and unacknowledged failures still open (`open_count = states.open + states.failed_again`).

By default, rows are grouped by program and `error_code`, ordered by newest `last_failed_at`. Pass `folder_id` (mutually exclusive with `program_id`) to scope to a folder tree, or `group_by=error_code` to aggregate across programs ordered by highest `open_count` first (`program_count`, `open_program_count`, and `open_participant_count` replace `program_id`).

To inspect the individual events behind a row, call [List events](https://docs.scrip.dev/api-reference/events/list-events.md) with `first_error_code`, `program_id`, `period_start`, and `period_end`. To retry open failures for a cause, pass `program_id`, `error_code`, and `before` to [Retry failed events](https://docs.scrip.dev/api-reference/events/retry-failed-events.md).

> [!NOTE]
>
> For the triage and retry workflow, see [Failures by cause](https://docs.scrip.dev/guides/event-processing.md#failures-by-cause).


## OpenAPI

````yaml GET /v1/reports/failure-causes
openapi: 3.1.0
info:
  contact:
    email: support@scrip.dev
    name: Scrip Support
  description: >-
    Scrip is the operating system for rewards programs. Use this REST API to
    send events, read balances and history, trigger redemptions, and configure
    programs, assets, rules, tiers, and rewards. Full guides and reference:
    https://docs.scrip.dev


    Base URLs:

    - **Sandbox:** `https://api-sandbox.scrip.dev` (keys start with `sk_test_`)

    - **Production:** `https://api.scrip.dev` (keys start with `sk_live_`)


    Authentication & headers:

    - Pass `Authorization: Bearer <api_key>` on every request.

    - Pass `Content-Type: application/json` on requests with a JSON body.


    Response envelopes:

    - **List endpoints** return `{"data": [...], "pagination": {"has_more":
    false, "next_cursor": null}}`.

    - **Single-resource endpoints** return the resource object directly.

    - **Errors** return `{"type": "...", "code": "...", "message": "...",
    "request_id": "...", "doc_url": "..."}` (plus `param`, `fields`, or
    `details` when applicable). Match on `code` in your error handling and
    include `request_id` when contacting support.


    Participant identifiers: every `{participant_id}` path accepts either
    Scrip's UUID or `ext:` followed by your own `external_id` (for example,
    `/v1/participants/ext:user_123/balances`).


    Idempotency: every operation carries `x-scrip-idempotency` (`replay`,
    `conflict_safe`, `natural_key`, or `none`). On `replay` routes, repeating a
    request with the same `Idempotency-Key` within 24 hours returns the original
    response with `Idempotent-Replayed: true`.
  license:
    name: Proprietary
  termsOfService: https://scrip.dev/terms
  title: Scrip API
  version: '1.0'
servers:
  - description: Production
    url: https://api.scrip.dev
  - description: Sandbox
    url: https://api-sandbox.scrip.dev
security: []
tags:
  - description: Create and manage rewards programs and program wallets.
    name: Programs
  - description: Group programs and other folders inside your organization.
    name: Folders
  - description: Define and manage units of value (points, cashback, credits).
    name: Assets
  - description: Manage participants, balances, state, and transaction history.
    name: Participants
  - description: Manage participant groups with shared balances and state.
    name: Groups
  - description: Create, validate, simulate, and version earn rules.
    name: Rules
  - description: Ingest, inspect, retry, and reverse user events.
    name: Events
  - description: Transfer balances between participants and groups.
    name: Transfers
  - description: >-
      Liability, rollforward, attribution, expiration, activity, and fulfillment
      cost reports.
    name: Reporting
  - description: >-
      Redeem participant balances for catalog items, gift cards, or custom
      amounts.
    name: Redemptions
  - description: Manage items in a program's rewards catalog.
    name: Rewards
  - description: Schedule recurring, one-time, or participant-state-triggered events.
    name: Automations
  - description: >-
      Configure ranked tier tracks, qualification criteria, and downgrade
      policies.
    name: Tiers
  - description: Inspect double-entry ledger records for auditing and reconciliation.
    name: Journal Entries
  - description: >-
      Manage webhook endpoints and delivery logs. Webhooks notify your
      application of real-time events via HTTP POST with HMAC-SHA256 signatures.
    name: Webhooks
  - description: >-
      Inspect the gift-card provider accounts that fulfill redemptions, and the
      products each one offers.
    name: Fulfillment Accounts
  - description: >-
      Connect a program to a fulfillment account so its catalog backs rewards,
      and choose which products the program offers.
    name: Reward Sources
  - description: >-
      Group a program's rules into ordered sets, and reorder the sets and the
      rules inside them.
    name: Rule Sets
  - description: >-
      Events Scrip sends to your webhook endpoints. Each key under `webhooks` is
      an event type, and its request body is the delivery.
    name: Webhook events
paths:
  /v1/reports/failure-causes:
    get:
      tags:
        - Reporting
      summary: List failure causes
      description: >-
        List event failures by their first error code and current state, grouped
        by rewards program or across programs.
      operationId: listEventFailureCauses
      parameters:
        - description: Return at most this many records, from 1 to 200, default 50.
          example: 50
          in: query
          name: limit
          schema:
            default: 50
            maximum: 200
            minimum: 1
            type: integer
        - description: >-
            The next_cursor from the previous response, valid only with the same
            endpoint and filters.
          in: query
          name: cursor
          schema:
            type: string
        - description: >-
            Return only the causes in this rewards program. Combine with
            `error_code` to read one cause.
          example: 8f14e45f-ceea-4e70-9df8-2a7d1b3c9f01
          in: query
          name: program_id
          schema:
            format: uuid
            type: string
        - description: >-
            Filter to programs in this folder and its nested subfolders.
            Mutually exclusive with `program_id`.
          example: 2c4e6a80-b1d3-4f57-8a92-c3e5a7b9d134
          in: query
          name: folder_id
          schema:
            format: uuid
            type: string
        - description: 'Return only this cause: the error_code its events first failed with.'
          in: query
          name: error_code
          schema:
            maxLength: 100
            type: string
        - description: >-
            Count only events that first failed at or after this timestamp (RFC
            3339, requires `period_end`).
          example: '2027-01-01T00:00:00Z'
          in: query
          name: period_start
          schema:
            format: date-time
            type: string
        - description: >-
            Count only events that first failed at or before this timestamp (RFC
            3339, requires `period_start`).
          example: '2027-12-31T23:59:59Z'
          in: query
          name: period_end
          schema:
            format: date-time
            type: string
        - description: >-
            Return only causes with at least one open failure (true) or with
            none (false).
          in: query
          name: open
          schema:
            type: boolean
        - description: >-
            Send `error_code` to aggregate across programs (`program_count`
            replaces `program_id`).
          in: query
          name: group_by
          schema:
            enum:
              - error_code
            type: string
      responses:
        '200':
          content:
            application/json:
              examples:
                default:
                  value:
                    data:
                      - event_count: 214
                        open_count: 152
                        participant_count: 188
                        program_id: 8f14e45f-ceea-4e70-9df8-2a7d1b3c9f01
                        states:
                          acknowledged: 8
                          completed: 54
                          failed_again: 28
                          open: 124
                          retrying: 0
                    pagination:
                      has_more: true
                      next_cursor: YWJjMTIz
              schema:
                $ref: '#/components/schemas/EventFailureCauseListResponse'
          description: Failure causes
          headers:
            X-RateLimit-Limit:
              $ref: '#/components/headers/X-RateLimit-Limit'
            X-RateLimit-Remaining:
              $ref: '#/components/headers/X-RateLimit-Remaining'
            X-RateLimit-Reset:
              $ref: '#/components/headers/X-RateLimit-Reset'
            X-Request-ID:
              $ref: '#/components/headers/X-Request-ID'
        '400':
          content:
            application/json:
              examples:
                validation_error:
                  summary: >-
                    One or more request fields are missing, malformed or not
                    allowed; `fields` lists each one.
                  value:
                    code: validation_error
                    doc_url: https://docs.scrip.dev/errors#validation_error
                    fields:
                      - field: program_id
                        message: program_id is not valid.
                        reason: invalid_format
                    message: program_id is not valid.
                    param: program_id
                    request_id: req_6f1c2d7e-4b7a-4c0e-9c1a-2f3e4d5c6b7a
                    type: invalid_request
              schema:
                $ref: '#/components/schemas/ErrBadRequestResponse'
          description: >-
            Invalid query parameters, or folder_id sent with program_id (code:
            validation_error)
          headers:
            X-RateLimit-Limit:
              $ref: '#/components/headers/X-RateLimit-Limit'
            X-RateLimit-Remaining:
              $ref: '#/components/headers/X-RateLimit-Remaining'
            X-RateLimit-Reset:
              $ref: '#/components/headers/X-RateLimit-Reset'
            X-Request-ID:
              $ref: '#/components/headers/X-Request-ID'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '404':
          content:
            application/json:
              examples:
                folder_not_found:
                  summary: No folder with that id exists in your organization.
                  value:
                    code: folder_not_found
                    doc_url: https://docs.scrip.dev/errors#folder_not_found
                    message: No folder with that id exists in your organization.
                    request_id: req_6f1c2d7e-4b7a-4c0e-9c1a-2f3e4d5c6b7a
                    type: not_found
              schema:
                $ref: '#/components/schemas/ErrNotFoundResponse'
          description: 'The folder was not found (code: folder_not_found)'
          headers:
            X-RateLimit-Limit:
              $ref: '#/components/headers/X-RateLimit-Limit'
            X-RateLimit-Remaining:
              $ref: '#/components/headers/X-RateLimit-Remaining'
            X-RateLimit-Reset:
              $ref: '#/components/headers/X-RateLimit-Reset'
            X-Request-ID:
              $ref: '#/components/headers/X-Request-ID'
        '429':
          $ref: '#/components/responses/TooManyRequests'
        '500':
          $ref: '#/components/responses/InternalError'
      security:
        - BearerAuth: []
components:
  schemas:
    EventFailureCauseListResponse:
      description: >-
        One page of failure causes, with the pagination details for the next
        page.
      properties:
        data:
          description: The failure causes on this page.
          items:
            $ref: '#/components/schemas/EventFailureCause'
          type: array
        pagination:
          $ref: '#/components/schemas/PaginationResponse'
          description: Whether another page follows, and the cursor that fetches it.
      type: object
    ErrBadRequestResponse:
      additionalProperties: false
      description: 'The error body for a 400 response: the request itself is wrong.'
      properties:
        code:
          description: >-
            The specific reason for the error. Branch on this value, not on
            message
          examples:
            - validation_error
          type: string
        details:
          additionalProperties: true
          description: Extra context for this code, documented per code on the errors page
          type: object
        doc_url:
          description: A link to this code on the errors page
          examples:
            - https://docs.scrip.dev/errors#validation_error
          type: string
        fields:
          description: Every failing field on a validation_error, reported in one pass
          items:
            $ref: '#/components/schemas/ErrorFieldDetail'
          type: array
        message:
          description: What happened and what to do next, in one or two sentences
          examples:
            - The request failed validation. Fix every field listed in fields.
          type: string
        param:
          description: The one request field at fault, when there is one
          type: string
        request_id:
          description: >-
            The id of this request, the same req_ value as the X-Request-ID
            response header. Quote it when you contact support
          examples:
            - req_6f1c2d7e-4b7a-4c0e-9c1a-2f3e4d5c6b7a
          type: string
        type:
          description: The error family. It is one value per HTTP status
          examples:
            - invalid_request
          type: string
      type: object
    ErrNotFoundResponse:
      description: >-
        The error body for a 404 response: the resource does not exist in your
        organization.
      properties:
        code:
          description: >-
            The specific reason for the error. Branch on this value, not on
            message
          examples:
            - participant_not_found
          type: string
        details:
          additionalProperties: true
          description: Extra context for this code, documented per code on the errors page
          type: object
        doc_url:
          description: A link to this code on the errors page
          examples:
            - https://docs.scrip.dev/errors#participant_not_found
          type: string
        fields:
          description: Every failing field on a validation_error, reported in one pass
          items:
            $ref: '#/components/schemas/ErrorFieldDetail'
          type: array
        message:
          description: What happened and what to do next, in one or two sentences
          examples:
            - The participant was not found.
          type: string
        param:
          description: The one request field at fault, when there is one
          type: string
        request_id:
          description: >-
            The id of this request, the same req_ value as the X-Request-ID
            response header. Quote it when you contact support
          examples:
            - req_6f1c2d7e-4b7a-4c0e-9c1a-2f3e4d5c6b7a
          type: string
        type:
          description: The error family. It is one value per HTTP status
          examples:
            - not_found
          type: string
      type: object
    EventFailureCause:
      description: >-
        Events grouped by the first `error_code` they failed with and their
        current state.
      properties:
        error_code:
          description: >-
            The cause: the error_code these events first failed with. An event
            keeps it after a retry.
          examples:
            - participant_inactive
          type: string
        error_message:
          description: >-
            Error message from the newest `FAILED` event that still carries this
            `error_code` (absent when all events have been retried or failed
            with another code).
          examples:
            - Participant is suspended
          type: string
        event_count:
          description: >-
            How many events first failed with this error_code, whatever they are
            now.
          examples:
            - 214
          type: integer
        first_failed_at:
          description: When the earliest of these events first failed (RFC 3339).
          examples:
            - '2027-01-15T10:30:00Z'
          format: date-time
          type: string
        last_failed_at:
          description: When the latest of these events first failed (RFC 3339).
          examples:
            - '2027-01-15T10:30:00Z'
          format: date-time
          type: string
        open_count:
          description: >-
            How many of these events are open failures now: FAILED and not
            acknowledged. The sum of states.open and states.failed_again.
          examples:
            - 152
          type: integer
        open_participant_count:
          description: >-
            Distinct participants with at least one open failure for this cause.
            Present only with `group_by=error_code`.
          examples:
            - 140
          type: integer
        open_program_count:
          description: >-
            How many distinct rewards programs have at least one open failure
            for this cause. Present only with `group_by=error_code`.
          examples:
            - 3
          type: integer
        participant_count:
          description: Distinct participants affected by these events.
          examples:
            - 188
          type: integer
        program_count:
          description: >-
            How many distinct rewards programs these events belong to. Present
            only with `group_by=error_code`.
          examples:
            - 12
          type: integer
        program_id:
          description: >-
            The rewards program the events belong to. With
            `group_by=error_code`, rows carry `program_count` instead.
          examples:
            - 8f14e45f-ceea-4e70-9df8-2a7d1b3c9f01
          format: uuid
          type: string
        states:
          $ref: '#/components/schemas/EventFailureStateCounts'
          description: The events counted by where each stands now.
      type: object
    PaginationResponse:
      description: Whether another page follows, and the cursor that fetches it.
      properties:
        has_more:
          description: Whether more results are available beyond this page
          examples:
            - true
          type: boolean
        next_cursor:
          description: Cursor to fetch the next page. Null on the last page
          examples:
            - YWJjMTIz
          type:
            - string
            - 'null'
      required:
        - has_more
        - next_cursor
      type: object
    ErrorFieldDetail:
      description: 'One failing field: its JSON name, why it failed, and what to change.'
      properties:
        field:
          description: The JSON name of the failing field, with dots for nested fields
          type: string
        message:
          description: What to change in this field
          type: string
        reason:
          description: >-
            Why the field failed: required, invalid_format, out_of_range,
            unknown_field, not_allowed or too_long
          examples:
            - required
          type: string
      type: object
    ErrUnauthorizedResponse:
      description: 'The error body for a 401 response: the API key is missing or not valid.'
      properties:
        code:
          description: >-
            The specific reason for the error. Branch on this value, not on
            message
          examples:
            - invalid_api_key
          type: string
        details:
          additionalProperties: true
          description: Extra context for this code, documented per code on the errors page
          type: object
        doc_url:
          description: A link to this code on the errors page
          examples:
            - https://docs.scrip.dev/errors#invalid_api_key
          type: string
        fields:
          description: Every failing field on a validation_error, reported in one pass
          items:
            $ref: '#/components/schemas/ErrorFieldDetail'
          type: array
        message:
          description: What happened and what to do next, in one or two sentences
          examples:
            - >-
              The API key in the Authorization header is unknown, revoked or
              needs rotation.
          type: string
        param:
          description: The one request field at fault, when there is one
          type: string
        request_id:
          description: >-
            The id of this request, the same req_ value as the X-Request-ID
            response header. Quote it when you contact support
          examples:
            - req_6f1c2d7e-4b7a-4c0e-9c1a-2f3e4d5c6b7a
          type: string
        type:
          description: The error family. It is one value per HTTP status
          examples:
            - authentication
          type: string
      type: object
    ErrTooManyRequestsResponse:
      additionalProperties: false
      description: >-
        The error body for a 429 response: you sent more requests than the rate
        limit allows.
      properties:
        code:
          description: >-
            The specific reason for the error. Branch on this value, not on
            message
          examples:
            - rate_limit_exceeded
          type: string
        details:
          additionalProperties: true
          description: Extra context for this code, documented per code on the errors page
          type: object
        doc_url:
          description: A link to this code on the errors page
          examples:
            - https://docs.scrip.dev/errors#rate_limit_exceeded
          type: string
        fields:
          description: Every failing field on a validation_error, reported in one pass
          items:
            $ref: '#/components/schemas/ErrorFieldDetail'
          type: array
        message:
          description: What happened and what to do next, in one or two sentences
          examples:
            - Rate limit exceeded. Wait for the Retry-After delay, then retry.
          type: string
        param:
          description: The one request field at fault, when there is one
          type: string
        request_id:
          description: >-
            The id of this request, the same req_ value as the X-Request-ID
            response header. Quote it when you contact support
          examples:
            - req_6f1c2d7e-4b7a-4c0e-9c1a-2f3e4d5c6b7a
          type: string
        type:
          description: The error family. It is one value per HTTP status
          examples:
            - rate_limited
          type: string
      type: object
    ErrInternalResponse:
      description: >-
        The error body for a 500 response: something failed on Scrip's side.
        Quote the `request_id` when you contact support.
      properties:
        code:
          description: >-
            The specific reason for the error. Branch on this value, not on
            message
          examples:
            - internal_error
          type: string
        doc_url:
          description: A link to this code on the errors page
          examples:
            - https://docs.scrip.dev/errors#internal_error
          type: string
        message:
          description: What happened and what to do next, in one or two sentences
          examples:
            - >-
              An internal error occurred. Retry the request; if it keeps
              failing, contact support with the request_id.
          type: string
        request_id:
          description: >-
            The id of this request, the same req_ value as the X-Request-ID
            response header. Quote it when you contact support
          examples:
            - req_6f1c2d7e-4b7a-4c0e-9c1a-2f3e4d5c6b7a
          type: string
        type:
          description: The error family. It is one value per HTTP status
          examples:
            - internal
          type: string
      type: object
    EventFailureStateCounts:
      description: >-
        A cause's events counted by where each stands now. The counts add up to
        event_count.
      properties:
        acknowledged:
          description: FAILED and acknowledged.
          examples:
            - 8
          type: integer
        completed:
          description: Retried and COMPLETED.
          examples:
            - 54
          type: integer
        failed_again:
          description: Retried, then FAILED again, and not acknowledged.
          examples:
            - 28
          type: integer
        open:
          description: FAILED and not acknowledged, and not retried since it first failed.
          examples:
            - 124
          type: integer
        retrying:
          description: Retried and still PENDING or PROCESSING.
          examples:
            - 0
          type: integer
      type: object
  headers:
    X-RateLimit-Limit:
      description: Request ceiling enforced by the API instance that served your request.
      schema:
        examples:
          - 1000
        type: integer
    X-RateLimit-Remaining:
      description: Requests left before the instance that served your request returns 429.
      schema:
        examples:
          - 0
        type: integer
    X-RateLimit-Reset:
      description: >-
        Unix time in seconds when the instance that served your request has its
        full allowance again.
      schema:
        examples:
          - 1790000000
        type: integer
    X-Request-ID:
      description: >-
        The id of this request, the same `req_` value as `request_id` in an
        error body. Quote it when you contact support.
      schema:
        examples:
          - req_6f1c2d7e-4b7a-4c0e-9c1a-2f3e4d5c6b7a
        type: string
    WWW-Authenticate:
      description: >-
        The authentication challenge: `Bearer realm="scrip"`. Send your API key
        as a bearer token.
      schema:
        examples:
          - Bearer realm="scrip"
        type: string
    Retry-After:
      description: Seconds to wait before you retry, rounded up to a whole second.
      schema:
        examples:
          - 1
        type: integer
  responses:
    Unauthorized:
      content:
        application/json:
          examples:
            authentication_required:
              summary: The request carried no API key or session token.
              value:
                code: authentication_required
                doc_url: https://docs.scrip.dev/errors#authentication_required
                message: The request carried no API key or session token.
                request_id: req_6f1c2d7e-4b7a-4c0e-9c1a-2f3e4d5c6b7a
                type: authentication
            invalid_api_key:
              summary: >-
                The API key in the `Authorization` header is unknown, revoked or
                needs rotation.
              value:
                code: invalid_api_key
                doc_url: https://docs.scrip.dev/errors#invalid_api_key
                message: >-
                  The API key in the Authorization header is unknown, revoked or
                  needs rotation.
                request_id: req_6f1c2d7e-4b7a-4c0e-9c1a-2f3e4d5c6b7a
                type: authentication
          schema:
            $ref: '#/components/schemas/ErrUnauthorizedResponse'
      description: >-
        The API key is missing or not valid. See
        [Authentication](https://docs.scrip.dev/authentication).
      headers:
        WWW-Authenticate:
          $ref: '#/components/headers/WWW-Authenticate'
        X-Request-ID:
          $ref: '#/components/headers/X-Request-ID'
    TooManyRequests:
      content:
        application/json:
          examples:
            rate_limit_exceeded:
              summary: Your organization sent more requests than the rate limit allows.
              value:
                code: rate_limit_exceeded
                doc_url: https://docs.scrip.dev/errors#rate_limit_exceeded
                message: >-
                  Your organization sent more requests than the rate limit
                  allows.
                request_id: req_6f1c2d7e-4b7a-4c0e-9c1a-2f3e4d5c6b7a
                type: rate_limited
          schema:
            $ref: '#/components/schemas/ErrTooManyRequestsResponse'
      description: >-
        Too many requests. Wait the number of seconds in the `Retry-After`
        header, then retry. See [Limits and
        durations](https://docs.scrip.dev/limits#rate-limits).
      headers:
        Retry-After:
          $ref: '#/components/headers/Retry-After'
        X-RateLimit-Limit:
          $ref: '#/components/headers/X-RateLimit-Limit'
        X-RateLimit-Remaining:
          $ref: '#/components/headers/X-RateLimit-Remaining'
        X-RateLimit-Reset:
          $ref: '#/components/headers/X-RateLimit-Reset'
        X-Request-ID:
          $ref: '#/components/headers/X-Request-ID'
    InternalError:
      content:
        application/json:
          examples:
            internal_error:
              summary: Scrip hit an unexpected error while handling the request.
              value:
                code: internal_error
                doc_url: https://docs.scrip.dev/errors#internal_error
                message: Scrip hit an unexpected error while handling the request.
                request_id: req_6f1c2d7e-4b7a-4c0e-9c1a-2f3e4d5c6b7a
                type: internal
          schema:
            $ref: '#/components/schemas/ErrInternalResponse'
      description: >-
        Something failed on Scrip's side. Retry the request, and quote
        `request_id` if it keeps failing.
        [Errors](https://docs.scrip.dev/errors) lists every code, and the [API
        introduction](https://docs.scrip.dev/api-reference/introduction)
        describes the error format.
      headers:
        X-RateLimit-Limit:
          $ref: '#/components/headers/X-RateLimit-Limit'
        X-RateLimit-Remaining:
          $ref: '#/components/headers/X-RateLimit-Remaining'
        X-RateLimit-Reset:
          $ref: '#/components/headers/X-RateLimit-Reset'
        X-Request-ID:
          $ref: '#/components/headers/X-Request-ID'
  securitySchemes:
    BearerAuth:
      description: 'Send your API key as `Authorization: Bearer <key>`.'
      scheme: bearer
      type: http
      x-default: sk_...

````

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