Get a usage event

Retrieve a single usage event by ID. Unknown ids and ids that belong to another merchant both return 404 — the lookup is merchant-scoped under RLS. --- **Related endpoints** - `POST /usage-events` — Ingest usage events - `GET /usage-events` — Query usage events - `POST /usage-events/dry-run` — Dry-run usage events - `GET /usage-events/aggregate/{meterId}` — Get aggregated usage **Common errors** - `401 authentication_error` — missing, invalid, expired, or revoked credential. Codes: `authentication_failed`, `invalid_api_key`, `expired_api_key`, `api_key_revoked`, `session_invalid`, `merchant_required`. Carries a `WWW-Authenticate: Bearer` challenge. - `404 resource_missing` — the referenced resource does not exist or is not visible to your key.

GET
/usage-events/{id}

Retrieve a single usage event by ID. Unknown ids and ids that belong to another merchant both return 404 — the lookup is merchant-scoped under RLS.


Related endpoints

  • POST /usage-events — Ingest usage events
  • GET /usage-events — Query usage events
  • POST /usage-events/dry-run — Dry-run usage events
  • GET /usage-events/aggregate/{meterId} — Get aggregated usage

Common errors

  • 401 authentication_error — missing, invalid, expired, or revoked credential. Codes: authentication_failed, invalid_api_key, expired_api_key, api_key_revoked, session_invalid, merchant_required. Carries a WWW-Authenticate: Bearer challenge.
  • 404 resource_missing — the referenced resource does not exist or is not visible to your key.
x-api-key<token>

Your RevKeen merchant API key. Create and manage keys in Dashboard → Settings → Developer. Use rk_sandbox_* for staging/test and rk_live_* for production. The same key may be sent as Authorization: Bearer <key> if that suits your HTTP client better. A missing, invalid, expired, or revoked key returns 401 with a WWW-Authenticate: Bearer challenge; a valid key without the required scope returns 403.

In: header

Path Parameters

id*string

Usage event ID

Formatuuid

Response Body

application/json

application/json

application/json

application/json

Stuck on an error response? Ask the RevKeen assistant to explain it.
curl "https://api.revkeen.com/v2/usage-events/00000000-0000-0000-0000-000000000000" \
  -H "x-api-key: $REVKEEN_API_KEY"
{  "data": {    "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",    "merchant_id": "500924a8-3f5e-4c00-beb8-2efcde988aea",    "customer_id": "160c0c4b-9966-4dc1-a916-8407eb10d74e",    "subscription_id": "aa11a4c2-a467-43db-b413-c4ab0f5cf627",    "meter_id": "1e13adc1-9ac9-453b-b100-17d2f2da2eb8",    "name": "string",    "event_name": "string",    "quantity": 0,    "event_time": "2019-08-24T14:15:22Z",    "idempotency_key": "string",    "external_id": "string",    "source": "string",    "metadata": {},    "properties": {},    "ingestion_timestamp": "2019-08-24T14:15:22Z",    "created_at": "2019-08-24T14:15:22Z"  }}

Dry-run usage events POST

Validate usage events without persisting them. Returns acceptance/rejection reasons that mirror real ingestion rules. --- **Related endpoints** - `POST /usage-events` — Ingest usage events - `GET /usage-events` — Query usage events - `GET /usage-events/aggregate/{meterId}` — Get aggregated usage - `GET /usage-events/{id}` — Get a usage event **Common errors** - `400 invalid_request` — malformed payload or failed validation. - `401 authentication_error` — missing, invalid, expired, or revoked credential. Codes: `authentication_failed`, `invalid_api_key`, `expired_api_key`, `api_key_revoked`, `session_invalid`, `merchant_required`. Carries a `WWW-Authenticate: Bearer` challenge. **Idempotency** Pass an `Idempotency-Key` header (UUID v4 recommended) to make retries safe. Keys are valid for 24 hours; see [the idempotency guide](/docs/fundamentals/idempotency).

Ingest usage events POST

Send usage events for billing. Accepts a single event or a batch of up to 1000 events. **Single event:** Send the event object directly in the request body. **Batch:** Wrap events in an `events` array. Events are matched to meters by `name` (event name) or `meter_id`. At least one of `customer_id`, `external_customer_id`, or `subscription_id` is required. **Idempotency:** provide `idempotency_key` per event. The key is unique per merchant forever; repeats return `duplicate` and do not create another billable event. **Attribution:** prefer `external_customer_id` when your system owns customer identifiers. Unknown external IDs fail fast instead of creating orphan usage. **Currency:** each subscription has one currency. Usage attributed to that subscription is interpreted in that currency; RevKeen does not perform FX conversion in the metering layer. --- **Related endpoints** - `GET /usage-events` — Query usage events - `POST /usage-events/dry-run` — Dry-run usage events - `GET /usage-events/aggregate/{meterId}` — Get aggregated usage - `GET /usage-events/{id}` — Get a usage event **Common errors** - `400 invalid_request` — malformed payload or failed validation. - `401 authentication_error` — missing, invalid, expired, or revoked credential. Codes: `authentication_failed`, `invalid_api_key`, `expired_api_key`, `api_key_revoked`, `session_invalid`, `merchant_required`. Carries a `WWW-Authenticate: Bearer` challenge. **Idempotency** Pass an `Idempotency-Key` header (UUID v4 recommended) to make retries safe. Keys are valid for 24 hours; see [the idempotency guide](/docs/fundamentals/idempotency).