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

# Create billing event



## OpenAPI

````yaml https://app.stainless.com/api/spec/documented/samplehc/openapi.documented.yml post /api/v2/billing-events/
openapi: 3.0.3
info:
  title: Sample Healthcare API
  description: API for Sample Healthcare
  version: 1.0.0
servers: []
security: []
paths:
  /api/v2/billing-events/:
    post:
      tags:
        - Billing-events
      summary: Create billing event
      parameters:
        - schema:
            type: string
          in: header
          name: idempotency-key
          required: false
          description: >-
            A unique identifier for the billing event. Reusing the same key for
            the same organization returns the existing billing event.
      requestBody:
        content:
          application/json:
            schema:
              type: object
              properties:
                eventSlug:
                  type: string
                  minLength: 1
                quantity:
                  type: integer
                  minimum: 0
                occurredAt:
                  type: string
                  format: date-time
                workflowRunId:
                  type: string
                metadata:
                  type: object
                  additionalProperties: {}
              required:
                - eventSlug
                - quantity
              additionalProperties: false
        required: true
      responses:
        '200':
          description: Default Response
          content:
            application/json:
              schema:
                type: object
                properties:
                  billingEvent: {}
                  idempotentReplay:
                    type: boolean
                required:
                  - idempotentReplay
                additionalProperties: false
        '400':
          description: Default Response
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: string
                    description: The error message.
                  message:
                    type: string
                    description: The message.
                  statusCode:
                    type: number
                    description: The status code.
                  details:
                    type: object
                    additionalProperties: {}
                    description: The details of the error
                additionalProperties: true

````