Skip to main content
POST
/
v1
/
events
/
ingest
ingest raw event
curl --request POST \
  --url https://api.unprice.dev/v1/events/ingest \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "idempotencyKey": "idem_123",
  "eventSlug": "tokens_used",
  "properties": {
    "amount": 1
  },
  "id": "evt_123",
  "customerId": "cus_123",
  "timestamp": 1741454800000
}
'
{
  "accepted": true
}

Documentation Index

Fetch the complete documentation index at: https://docs.unprice.dev/llms.txt

Use this file to discover all available pages before exploring further.

Authorizations

Authorization
string
header
required

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

Body

application/json

The raw event ingestion payload

idempotencyKey
string
required

Logical idempotency key for deduplicating raw events

Example:

"idem_123"

eventSlug
string
required

The event slug

Example:

"tokens_used"

properties
object
required

Arbitrary event properties

Example:
{ "amount": 1 }
id
string

Optional event id. If omitted, the API will generate an internal event id for processing.

Example:

"evt_123"

customerId
string

The unprice customer id

Example:

"cus_123"

timestamp
number

Event timestamp in epoch milliseconds, if not provided will use the time of the request

Example:

1741454800000

Response

The raw event was accepted for asynchronous processing

accepted
enum<boolean>
required

The raw event was accepted for asynchronous processing

Available options:
true
Example:

true