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

# Ingest Usage Events

> Send bulk billable usage events for metrics calculation



## OpenAPI

````yaml https://api.getmeasure.com/api/v1/docs/api_spec.json post /companies/{company_id}/events/ingest
openapi: 3.1.0
info:
  title: Measure API
  description: APIs to communicate with Measure
  version: 1.0.0
servers:
  - url: https://api.getmeasure.com/api/v1
security: []
paths:
  /companies/{company_id}/events/ingest:
    post:
      tags:
        - Events
      summary: Ingest Usage Events
      description: Send bulk billable usage events for metrics calculation
      operationId: Ingest_Usage_Events
      parameters:
        - name: company_id
          in: path
          description: 'The company ID with the prefix ''cmp_''. '
          required: true
          schema:
            description: 'The company ID with the prefix ''cmp_''. '
            type: string
        - name: Idempotency-Key
          in: header
          description: >-
            The idempotency key that will be used to ensure the request is only
            performed once
          schema:
            description: >-
              The idempotency key that will be used to ensure the request is
              only performed once
            type: string
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/RequestIngestEventsRequest'
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ResponseIngestEventsResponse'
      deprecated: false
      security:
        - apiKey:
            - ''
components:
  schemas:
    RequestIngestEventsRequest:
      properties:
        events:
          description: >-
            An array of events to ingest. You can have a maximum of 100 events
            for each batch
          items:
            $ref: '#/components/schemas/ModelBillableUsageEvent'
          maxItems: 100
          maximum: 100
          type:
            - array
      required:
        - events
      type: object
    ResponseIngestEventsResponse:
      properties:
        enqueued:
          description: The list of enqueued event transaction IDs
          items:
            $ref: '#/components/schemas/ResponseEnqueuedEvent'
          type:
            - array
            - 'null'
      type: object
    ModelBillableUsageEvent:
      properties:
        customer_id:
          description: The customer ID in Measure
          type: string
        customer_identifier:
          description: The unique identifier for the customer that ties back to your system
          type: string
        item_id:
          description: >-
            The billable item ID from Measure that this event is being tracked
            for
          type: string
        properties:
          additionalProperties: {}
          description: >-
            The set of properties relevant to billing metrics that are set up in
            Measure
          type:
            - object
        subscription_id:
          description: >-
            Optionally, the subscription ID in Measure that the event should be
            restricted to
          type:
            - 'null'
            - string
        timestamp:
          description: The timestamp for the event in RFC-3339 format
          type: string
        transaction_id:
          description: >-
            The unique identifier for the event. This is used for idempotency
            over 24 hours.
          type: string
      required:
        - transaction_id
        - timestamp
        - item_id
        - properties
      type: object
    ResponseEnqueuedEvent:
      properties:
        timestamp:
          description: The event timestamp
          type: string
        transaction_id:
          description: The unique identifier for the event
          type: string
      type: object
  securitySchemes:
    apiKey:
      type: http
      scheme: bearer

````