POST
/
v1
/
events
/
batch
curl --request POST \
  --url https://ingest.hyperline.co/v1/events/batch \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '[
  {
    "customer_id": "cus_CrqwefTRWBWRT",
    "event_type": "api_call",
    "timestamp": "2024-12-20T16:04:11Z",
    "record": {
      "id": "D32NAA8",
      "durationInMs": 32,
      "isVerified": true
    }
  }
]'
{
  "events_created": [
    {
      "customer_id": "cus_CrqwefTRWBWRT",
      "event_type": "api_call",
      "timestamp": "2024-12-20T16:04:11Z",
      "record": {
        "id": "D32NAA8",
        "durationInMs": 32,
        "isVerified": true
      }
    }
  ],
  "events_failed": [
    {
      "customer_id": "cus_CrqwefTRWBWRT",
      "event_type": "api_call",
      "timestamp": "2024-12-20T16:04:11Z",
      "record": {
        "id": "D32NAA8",
        "durationInMs": 32,
        "isVerified": true
      }
    }
  ]
}

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Body

application/json · object[]
Events payload
customer_id
string
required

Hyperline ID or external ID of the existing customer.

Example:

"cus_CrqwefTRWBWRT"

event_type
string
required

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
string
required

UTC date time string in the 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
object
required

Payload of the event containing an ID and any additional metadata.

Example:
{
  "id": "D32NAA8",
  "durationInMs": 32,
  "isVerified": true
}

Response

201 - application/json
Events created
events_created
object[]
required
events_failed
object[]
required