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

# Report usage for an entitlement

> Updates the usage count for a specific entitlement



## OpenAPI

````yaml specs/entitlements_api_docs.json put /api/v1/sub-entitlement/usage
openapi: 3.1.0
info:
  title: Entitlement API
  version: 1.0.0
  description: API for managing entitlements and plan entitlement quotas.
servers:
  - url: https://dev-entitlements-api.iqraa.ai/api/v1
    description: Production server
security: []
tags: []
paths:
  /api/v1/sub-entitlement/usage:
    put:
      tags:
        - Subscription Entitlements
      summary: Report usage for an entitlement
      description: Updates the usage count for a specific entitlement
      operationId: SubEntitlementController_reportUsage
      parameters:
        - name: x-admin-api-key
          in: header
          description: The API key to access the admin API
          required: true
          schema:
            type: string
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/ReportUsageDto'
      responses:
        '200':
          description: Usage reported successfully
        '400':
          description: Bad Request - Invalid usage value
        '401':
          description: Unauthorized - Missing or invalid admin API key
        '403':
          description: Forbidden - Usage exceeds quota or not reportable
        '404':
          description: Not Found - Entitlement or subscription not found
components:
  schemas:
    ReportUsageDto:
      type: object
      properties:
        subscriptionId:
          type: string
          description: The ID of the subscription
          example: 123e4567-e89b-12d3-a456-426614174000
        entitlementCode:
          type: string
          description: The code of the entitlement
          example: storage_quota
        usage:
          type: number
          description: The usage amount to report (defaults to 1 if not provided)
          example: 100
          default: 1
      required:
        - subscriptionId
        - entitlementCode

````