Skip to main content
POST
ingest raw event synchronously for a feature

Authorizations

Authorization
string
header
required

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

Body

application/json

The synchronous 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:
featureSlug
string
required

The feature slug to verify and ingest synchronously

Example:

"tokens"

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 synchronous ingestion result for the targeted feature

allowed
boolean
required

Whether the event was accepted and synchronously ingested for the feature

Example:

true

state
enum<string>
required

Synchronous ingestion lifecycle state for the targeted feature

Available options:
processed,
rejected
Example:

"processed"

idempotencyStatus
enum<string>
required

Whether this request applied a new idempotency key or replayed a previously reported event

Available options:
new,
already_reported
Example:

"already_reported"

rejectionReason
enum<string>

Business rejection reason when the event could not be ingested

Available options:
CUSTOMER_NOT_FOUND,
EVENT_TOO_OLD,
INVALID_ENTITLEMENT_CONFIGURATION,
INVALID_AGGREGATION_PROPERTIES,
LIMIT_EXCEEDED,
LATE_EVENT_CLOSED_PERIOD,
NO_MATCHING_ENTITLEMENT,
RUN_BUDGET_EXCEEDED,
UNROUTABLE_EVENT,
WALLET_EMPTY
Example:

"LIMIT_EXCEEDED"

message
string

Optional details about the synchronous ingestion result

Example:

"Limit exceeded for meter meter_123"