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

# Check usage allowance

> Checks whether an access grant can perform an action without recording usage. Items may declare maxQuantity instead of quantity to gate an unknown amount at its ceiling, or declare neither to gate against the meter's configured default cap.



## OpenAPI

````yaml https://api.zeroclick.io/openapi.json post /v1/usage/check
openapi: 3.0.0
info:
  title: ZeroClick API
  description: >-
    REST API for managing ZeroClick sellers, services, pricing, usage, and
    analytics. Authenticate with an API key from the ZeroClick dashboard.
  version: 1.0.0
servers:
  - url: https://api.zeroclick.io
security:
  - bearerAuth: []
tags:
  - name: API keys
  - name: Sellers
  - name: Services
  - name: Meters
  - name: Plans
  - name: Plan meter prices
  - name: Usage
  - name: Analytics
  - name: Stripe Connect
  - name: Sandbox
  - name: Organizations
  - name: Users
paths:
  /v1/usage/check:
    post:
      tags:
        - Usage
      summary: Check usage allowance
      description: >-
        Checks whether an access grant can perform an action without recording
        usage. Items may declare maxQuantity instead of quantity to gate an
        unknown amount at its ceiling, or declare neither to gate against the
        meter's configured default cap.
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                zcRequestId:
                  type: string
                  minLength: 1
                serviceSlug:
                  type: string
                  minLength: 1
                  maxLength: 80
                  pattern: ^[a-z0-9]+(?:-[a-z0-9]+)*$
                usage:
                  minItems: 1
                  maxItems: 20
                  type: array
                  items:
                    type: object
                    properties:
                      meterSlug:
                        type: string
                        minLength: 1
                        maxLength: 80
                        pattern: ^[a-z][a-z0-9_]*$
                      quantity:
                        type: integer
                        minimum: 1
                        maximum: 2147483647
                      maxQuantity:
                        type: integer
                        minimum: 1
                        maximum: 2147483647
                    required:
                      - meterSlug
              required:
                - zcRequestId
                - serviceSlug
                - usage
      responses:
        '200':
          description: Default Response
          content:
            application/json:
              schema:
                type: object
                properties:
                  allowed:
                    type: boolean
                  reason:
                    nullable: true
                    type: string
                    enum:
                      - service_not_found
                      - access_not_found
                      - access_inactive
                      - plan_expired
                      - meter_not_found
                      - meter_not_priced
                      - usage_exhausted
                required:
                  - allowed
                  - reason
                additionalProperties: false
        '402':
          description: Default Response
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: string
                    enum:
                      - service_not_found
                      - access_not_found
                      - access_inactive
                      - plan_expired
                      - meter_not_found
                      - meter_not_priced
                      - usage_exhausted
                      - insufficient_scope
                      - auth_type_not_allowed
                required:
                  - error
                additionalProperties: false
        '403':
          description: Default Response
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: string
                    enum:
                      - service_not_found
                      - access_not_found
                      - access_inactive
                      - plan_expired
                      - meter_not_found
                      - meter_not_priced
                      - usage_exhausted
                      - insufficient_scope
                      - auth_type_not_allowed
                required:
                  - error
                additionalProperties: false
        '404':
          description: Default Response
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: string
                    enum:
                      - service_not_found
                      - access_not_found
                      - access_inactive
                      - plan_expired
                      - meter_not_found
                      - meter_not_priced
                      - usage_exhausted
                      - insufficient_scope
                      - auth_type_not_allowed
                required:
                  - error
                additionalProperties: false
        '409':
          description: Default Response
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: string
                    enum:
                      - service_not_found
                      - access_not_found
                      - access_inactive
                      - plan_expired
                      - meter_not_found
                      - meter_not_priced
                      - usage_exhausted
                      - insufficient_scope
                      - auth_type_not_allowed
                required:
                  - error
                additionalProperties: false
components:
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      description: >-
        API key created in the ZeroClick dashboard under Settings → API keys.
        Keys start with `zc_`. Send them as `Authorization: Bearer zc_...`.

````