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

> ## Agent Instructions
> Unkey is two separate products. Compute builds, deploys, and runs apps behind a gateway. API Management issues API keys, enforces rate limits, manages identities and permissions, and reports usage. Say which product a page belongs to; a reader can use either without the other.
> Every Unkey API endpoint is an HTTP POST to https://api.unkey.com/v2/{service}.{procedure} with a root key in the Authorization: Bearer header. Root keys are workspace scoped.
> Error codes have the form err:{system}:{category}:{specific} and each has a page at /errors/{system}/{category}/{specific}.
> The word environment means production or preview in Compute. Rate limiting has four meanings on this site; the glossary lists them.

# Get API request metrics

> Count the requests that the Unkey API served for your workspace per time bucket, split by status class.

The filters have the same shape as in `logs.listApiRequests`, without `requestId`. In one field, values under `is`, `contains`, `startsWith`, and `endsWith` are combined with OR. Values under `isNot` and `notContains`, and the range operators `gt`, `gte`, `lt`, and `lte`, are combined with AND. Different fields are combined with AND. Every text match is exact and case-sensitive.

`filters.time` sets the window. A missing lower bound is the start of your log retention, and a missing upper bound is now. Unkey picks the bucket width from the window. It is the distance between the `time` of two points. The first bucket starts at or before the window start and counts its whole width. Windows reach back at most 100 days, and requests outside the log retention of your workspace are not counted.

**Required Permissions**

Your root key must have the following permission:
- `unkey:v1:<workspace_id>:logs/apiRequests#read`




## OpenAPI

````yaml https://spec.speakeasy.com/unkey/unkey/openapi-json-with-code-samples post /v2/logs.getApiRequestMetrics
openapi: 3.1.0
info:
  description: >-
    Unkey's API provides programmatic access for all resources within our
    platform.



    ### Authentication

    #

    This API accepts HTTP Bearer credentials. Public integrations use root keys.
    Dashboard-originated requests use a short-lived dashboard proxy JWT minted
    by the dashboard server. Most endpoints require permissions associated with
    the authenticated principal. When making public API requests, include your
    root key in the `Authorization` header:

    ```

    Authorization: Bearer unkey_xxxxxxxxxxx

    ```


    All responses follow a consistent envelope structure that separates
    operational metadata from actual data. This design provides several
    benefits:

    - Debugging: Every response includes a unique requestId for tracing issues

    - Consistency: Predictable response format across all endpoints

    - Extensibility: Easy to add new metadata without breaking existing
    integrations

    - Error Handling: Unified error format with actionable information


    ### Success Response Format:

    ```json

    {
      "meta": {
        "requestId": "req_123456"
      },
      "data": {
        // Actual response data here
      }
    }

    ```


    The meta object contains operational information:

    - `requestId`: Unique identifier for this request (essential for support)


    The data object contains the actual response data specific to each endpoint.


    ### Paginated Response Format:

    ```json

    {
      "meta": {
        "requestId": "req_123456"
      },
      "data": [
        // Array of results
      ],
      "pagination": {
        "cursor": "next_page_token",
        "hasMore": true
      }
    }

    ```


    The pagination object appears on list endpoints and contains:

    - `cursor`: Token for requesting the next page

    - `hasMore`: Whether more results are available


    ### Error Response Format:

    ```json

    {
      "meta": {
        "requestId": "req_2c9a0jf23l4k567"
      },
      "error": {
        "detail": "The resource you are attempting to modify is protected and cannot be changed",
        "status": 403,
        "title": "Forbidden",
        "type": "https://unkey.com/docs/errors/unkey/application/protected_resource"
      }
    }

    ```


    Error responses include comprehensive diagnostic information:

    - `title`: Human-readable error summary

    - `detail`: Specific description of what went wrong

    - `status`: HTTP status code

    - `type`: Link to error documentation

    - `errors`: Array of validation errors (for 400 responses)


    This structure ensures you always have the context needed to debug issues
    and take corrective action.
  title: Unkey API
  version: 2.0.0
