const res = await fetch("https://api.openrevenue.com/v1/projects/example.com/events?period=30d&limit=20", {
headers: { Authorization: `Bearer ${OPENREVENUE_API_KEY}` },
})
const events = await res.json()
curl "https://api.openrevenue.com/v1/projects/example.com/events?period=30d&limit=20" \
-H "Authorization: Bearer openrevenue_your_key"
{
"period": "30d",
"data": [
{ "name": "signup", "people": 42, "events": 48, "pct": 0.61, "amountCents": null, "currency": null, "transactions": 0 },
{ "name": "purchase", "people": 12, "events": 15, "pct": 0.19, "amountCents": 149850, "currency": "USD", "transactions": 15 }
]
}
Events
Returns custom and transaction events ranked by count for the period, including summed tracker transaction amounts when a single currency is present. Works with an API key (ClickHouse-backed).
GET
/
v1
/
projects
/
{domain}
/
events
const res = await fetch("https://api.openrevenue.com/v1/projects/example.com/events?period=30d&limit=20", {
headers: { Authorization: `Bearer ${OPENREVENUE_API_KEY}` },
})
const events = await res.json()
curl "https://api.openrevenue.com/v1/projects/example.com/events?period=30d&limit=20" \
-H "Authorization: Bearer openrevenue_your_key"
{
"period": "30d",
"data": [
{ "name": "signup", "people": 42, "events": 48, "pct": 0.61, "amountCents": null, "currency": null, "transactions": 0 },
{ "name": "purchase", "people": 12, "events": 15, "pct": 0.19, "amountCents": 149850, "currency": "USD", "transactions": 15 }
]
}
Time period. See Periods on Account API page. Defaults to 30d.
Response
Sum of transaction amounts in minor units. Null when none, or when multiple currencies were recorded for the name.
Errors
| Status | Error | Description |
|---|---|---|
401 | Invalid or missing API key | The Authorization header is missing or the Bearer token is invalid. |
404 | Project not found | No project with that domain exists for the authenticated user. |
const res = await fetch("https://api.openrevenue.com/v1/projects/example.com/events?period=30d&limit=20", {
headers: { Authorization: `Bearer ${OPENREVENUE_API_KEY}` },
})
const events = await res.json()
curl "https://api.openrevenue.com/v1/projects/example.com/events?period=30d&limit=20" \
-H "Authorization: Bearer openrevenue_your_key"
{
"period": "30d",
"data": [
{ "name": "signup", "people": 42, "events": 48, "pct": 0.61, "amountCents": null, "currency": null, "transactions": 0 },
{ "name": "purchase", "people": 12, "events": 15, "pct": 0.19, "amountCents": 149850, "currency": "USD", "transactions": 15 }
]
}
Was this page helpful?