Docs·Workspace
GET
/api/v1/spreelytics/meta/eventsGet the event catalog
Returns what the audience can be charted, filtered and split by: the report builder's pickers, as data. Use it to find the event and property names POST /chart and saved reports take. Counts and sample values cover the last 90 days.
Every role can call it, Viewer included.
Keys: an account key or an audience key. Getting started explains both kinds.
Parameters
| Prop | In | Type | Notes |
|---|---|---|---|
contactListId | query | string | The audience id, a UUID. With an audience key it must be that key's own audience. |
Response
| Prop | Type | Notes |
|---|---|---|
events | SpreelyticsEventMeta[] | Up to 100 event names seen in the last 90 days, busiest first, with page_view always at the top (count 0 if it was never tracked). Other tracked types, such as scroll and session_end, are listed too. Each has name, displayName (underscores as spaces), count and properties: the standard properties every event has, then up to 20 of a custom event's own property keys. A property has name (what filters and breakdowns take), displayName, category (event or profile), group (the picker heading, such as Acquisition), valueType (text, number, boolean or date), description, values (sample values, for text properties only) and filterOnly (true for visit totals such as session duration, which the app offers as filters only). |
profileProperties | SpreelyticsPropertyMeta[] | Person attributes, under the names filters take: profile.email, profile.identified, profile.first_name, profile.last_name, profile.company, profile.company_domain, profile.phone, profile.country, profile.city, profile.state, profile.zip and profile.lang_code, then any custom contact attributes the audience has (group Attributes). Same shape as a property above; only profile.identified has sample values. |
cohorts | SpreelyticsCohortMeta[] | The audience's segments as { id, name }, newest first, for an inCohort filter, a cohort breakdown or a cohort series. Empty when there are none. |
Request
curl 'https://app.spreelytics.com/api/v1/spreelytics/meta/events?contactListId=…' \
-H 'Authorization: Bearer YOUR_API_KEY'
const url = new URL('https://app.spreelytics.com/api/v1/spreelytics/meta/events');
url.searchParams.set('contactListId', '…');
const res = await fetch(url, {
headers: { Authorization: 'Bearer YOUR_API_KEY' },
});
const data = await res.json();
import requests
res = requests.get(
"https://app.spreelytics.com/api/v1/spreelytics/meta/events",
headers={"Authorization": "Bearer YOUR_API_KEY"},
params={"contactListId": "…"},
)
data = res.json()
Response
{
"events": [
{
"name": "string",
"displayName": "string",
"count": 0,
"properties": [
{
"name": null,
"displayName": null,
"category": null,
"group": null,
"valueType": null,
"description": null,
"values": null,
"filterOnly": null
}
]
}
],
"profileProperties": [
{
"name": "string",
"displayName": "string",
"category": "event",
"group": "Event",
"valueType": "text",
"description": "string",
"values": [
"string"
],
"filterOnly": true
}
],
"cohorts": [
{
"id": "string",
"name": "string"
}
]
}