servers:
  - url: https://api.unkey.com
security:
  - bearer: []
tags:
  - description: Analytics query operations
    name: analytics
  - description: API management operations
    name: apis
  - description: App management operations
    name: apps
  - description: Deployment operations
    name: deploy
  - description: Deployment operations
    name: deployments
  - description: Custom domain operations
    name: domains
  - description: Environment management operations
    name: environments
  - description: Identity management operations
    name: identities
  - description: API key management operations
    name: keys
  - description: Health check operations
    name: liveness
  - description: Log listing operations
    name: logs
  - description: Permission and role management operations
    name: permissions
  - description: Gateway policy operations
    name: gateway
  - description: Customer Portal session management
    name: portal
  - description: Rate limiting operations
    name: ratelimit
  - description: GitHub App installation operations
    name: github
  - description: Workspace limits and usage operations
    name: workspace
  - description: CLI device login
    name: cli
paths:
  /v2/logs.getApiRequestMetrics:
    post:
      tags:
        - logs
      summary: Get API request metrics
      description: >
        Count the requests that the Unkey API served for your workspace per time
        bucket, split by status class.


        The filters have the same shape as in `logs.listApiRequests`, without
        `requestId`. In one field, values under `is`, `contains`, `startsWith`,
        and `endsWith` are combined with OR. Values under `isNot` and
        `notContains`, and the range operators `gt`, `gte`, `lt`, and `lte`, are
        combined with AND. Different fields are combined with AND. Every text
        match is exact and case-sensitive.


        `filters.time` sets the window. A missing lower bound is the start of
        your log retention, and a missing upper bound is now. Unkey picks the
        bucket width from the window. It is the distance between the `time` of
        two points. The first bucket starts at or before the window start and
        counts its whole width. Windows reach back at most 100 days, and
        requests outside the log retention of your workspace are not counted.


        **Required Permissions**


        Your root key must have the following permission:

        - `unkey:v1:<workspace_id>:logs/apiRequests#read`
      operationId: logs.getApiRequestMetrics
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/V2LogsGetApiRequestMetricsRequestBody'
        required: true
      responses:
        '200':
          content:
            application/json:
              examples:
                empty:
                  summary: A window that ends before it starts
                  value:
                    data: []
                    meta:
                      requestId: req_1234abcd
                series:
                  summary: Two buckets of 30 minutes
                  value:
                    data:
                      - clientError: 31
                        serverError: 2
                        success: 1200
                        time: 1792018800000
                        total: 1233
                      - clientError: 0
                        serverError: 0
                        success: 0
                        time: 1792020600000
                        total: 0
                    meta:
                      requestId: req_1234abcd
              schema:
                $ref: '#/components/schemas/V2LogsGetApiRequestMetricsResponseBody'
          description: >-
            One point per bucket, oldest first, with zero counts for buckets
            without requests.
        '400':
          content:
            application/json:
              examples:
                unknownField:
                  summary: A filter field the metrics do not have
                  value:
                    error:
                      detail: >-
                        POST request body for '/v2/logs.getApiRequestMetrics'
                        failed to validate schema
                      errors:
                        - location: /properties/filters/$ref/additionalProperties
                          message: additional properties 'requestId' not allowed
                      status: 400
                      title: Bad Request
                      type: >-
                        https://unkey.com/docs/errors/unkey/application/invalid_input
                    meta:
                      requestId: req_1234abcd
              schema:
                $ref: '#/components/schemas/BadRequestErrorResponse'
          description: Bad request
        '401':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/UnauthorizedErrorResponse'
          description: Unauthorized
        '403':
          content:
            application/json:
              examples:
                missingPermission:
                  summary: Missing required permission
                  value:
                    error:
                      detail: >-
                        Missing permission:
                        'unkey:v1:ws_1234abcd:logs/apiRequests#read'
                      status: 403
                      title: Insufficient Permissions
                      type: >-
                        https://unkey.com/docs/errors/unkey/authorization/insufficient_permissions
                    meta:
                      requestId: req_1234abcd
              schema:
                $ref: '#/components/schemas/ForbiddenErrorResponse'
          description: >-
            Forbidden - Insufficient permissions (requires
            `unkey:v1:<workspace_id>:logs/apiRequests#read`)
        '422':
          content:
            application/json:
              examples:
                timeout:
                  summary: Query took too long
                  value:
                    error:
                      detail: >-
                        The query exceeds a read limit. Send a narrower
                        `filters.time` window or more filters, then try again.
                      status: 422
                      title: Unprocessable Entity
                      type: >-
                        https://unkey.com/docs/errors/user/unprocessable_entity/query_execution_timeout
                    meta:
                      requestId: req_1234abcd
              schema:
                $ref: '#/components/schemas/UnprocessableEntityErrorResponse'
          description: The query exceeds a query limit
        '429':
          content:
            application/json:
              examples:
                workspaceRateLimited:
                  summary: Workspace rate limit exceeded
                  value:
                    error:
                      detail: >-
                        This workspace has exceeded its API rate limit of
                        1000/1m0s. Please try again later.
                      status: 429
                      title: Too Many Requests
                      type: >-
                        https://unkey.com/docs/errors/user/too_many_requests/workspace_rate_limited
                    meta:
                      requestId: req_1234abcd
              schema:
                $ref: '#/components/schemas/TooManyRequestsErrorResponse'
          description: The workspace rate limit is exceeded
        '500':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/InternalServerErrorResponse'
          description: Internal server error
        '503':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ServiceUnavailableErrorResponse'
          description: The log store is not available
      security:
        - bearer: []
      x-codeSamples:
        - lang: go
          label: Go (SDK)
          source: "package main\n\nimport(\n\t\"context\"\n\t\"os\"\n\tunkey \"github.com/unkeyed/sdks/api/go/v3\"\n\t\"github.com/unkeyed/sdks/api/go/v3/models/components\"\n\t\"log\"\n)\n\nfunc main() {\n    ctx := context.Background()\n\n    s := unkey.New(\n        unkey.WithSecurity(os.Getenv(\"UNKEY_ROOT_KEY\")),\n    )\n\n    res, err := s.Logs.GetAPIRequestMetrics(ctx, components.V2LogsGetAPIRequestMetricsRequestBody{\n        Filters: &components.V2LogsGetAPIRequestMetricsFilters{\n            Time: &components.TimeFilter{\n                Gte: unkey.Pointer[int64](1791936000000),\n                Lt: unkey.Pointer[int64](1792022400000),\n            },\n            Path: &components.TextFilter{\n                NotContains: []string{\n                    \"verifyKey\",\n                },\n                StartsWith: []string{\n                    \"/v2/keys.\",\n                },\n            },\n            Method: &components.MethodFilter{\n                Is: []components.HTTPMethod{\n                    components.HTTPMethodPost,\n                    components.HTTPMethodPut,\n                },\n            },\n            Status: &components.IntFilter{\n                IsNot: []int64{\n                    429,\n                },\n                Gte: unkey.Pointer[int64](400),\n                Lt: unkey.Pointer[int64](600),\n            },\n        },\n    })\n    if err != nil {\n        log.Fatal(err)\n    }\n    if res.V2LogsGetAPIRequestMetricsResponseBody != nil {\n        // handle response\n    }\n}"
        - lang: python
          label: Python (SDK)
          source: |-
            from unkey.py import Unkey, models


            with Unkey(
                root_key="<YOUR_BEARER_TOKEN_HERE>",
            ) as unkey:

                res = unkey.logs.get_api_request_metrics(filters={
                    "time": {
                        "gte": 1791936000000,
                        "lt": 1792022400000,
                    },
                    "path": {
                        "not_contains": [
                            "verifyKey",
                        ],
                        "starts_with": [
                            "/v2/keys.",
                        ],
                    },
                    "method": {
                        "is_": [
                            models.HTTPMethod.POST,
                            models.HTTPMethod.PUT,
                        ],
                    },
                    "status": {
                        "is_not": [
                            429,
                        ],
                        "gte": 400,
                        "lt": 600,
                    },
                })

                # Handle response
                print(res)
        - lang: typescript
          label: Typescript (SDK)
          source: |-
            import { Unkey } from "@unkey/api";

            const unkey = new Unkey({
              rootKey: process.env["UNKEY_ROOT_KEY"] ?? "",
            });

            async function run() {
              const result = await unkey.logs.getApiRequestMetrics({
                filters: {
                  time: {
                    gte: 1791936000000,
                    lt: 1792022400000,
                  },
                  path: {
                    notContains: [
                      "verifyKey",
                    ],
                    startsWith: [
                      "/v2/keys.",
                    ],
                  },
                  method: {
                    is: [
                      "POST",
                      "PUT",
                    ],
                  },
                  status: {
                    isNot: [
                      429,
                    ],
                    gte: 400,
                    lt: 600,
                  },
                },
              });

              console.log(result);
            }

            run();
