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

# Create usage events for a subscription



## OpenAPI

````yaml /openapi/provider.api.yaml post /subscriptions/{subscriptionId}/usage-events/
openapi: 3.0.3
info:
  title: Nadles Provider API
  version: '0.1'
  description: Nadles Provider API allows managing products, customers and subscriptions
  x-logo:
    url: ''
servers:
  - url: https://provider.api.nadles.com/v0
    description: ''
security:
  - defaultApiKey: []
tags: []
paths:
  /subscriptions/{subscriptionId}/usage-events/:
    post:
      summary: Create usage events for a subscription
      operationId: createSubscriptionUsageEvents
      parameters:
        - name: subscriptionId
          in: path
          required: true
          description: The ID of the subscription.
          schema:
            type: string
      requestBody:
        required: true
        content:
          application/json:
            schema:
              oneOf:
                - $ref: '#/components/schemas/UsageEvent'
                - type: array
                  items:
                    $ref: '#/components/schemas/UsageEvent'
      responses:
        '200':
          description: OK
        '400':
          description: Bad Request
components:
  schemas:
    UsageEvent:
      type: object
      properties:
        request_id:
          type: string
          format: uuid
          nullable: true
        label:
          type: string
          description: Billable metric label
        value:
          type: integer
          format: int64
        timestamp:
          type: string
          format: date-time
          nullable: true
        metadata:
          type: object
          additionalProperties:
            type: string
          nullable: true
      required:
        - label
        - value
  securitySchemes:
    defaultApiKey:
      description: API key provided in the admin portal
      type: apiKey
      name: nadles-provider-key
      in: header

````