Skip to content

Events

POST /v1/events

Records a conversion event. Authoritative source for revenue events — emit from your server, not the browser.

Request

POST /v1/events
Authorization: Bearer op_skl_xxx
Content-Type: application/json
{
"userId": "user_abc",
"type": "invoice_paid",
"amount": 4900,
"currency": "USD",
"occurredAt": "2026-04-24T12:00:00Z"
}
FieldTypeRequiredNotes
userIdstringyesMust match the userId passed to op.identify() on the client.
typestringyesStandard or custom event name.
amountintegerconditionalRequired for events that drive commissions. Minor units.
currencystringconditionalISO 4217. Required when amount is set.
occurredAtstringnoDefaults to server time.
metadataobjectnoFree-form. Available in attribution rules.

Response

{
"id": "evt_01HX9A...",
"userId": "user_abc",
"type": "invoice_paid",
"amount": 4900,
"currency": "USD",
"createdAt": "2026-04-24T12:00:01.234Z"
}

Idempotency

Pass Idempotency-Key: <unique> to make event creation safe to retry. The same key returns the original event without creating a duplicate.

GET /v1/events

List events for the authenticated principal. Admins see all; partners see events attributed to them.

GET /v1/events?cursor=evt_xxx&limit=50
Authorization: Bearer op_skl_xxx