components:
  schemas:
    V2LogsGetApiRequestMetricsRequestBody:
      type: object
      properties:
        filters:
          $ref: '#/components/schemas/V2LogsGetApiRequestMetricsFilters'
      additionalProperties: false
    V2LogsGetApiRequestMetricsResponseBody:
      type: object
      required:
        - meta
        - data
      properties:
        meta:
          $ref: '#/components/schemas/Meta'
        data:
          type: array
          maxItems: 200
          items:
            $ref: '#/components/schemas/ApiRequestMetricsPoint'
          description: >-
            One point per bucket, oldest first, with no gaps. A bucket with no
            requests has a point with zero counts. The bucket width is the
            distance between the `time` of two points.
      additionalProperties: false
    BadRequestErrorResponse:
      type: object
      required:
        - meta
        - error
      properties:
        meta:
          $ref: '#/components/schemas/Meta'
        error:
          $ref: '#/components/schemas/BadRequestErrorDetails'
      description: >-
        Error response for invalid requests that cannot be processed due to
        client-side errors. This typically occurs when request parameters are
        missing, malformed, or fail validation rules. The response includes
        detailed information about the specific errors in the request, including
        the location of each error and suggestions for fixing it. When receiving
        this error, check the 'errors' array in the response for specific
        validation issues that need to be addressed before retrying.
    UnauthorizedErrorResponse:
      type: object
      required:
        - meta
        - error
      properties:
        meta:
          $ref: '#/components/schemas/Meta'
        error:
          $ref: '#/components/schemas/BaseError'
      description: >-
        Error response when authentication has failed or credentials are
        missing. This occurs when:

        - No authentication token is provided in the request

        - The provided token is invalid, expired, or malformed

        - The token format doesn't match expected patterns


        To resolve this error, ensure you're including a valid root key in the
        Authorization header.
    ForbiddenErrorResponse:
      type: object
      required:
        - meta
        - error
      properties:
        meta:
          $ref: '#/components/schemas/Meta'
        error:
          $ref: '#/components/schemas/BaseError'
      description: >-
        Error response when the provided credentials are valid but lack
        sufficient permissions for the requested operation. This occurs when:

        - The root key doesn't have the required permissions for this endpoint

        - The operation requires elevated privileges that the current key lacks

        - Access to the requested resource is restricted based on workspace
        settings


        To resolve this error, ensure your root key has the necessary
        permissions or contact your workspace administrator.
    UnprocessableEntityErrorResponse:
      type: object
      required:
        - meta
        - error
      properties:
        meta:
          $ref: '#/components/schemas/Meta'
        error:
          $ref: '#/components/schemas/BaseError'
      description: >-
        Error response when the request is syntactically valid but cannot be
        processed due to semantic constraints or resource limitations. This
        occurs when:

        - A query exceeds execution time limits

        - A query uses more memory than allowed

        - A query scans too many rows

        - A query result exceeds size limits


        The request syntax is correct, but the operation cannot be completed due
        to business rules or resource constraints. Review the error details for
        specific limitations and adjust your request accordingly.
    TooManyRequestsErrorResponse:
      type: object
      required:
        - meta
        - error
      properties:
        meta:
          $ref: '#/components/schemas/Meta'
        error:
          $ref: '#/components/schemas/BaseError'
      description: >-
        Error response when the client has sent too many requests in a given
        time period. This occurs when you've exceeded a rate limit or quota for
        the resource you're accessing.


        The rate limit resets automatically after the time window expires. To
        avoid this error:

        - Implement exponential backoff when retrying requests

        - Cache results where appropriate to reduce request frequency

        - Check the error detail message for specific quota information

        - Contact support if you need a higher quota for your use case
    InternalServerErrorResponse:
      type: object
      required:
        - meta
        - error
      properties:
        meta:
          $ref: '#/components/schemas/Meta'
        error:
          $ref: '#/components/schemas/BaseError'
      description: >-
        Error response when an unexpected error occurs on the server. This
        indicates a problem with Unkey's systems rather than your request.


        When you encounter this error:

        - The request ID in the response can help Unkey support investigate the
        issue

        - The error is likely temporary and retrying may succeed

        - If the error persists, contact Unkey support with the request ID
    ServiceUnavailableErrorResponse:
      type: object
      required:
        - meta
        - error
      properties:
        meta:
          $ref: '#/components/schemas/Meta'
        error:
          $ref: '#/components/schemas/BaseError'
      description: >-
        Error response when a required service is temporarily unavailable. This
        indicates that the service exists but cannot be reached or is not
        responding.


        When you encounter this error:

        - The service is likely experiencing temporary issues

        - Retrying the request after a short delay may succeed

        - If the error persists, the service may be undergoing maintenance

        - Contact Unkey support if the issue continues
    V2LogsGetApiRequestMetricsFilters:
      type: object
      additionalProperties: false
      description: >
        Filters for the metrics. They have the same shape as the filters of
        `logs.listApiRequests`, without `requestId`. A missing field does not
        filter. Different fields are combined with AND.
      properties:
        time:
          $ref: '#/components/schemas/TimeFilter'
        path:
          $ref: '#/components/schemas/TextFilter'
        method:
          $ref: '#/components/schemas/MethodFilter'
        status:
          $ref: '#/components/schemas/IntFilter'
    Meta:
      type: object
      required:
        - requestId
      properties:
        requestId:
          description: >-
            A unique id for this request. Always include this ID when contacting
            support about a specific API request. This identifier allows Unkey's
            support team to trace the exact request through logs and diagnostic
            systems to provide faster assistance.
          example: req_123
          type: string
      additionalProperties: false
      description: >-
        Metadata object included in every API response. This provides context
        about the request and is essential for debugging, audit trails, and
        support inquiries. The `requestId` is particularly important when
        troubleshooting issues with the Unkey support team.
    ApiRequestMetricsPoint:
      type: object
      required:
        - time
        - success
        - clientError
        - serverError
        - total
      additionalProperties: false
      description: The number of requests in one bucket.
      properties:
        time:
          type: integer
          format: int64
          description: The start of the bucket, in Unix milliseconds.
          example: 1792020600000
        success:
          type: integer
          format: int64
          description: The number of requests with a 2xx status.
          example: 1200
        clientError:
          type: integer
          format: int64
          description: The number of requests with a 4xx status.
          example: 31
        serverError:
          type: integer
          format: int64
          description: The number of requests with a 5xx status.
          example: 2
        total:
          type: integer
          format: int64
          description: >-
            The number of requests with any status. It also counts 1xx and 3xx
            responses, which have no field of their own.
          example: 1233
    BadRequestErrorDetails:
      allOf:
        - $ref: '#/components/schemas/BaseError'
        - type: object
          properties:
            errors:
              description: >-
                List of individual validation errors that occurred in the
                request. Each error provides specific details about what failed
                validation, where the error occurred in the request, and
                suggestions for fixing it. This granular information helps
                developers quickly identify and resolve multiple issues in a
                single request without having to make repeated API calls.
              items:
                $ref: '#/components/schemas/ValidationError'
              type: array
          required:
            - errors
      description: >-
        Extended error details specifically for bad request (400) errors. This
        builds on the BaseError structure by adding an array of individual
        validation errors, making it easy to identify and fix multiple issues at
        once.
    BaseError:
      properties:
        detail:
          description: >-
            A human-readable explanation specific to this occurrence of the
            problem. This provides detailed information about what went wrong
            and potential remediation steps. The message is intended to be
            helpful for developers troubleshooting the issue.
          example: Property foo is required but is missing.
          type: string
        status:
          description: >-
            HTTP status code that corresponds to this error. This will match the
            status code in the HTTP response. Common codes include `400` (Bad
            Request), `401` (Unauthorized), `403` (Forbidden), `404` (Not
            Found), `409` (Conflict), and `500` (Internal Server Error).
          example: 404
          format: int
          type: integer
        title:
          description: >-
            A short, human-readable summary of the problem type. This remains
            constant from occurrence to occurrence of the same problem and
            should be used for programmatic handling.
          example: Not Found
          type: string
        type:
          description: >-
            A URI reference that identifies the problem type. This provides a
            stable identifier for the error that can be used for documentation
            lookups and programmatic error handling. When followed, this URI
            should provide human-readable documentation for the problem type.
          example: https://unkey.com/docs/errors/unkey/resource/not_found
          type: string
      required:
        - title
        - detail
        - status
        - type
      type: object
      additionalProperties: false
      description: >-
        Base error structure following Problem Details for HTTP APIs (RFC 7807).
        This provides a standardized way to carry machine-readable details of
        errors in HTTP response content.
    TimeFilter:
      type: object
      additionalProperties: false
      description: >
        Filters by the time of the event, in Unix milliseconds. Every bound is
        combined with AND.

        Rows older than the workspace's retention are never returned or counted,
        whatever the bounds.
      properties:
        gt:
          type: integer
          format: int64
          minimum: 0
          description: Keep events after this time.
        gte:
          type: integer
          format: int64
          minimum: 0
          description: Keep events at or after this time.
        lt:
          type: integer
          format: int64
          minimum: 0
          description: Keep events before this time.
        lte:
          type: integer
          format: int64
          minimum: 0
          description: Keep events at or before this time.
      example:
        gte: 1791936000000
        lt: 1792022400000
    TextFilter:
      type: object
      additionalProperties: false
      description: >
        Filters a text field. Every operator is exact and case-sensitive. `%`
        and `_` match only themselves.

        The positive operators (`is`, `contains`, `startsWith`, `endsWith`) are
        combined with OR.

        The negated operators (`isNot`, `notContains`) are combined with AND.
      properties:
        is:
          $ref: '#/components/schemas/StringValues'
          description: Keep rows where the field equals one of the values.
        isNot:
          $ref: '#/components/schemas/StringValues'
          description: Remove rows where the field equals one of the values.
        contains:
          $ref: '#/components/schemas/StringValues'
          description: Keep rows where the field contains one of the values.
        notContains:
          $ref: '#/components/schemas/StringValues'
          description: Remove rows where the field contains one of the values.
        startsWith:
          $ref: '#/components/schemas/StringValues'
          description: Keep rows where the field starts with one of the values.
        endsWith:
          $ref: '#/components/schemas/StringValues'
          description: Keep rows where the field ends with one of the values.
      example:
        startsWith:
          - /v2/keys.
        notContains:
          - verifyKey
    MethodFilter:
      type: object
      additionalProperties: false
      description: Filters by HTTP method.
      properties:
        is:
          type: array
          minItems: 1
          uniqueItems: true
          items:
            $ref: '#/components/schemas/HttpMethod'
          description: Keep rows with one of these methods.
        isNot:
          type: array
          minItems: 1
          uniqueItems: true
          items:
            $ref: '#/components/schemas/HttpMethod'
          description: Remove rows with one of these methods.
      example:
        is:
          - POST
          - PUT
    IntFilter:
      type: object
      additionalProperties: false
      description: >
        Filters an integer field. `is` keeps rows that equal one of its values.

        `isNot` and every bound (`gt`, `gte`, `lt`, `lte`) are combined with
        AND, so `{ "is": [200], "gte": 400 }` matches no rows.
      properties:
        is:
          $ref: '#/components/schemas/IntValues'
          description: Keep rows where the field equals one of the values.
        isNot:
          $ref: '#/components/schemas/IntValues'
          description: Remove rows where the field equals one of the values.
        gt:
          type: integer
          format: int64
          description: Keep rows where the field is greater than this value.
        gte:
          type: integer
          format: int64
          description: Keep rows where the field is greater than or equal to this value.
        lt:
          type: integer
          format: int64
          description: Keep rows where the field is less than this value.
        lte:
          type: integer
          format: int64
          description: Keep rows where the field is less than or equal to this value.
      example:
        gte: 400
        lt: 600
        isNot:
          - 429
    ValidationError:
      additionalProperties: false
      properties:
        location:
          description: >-
            JSON path indicating exactly where in the request the error
            occurred. This helps pinpoint the problematic field or parameter.
            Examples include:

            - 'body.name' (field in request body)

            - 'body.items[3].tags' (nested array element)

            - 'path.apiId' (path parameter)

            - 'query.limit' (query parameter)

            Use this location to identify exactly which part of your request
            needs correction.
          type: string
          example: body.permissions[0].name
        message:
          description: >-
            Detailed error message explaining what validation rule was violated.
            This provides specific information about why the field or parameter
            was rejected, such as format errors, invalid values, or constraint
            violations.
          type: string
          example: Must be at least 3 characters long
        fix:
          description: >-
            A human-readable suggestion describing how to fix the error. This
            provides practical guidance on what changes would satisfy the
            validation requirements. Not all validation errors include fix
            suggestions, but when present, they offer specific remediation
            advice.
          type: string
          example: >-
            Ensure the name uses only alphanumeric characters, underscores, and
            hyphens
      required:
        - location
        - message
      type: object
      description: >-
        Individual validation error details. Each validation error provides
        precise information about what failed, where it failed, and how to fix
        it, enabling efficient error resolution.
    StringValues:
      type: array
      minItems: 1
      maxItems: 10
      items:
        type: string
        minLength: 1
        maxLength: 1024
      description: >
        The values of one filter operator. A row matches a positive operator
        when it matches any value in the list.

        A row matches a negated operator only when it matches none of the
        values.
    HttpMethod:
      type: string
      enum:
        - GET
        - POST
        - PUT
        - PATCH
        - DELETE
        - HEAD
        - OPTIONS
      description: An HTTP method in upper case.
      example: POST
    IntValues:
      type: array
      minItems: 1
      maxItems: 10
      items:
        type: integer
        format: int64
      description: >
        The values of one filter operator. A row matches `is` when it equals any
        value in the list.

        A row matches `isNot` only when it equals none of the values.
  securitySchemes:
    bearer:
      bearerFormat: bearer token
      description: >-
        Unkey uses bearer tokens for authentication. Public integrations use
        root keys, while the dashboard proxy uses short-lived JWTs.

        To authenticate, include the token in the Authorization header of each
        request:

        ```

        Authorization: Bearer unkey_123

        ```

        Root keys have specific permissions attached to them, controlling what
        operations they can perform. Resource permissions use Unkey Resource
        Names plus actions, like
        `unkey:v1:ws_123:projects/*/keyspaces/*/keys/*#write`.

        Security best practices:

        - Keep root keys secure and never expose them in client-side code

        - Use different root keys for different environments

        - Rotate keys periodically, especially after team member departures

        - Create keys with minimal necessary permissions following least
        privilege principle

        - Monitor key usage with audit logs.
      scheme: bearer
      type: http
      x-speakeasy-name-override: rootKey

````

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