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

# Ingest billable events

> Ingests a batch of usage events for metering. Accepts up to 100 events per request. Each event must carry a unique `unique_id` for idempotency and may include arbitrary properties used by metric filters and aggregations.



## OpenAPI

````yaml /api-reference/v2/specs/2026-04-01.json post /events
openapi: 3.1.0
info:
  title: Alguna Public API
  version: '2026-04-01'
servers:
  - url: https://api.alguna.io
security:
  - bearerAuth: []
tags:
  - name: Billing Events and Metrics
  - name: Credit Notes
  - name: Credits
  - name: Customer Portal Sessions
  - name: Customers
  - name: Insights
  - name: Invoices
  - name: Payments
  - name: Plans
  - name: Product Bundles
  - name: Products
  - name: Refunds
  - name: Revenue Schedules
  - name: Subscription Changes
  - name: Subscription Versions
  - name: Subscriptions
  - name: Wallet Grants
  - name: Wallets
paths:
  /events:
    post:
      tags:
        - Billing Events and Metrics
      summary: Ingest billable events
      description: >-
        Ingests a batch of usage events for metering. Accepts up to 100 events
        per request. Each event must carry a unique `unique_id` for idempotency
        and may include arbitrary properties used by metric filters and
        aggregations.
      operationId: ingest-events
      parameters:
        - in: header
          name: Alguna-Version
          required: true
          schema:
            enum:
              - '2026-04-01'
            type: string
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/IngestEventsRequest'
        required: true
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/IngestEventsResponse'
          description: Success
        '400':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
          description: Bad Request
        '401':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
          description: Unauthorized
        '404':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
          description: Not Found
        '422':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
          description: Unprocessable Entity
        '500':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
          description: Internal Server Error
components:
  schemas:
    IngestEventsRequest:
      properties:
        events:
          description: Array of events to ingest. Maximum 100 events per request
          items:
            $ref: '#/components/schemas/EventItem'
          type: array
      required:
        - events
      type: object
    IngestEventsResponse:
      properties:
        failed:
          description: List of unique_id values that failed to ingest
          items:
            type: string
          type: array
        ingested:
          description: List of unique_id values that were successfully ingested
          items:
            type: string
          type: array
      required:
        - failed
        - ingested
      type: object
    ErrorResponse:
      properties:
        detail:
          type: string
        status:
          format: int64
          type: integer
      required:
        - status
        - detail
      type: object
    EventItem:
      properties:
        account:
          description: Customer account ID or alias
          example: cust_01H1VECT
          type: string
        event_name:
          description: Name of the event, used for metric grouping
          example: api_call
          type: string
        properties:
          description: Key-value pairs of event properties. Up to 50 properties allowed
          type: object
        timestamp:
          description: >-
            Event timestamp in RFC3339 format. Defaults to current time if not
            provided
          example: '2026-04-01T10:00:00Z'
          format: date-time
          nullable: true
          type: string
        unique_id:
          description: >-
            Idempotency key for the event. Should be a UUID or similar unique
            identifier
          example: evt_abc123
          type: string
      required:
        - account
        - event_name
        - unique_id
      type: object
  securitySchemes:
    bearerAuth:
      bearerFormat: API Key
      description: API key authentication. Pass your API key as a Bearer token.
      scheme: bearer
      type: http

````