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

# Create Usage Driver



## OpenAPI

````yaml POST /billing/usageDriver
openapi: 3.1.0
info:
  title: OpenAPI Valyx API
  description: To demonstrate features in the Valyx
  license:
    name: MIT
  version: 1.0.0
servers:
  - url: https://api.valyx.com
security:
  - bearerAuth:
      - demo-api
tags:
  - name: billing
    description: External Billing APIs
  - name: external
    description: External APIs for customers
  - name: invoice
    description: Invoice APIs
  - name: creditNote
    description: Credit Note APIs
paths:
  /billing/usageDriver:
    parameters:
      - name: X-Valyx-Signature
        in: header
        required: true
        description: Auth key to authenticate the request
        schema:
          type: string
    post:
      tags:
        - billing
      operationId: post_add_usage_driver
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/CreateUsageDriverQueryModel'
        required: true
      responses:
        '200':
          description: Success
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/UsageDriverResponseModel'
components:
  schemas:
    CreateUsageDriverQueryModel:
      required:
        - name
        - description
        - unit
      properties:
        name:
          type: string
          description: A unique name identifying the usage driver.
        description:
          type: string
          description: Detailed explanation of what this usage driver measures or tracks.
        unit:
          type: string
          description: >-
            The unit of measurement for this usage driver (e.g., count, GB,
            minutes).
        productId:
          type: string
          description: >-
            Optional: ID of the product this usage driver is associated with, if
            any.
      type: object
    UsageDriverResponseModel:
      properties:
        error:
          type: string
          description: Error message, if any. Null if the request was successful.
        message:
          type: string
          description: Human-readable message describing the result of the operation.
        data:
          $ref: '#/components/schemas/UsageDriverResponseData'
      type: object
    UsageDriverResponseData:
      type: object
      properties:
        id:
          type: string
          description: Unique identifier of the added/created object.

````