Events
Ingest Event
Send a single usage event for metering and billing. Requires either customerId or extCustomerId and exactly one of eventValue or eventString. Requests are deduplicated by idempotencyKey for 24 hours (202 returned even when deduplicated).
Authorization
bearerAuth AuthorizationBearer <token>
Use your secret API key as the bearer token
In: header
Request Body
application/json
Response Body
application/json
application/json
application/json
curl -X POST "https://api.getlumen.dev/v1/events" \ -H "Content-Type: application/json" \ -d '{ "eventName": "api-call", "customerId": "cus_Lo4xGg1Yk9pB2eWv3sNt", "eventValue": 1, "eventTimestamp": "2025-02-20T17:00:00.000Z", "idempotencyKey": "evt_12345", "properties": { "endpoint": "/v1/messages", "status": 200 } }'{
"event": {
"id": "evt_9fQ1r2s3t4u5v6w7x8y9z0",
"eventName": "api-call",
"customerId": "cus_Lo4xGg1Yk9pB2eWv3sNt",
"eventValue": 1,
"eventTimestamp": "2025-02-20T17:00:00.000Z",
"properties": {
"endpoint": "/v1/messages",
"status": 200
},
"idempotencyKey": "evt_12345",
"createdAt": "2025-02-20T17:00:01.000Z"
},
"deduplicated": false
}{
"error": "Invalid event payload",
"details": "Provide customerId or extCustomerId and exactly one of eventValue or eventString."
}{
"error": "Failed to ingest event"
}