Events
Count Events
Get a count of events matching the specified filters (same filters as list).
Authorization
bearerAuth AuthorizationBearer <token>
Use your secret API key as the bearer token
In: header
Query Parameters
eventName?string
Filter by event name
customerId?string
Filter by internal customer ID.
Match
^cus_[A-Za-z0-9]{22}$extCustomerId?string
Filter by external customer identifier.
startTime?string
Count events at or after this timestamp.
Format
date-timeendTime?string
Count events before this timestamp.
Format
date-timeResponse Body
application/json
application/json
application/json
curl -X GET "https://api.getlumen.dev/v1/events/count"{
"count": 42831
}{
"error": "Invalid filters",
"details": "endTime must be after startTime"
}{
"error": "Failed to count events"
}