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

# Billable Metric Create Api

> Create a new billable metric. Billable metrics define the usage events that are tracked and aggregated for billing purposes.



## OpenAPI

````yaml post /api/v1/usage/billable-metrics/
openapi: 3.1.0
info:
  title: NinjaAPI
  version: 1.0.0
  description: ''
servers:
  - url: https://api.justpaid.io
security: []
paths:
  /api/v1/usage/billable-metrics/:
    post:
      summary: Billable Metric Create Api
      description: >-
        Create a new billable metric. Billable metrics define the usage events
        that are tracked and aggregated for billing purposes.
      operationId: loopfour_backend_entitlements_external_api_billable_metric_create_api
      parameters: []
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/BillableMetricIn'
        required: true
      responses:
        '200':
          description: Billable metric created successfully
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/BillableMetricOut'
        '400':
          description: Invalid input data
      security:
        - HttpBearerAuth: []
components:
  schemas:
    BillableMetricIn:
      properties:
        name:
          maxLength: 255
          title: Name
          type: string
        description:
          anyOf:
            - type: string
            - type: 'null'
          title: Description
        event_name:
          anyOf:
            - maxLength: 255
              type: string
            - type: 'null'
          title: Event Name
        aggregation_type:
          default: 0
          title: Aggregation Type
          type: integer
      required:
        - name
      title: BillableMetricIn
      type: object
    BillableMetricOut:
      properties:
        uuid:
          format: uuid
          title: Uuid
          type: string
        created_at:
          format: date-time
          title: Created At
          type: string
        name:
          maxLength: 255
          title: Name
          type: string
        description:
          anyOf:
            - type: string
            - type: 'null'
          title: Description
        event_name:
          anyOf:
            - maxLength: 255
              type: string
            - type: 'null'
          title: Event Name
        aggregation_type:
          default: 0
          title: Aggregation Type
          type: integer
      required:
        - name
      title: BillableMetricOut
      type: object
  securitySchemes:
    HttpBearerAuth:
      type: http
      scheme: bearer

````

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