API overview
What the REST API covers, its base URL and OpenAPI document, the JSON conventions for money, times, IDs and date ranges, and a first request.
Last updated 4 min read
The TrackCrown REST API gives programmatic access to one workspace: offers and their events and creatives, partners (affiliates), advertisers, reports, the raw click log, conversions, partner postbacks, tracking links, deals, product feeds and the Google Ads template linter. It speaks JSON over HTTPS.
Tracking itself — clicks, conversion postbacks, pixels and the landing-page SDK — runs on your tracking domain, not on this API. See Postback & tracking URLs.
Your first request#
- Create a key: Settings → API keys → Create API key (Admin role), choose Analyst for read-only access.
- Copy the key — it is shown once.
- Call
/me:
export ATK="atk_AbCd1234_…"
curl https://app.trackcrown.com/api/v1/me -H "Authorization: Bearer $ATK"{
"data": {
"key": { "id": 7, "name": "BI export", "role": "analyst" },
"workspace": { "id": 1, "slug": "demo", "name": "Demo Network", "timezone": "Asia/Kolkata", "currency": "USD" },
"affiliate": null,
"advertiser": null,
"permissions": ["dashboard.read", "reports.read", "offers.read", "…"],
"rate_limit": { "limit": 600, "remaining": 599, "reset_sec": 41 }
}
}What you can do#
"Staff" means admin and analyst keys; "scoped" means partner and advertiser keys see only their own data. Every endpoint is described in the API reference.
Conventions#
- JSON in, JSON out. Send bodies with
Content-Type: application/json, at most 512 KB. Unknown fields in a body are rejected (400 validation_failed), so typos never pass silently. - Envelope. Single objects come back as
{"data": {…}}; lists as{"data": […], "next_cursor": "…"}. - Money is a decimal string with 4 decimals (
"12.5000") in the currency of the row. On input send a string ("12.50") or a number with at most 4 decimals;"1,234.50"is accepted, ambiguous input like"1,5"is refused. - Times are ISO-8601 UTC instants:
"2026-10-10T08:15:30.123Z". - IDs are integers, except conversions (UUID) and clicks (32 hex characters). Offers and affiliates can also be
addressed by their public code:
/offers/Kx7Lm2Qis the same as/offers/12. - Unknown paths under
/api/v1/answer404 not_foundin the same JSON error shape.
Date ranges#
Endpoints with a time range accept from, to, tz and preset:
Responses echo the absolute range used: "range": {"from": "…", "to": "…", "tz": "…"}. Maximum spans: reports and
conversions 400 days, the click log 93 days, gclid lookups 90 days, hourly timeseries 31 days.
Visibility by key role#
The workspace — and for partner and advertiser keys, the partner or advertiser — always comes from the key, never from the request.
- Partner keys see the partner-portal view: offers they can run or request with their own payout and tracking link, their own clicks, conversions and reports — payout only, never revenue, profit or advertiser data.
- Advertiser keys see their own offers and the clicks, conversions and reports of those offers with revenue (their cost) only — never payout, profit, partner names or partner sub IDs.
Asking for a field, metric or object a key may not see returns 400 invalid_parameter, 403 forbidden or
404 not_found (objects that exist but are not visible to the key are reported as not found).
Tools#
- OpenAPI — import
openapi.jsoninto Postman or Insomnia, or generate a client: OpenAPI. - API request — the button in the panel's report builder shows the report on screen as a
GET /reportscall (JSON or CSV). - MCP — connect an AI agent with a read-only key: MCP server.