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

# Ingest billable event

> Ingest a new billable event. This endpoint is idempotent, an event with the same id will be updated if it already exists.



## OpenAPI

````yaml post /v1/events
openapi: 3.1.0
info:
  title: Hyperline Ingest API
  version: 0.0.0
servers:
  - url: https://ingest.hyperline.co
  - url: https://sandbox.ingest.hyperline.co
security: []
paths:
  /v1/events:
    post:
      tags:
        - Billable events
      summary: Ingest billable event
      description: >-
        Ingest a new billable event. This endpoint is idempotent, an event with
        the same id will be updated if it already exists.
      operationId: ingestBillableEvent
      parameters:
        - schema:
            type:
              - boolean
              - 'null'
            description: >-
              Whether to simulate prices for the event. Will be received in
              webhooks.
            example: true
          required: false
          description: >-
            Whether to simulate prices for the event. Will be received in
            webhooks.
          name: with_price_calculation
          in: query
      requestBody:
        description: Event payload
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/BillableEvent'
      responses:
        '201':
          description: Event ingested
      security:
        - bearer: []
components:
  schemas:
    BillableEvent:
      type: object
      properties:
        customer_id:
          type: string
          description: Hyperline ID or external ID of the existing customer.
          example: cus_CrqwefTRWBWRT
        event_type:
          type: string
          minLength: 1
          description: >-
            Type corresponding to the event. When creating a dynamic product,
            this type will be used to map the related events to specific prices.
          example: api_call
        timestamp:
          type: string
          format: date-time
          description: >-
            UTC date time string in the [ISO
            8601](https://en.wikipedia.org/wiki/ISO_8601) format, or
            milliseconds since the epoch. The event timestamp is used to
            retrieve the events related to a specific billing period.
          example: '2024-12-20T16:04:11Z'
        record:
          allOf:
            - type: object
              properties:
                id:
                  anyOf:
                    - type: string
                    - type: number
                  description: >-
                    A unique identifier for your event, used to identify the
                    event in your system and prevent duplicates.
              required:
                - id
            - type: object
              additionalProperties:
                anyOf:
                  - type: string
                  - type: number
                  - type: boolean
                  - type: 'null'
                  - type: 'null'
          description: Payload of the event containing an ID and any additional metadata.
          example:
            id: D32NAA8
            durationInMs: 32
            isVerified: true
      required:
        - customer_id
        - event_type
        - timestamp
        - record
  securitySchemes:
    bearer:
      type: http
      scheme: bearer
      bearerFormat: JWT

````