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.
const { result, error } = await unprice.events.ingestSync({
idempotencyKey: "idem_123",
eventSlug: "tokens_used",
featureSlug: "tokens",
customerId: "cus_1234567890",
properties: {
amount: 1
}
});
if (error) {
console.error(error.message);
return;
}
console.log(result);
{
"allowed": true,
"state": "processed"
}
Request
The feature slug to verify while ingesting.
Logical key used to deduplicate the event.
The event slug configured in Unprice.
Event properties used by meters.
Response
Returns whether the event was processed or rejected for the targeted feature.