API export
Pull raw Sarge events into your own systems.
Use the v1 raw event export API to build custom dashboards, reporting jobs, and warehouse imports from your stored Sarge tracking data.
Connect an AI agent with MCP
Available on every plan, including Free. Use your environment's API read token with https://track.sargetrack.app/mcp
to inspect events through the read-only list_events tool.
Connect using Streamable HTTP and an Authorization bearer header. Browser OAuth sign-in is not supported.
Endpoint and auth
Export uses read-only sarge_read_ bearer tokens. Tokens are environment-scoped, separate from ingestion secrets, and stored only as SHA-256 hashes with the events:read scope.
GET /v2/export/events
Authorization: Bearer sarge_read_... curl -G "https://track.sargetrack.app/v2/export/events" \
-H "authorization: Bearer sarge_read_..." \
--data-urlencode "start=2026-06-01T00:00:00.000Z" \
--data-urlencode "end=2026-07-01T00:00:00.000Z" \
--data-urlencode "name=purchase.completed" \
--data-urlencode "limit=100" Query fields
| Field | Meaning |
|---|---|
| start | Optional inclusive ISO lower bound for occurredAt. |
| end | Optional inclusive ISO upper bound for occurredAt. |
| name | Optional exact event name. |
| source | Optional source: browser, server, or postback. |
| sessionId | Optional exact session ID. |
| userId | Optional exact user ID. |
| limit | Optional page size. Defaults to 100 and caps at 1000. |
| cursor | Opaque cursor from the previous response. |
Response shape
Events sort by occurredAt DESC, id DESC. Send the returned nextCursor on the next request to continue paging.
{
"events": [
{
"id": "evt_123",
"siteId": "site_123",
"siteEnvironmentId": "env_123_production",
"source": "browser",
"name": "purchase.completed",
"occurredAt": "2026-06-19T12:00:00.000Z",
"receivedAt": "2026-06-19T12:00:01.000Z",
"sessionId": "sess_123",
"userId": "user_123",
"ref": "summer-campaign",
"affiliate": "partner-42",
"attributionExpiresAt": null,
"url": "https://example.com/checkout",
"referrer": null,
"title": "Checkout",
"properties": {
"value": 129.99,
"currency": "USD"
}
}
],
"nextCursor": "eyJvY2N1cnJlZEF0IjoiMjAyNi0wNi0xOVQxMjowMDowMC4wMDBaIiwiaWQiOiJldnRfMTIzIn0"
}