Skip to content

Data

HTTP API

A summary of the Tracklyne ingestion protocol: capture, flags, config, surveys and replay endpoints.

Overview

Every SDK speaks the same small HTTP protocol, so any language can send events. Bodies are JSON, optionally gzip-compressed, and CORS is open on every /api/v1/* route. The project token goes in the body; routes that read data take a personal API key in Authorization: Bearer tlk_….

EndpointPurpose
POST /api/v1/captureSend a batch of events
POST /api/v1/flagsEvaluate every flag for a user
GET /api/v1/flags/definitionsFlag definitions for local evaluation (API key)
GET /api/v1/configRemote config for the browser SDK
GET /api/v1/surveysRunning popover surveys
POST /api/v1/replaySession recording chunks

Capture

Terminal
curl https://tracklyne.com/api/v1/capture \
  -H "Content-Type: application/json" \
  -d '{
    "token": "tl_your_project_token",
    "batch": [{
      "event": "invoice paid",
      "distinct_id": "user_42",
      "properties": { "amount": 120 },
      "timestamp": "2026-11-12T10:00:00Z"
    }]
  }'

Each event needs an event and a distinct_id. Add a uuid to make retries safe: duplicates are dropped. Special events include $identify, $create_alias, $groupidentify, $pageview, $screen, $exception and the survey events.

Responses: 200 accepted, 400 malformed, 401 invalid token, 402 quota reached (with the limited streams; SDKs pause for an hour).

Flags

HTTP
POST /api/v1/flags
{ "token": "tl_…", "distinct_id": "user_42", "person_properties": { "plan": "pro" } }

→ { "flags": { "new-onboarding": true, "pricing-test": "test" },
    "payloads": { "pricing-test": { "price": 19 } } }

Evaluation is deterministic: a user always gets the same value for a flag, across SDKs and devices.

Ids and sessions

The browser SDK uses uuid v7 ids. A session rotates after 30 minutes of inactivity or 24 hours; each tab has its own window id. Questions about the protocol? Write to us.