Docs·Visitors and people

GET/api/v1/spreelytics/people/:contactIdentityId/timeline

Get a person's timeline

Returns what one identified person did as a single list, newest first: page views, custom events and payments, across all their devices and including what they did before they were identified. Session ends, scroll events and link clicks are left out.

The list is paged, and page starts at 0. It answers 404 for an id that is not a person in this audience. Every role can call it, Viewer included.

Keys: an account key or an audience key. Getting started explains both kinds.

Parameters

PropInTypeNotes
contactIdentityIdpathstringThe person id, a UUID.
contactListIdquerystringThe audience id, a UUID. With an audience key it must be that key's own audience.
page?querynumberPage number, starting at 0. Defaults to 0.
pageSize?querynumberItems per page, 1 to 100 (other values are clamped). Defaults to 25.

Response

PropTypeNotes
contentPersonTimelineItemDto[]The items, newest first. Each has source (web, or revenue for an event that carried a payment), type (pageview or the event name), label (the path for a page view, otherwise the event name), timestamp (ISO 8601 in UTC, to the second), amount (payments only, in your reporting currency; a refund shows as a negative amount) and parameters (the event's properties as strings, when it had any).
sizenumberThe page size used.
pagenumberThe page returned, counted from 0.
totalItemsnumberHow many items there are across all pages.
totalPagesnumberHow many pages there are at this page size.

Each item in content

PropTypeNotes
source``web` \`revenue``
typestring'pageview' | event name
labelstring
timestampstring
amountnumber
parametersRecord_string.string_

Request

curl 'https://app.spreelytics.com/api/v1/spreelytics/people/:contactIdentityId/timeline?contactListId=…' \
  -H 'Authorization: Bearer YOUR_API_KEY'
const url = new URL('https://app.spreelytics.com/api/v1/spreelytics/people/:contactIdentityId/timeline');
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/people/:contactIdentityId/timeline",
    headers={"Authorization": "Bearer YOUR_API_KEY"},
    params={"contactListId": "…"},
)
data = res.json()

Response

{
  "content": [
    {
      "source": "web",
      "type": "string",
      "label": "string",
      "timestamp": "string",
      "amount": 0,
      "parameters": {}
    }
  ],
  "size": 0,
  "page": 0,
  "totalItems": 0,
  "totalPages": 0
}

See your own numbers today.

Free up to 100k events a month · no credit card

Contact

Tell us what you need.

A real person reads these. We usually reply within one working day.

Or email us directly at contact@spreelytics.com.