Preview usage events
Changed onDry-run of POST /v1/events/ingest: send the exact batch you would ingest and get a per-event report of what would happen — nothing is stored.
For each event: whether it passes validation (invalid events are reported in place instead of rejecting the batch, unlike ingest), the event_id it would be recorded under, whether it would deduplicate against an already-stored event or an earlier entry of the same batch (advisory — another writer can land between preview and ingest), the active meters that would consume it, and the same warnings ingest returns.
Usage events are immutable once ingested, so preview is the way to gain first-run confidence: wire your integration against preview, check valid is true and every event matches the meters you expect, then switch the path to ingest.
Request
- Base URLhttps://api.creem.io
- AuthAPI key in header x-api-key
- TypeScriptA function with typed inputs. Its response is checked against the schema.
Request body
Example request
{
"events": [
{
"name": "image.generated",
"customer_id": "cust_abc123",
"external_customer_id": "user-42",
"event_id": "order-1234",
"timestamp": "2026-08-15T10:30:00.000Z",
"properties": {
"tokens": 1200,
"tier": "pro"
}
}
]
}Response
Per-event report; nothing was stored
Example response
{
"events": [
{
"event_id": "order-1234",
"customer_id": "cust_abc123",
"error": {
"code": "invalid_usage_event",
"param": "customer_id"
},
"matched_meters": [
"mtr_abc123"
],
"warnings": [
{
"code": "no_matching_meter"
}
]
}
]
}Changes
- breaking
the
//response's property type changed fromobjecttostringfor status - breaking
the
//response's property type changed fromobjecttobooleanfor status - breaking
the
///////response's property type changed fromobjecttostringfor status - breaking
the
//response's property type changed fromobjecttostringfor status
- breaking
- info
endpoint added
- info