Skip to content
Browse documentation

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

On this page

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.

Base URLhttps://app.trackcrown.com/api/v1
OpenAPI 3.1 documenthttps://app.trackcrown.com/api/v1/openapi.json (public, no key needed)
AuthenticationAuthorization: Bearer atk_… — see Authentication & API keys
Rate limit600 requests per minute per key — see Rate limits & errors
AI agentsread-only MCP server at https://app.trackcrown.com/api/mcp — see MCP server

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#

  1. Create a key: Settings → API keys → Create API key (Admin role), choose Analyst for read-only access.
  2. Copy the key — it is shown once.
  3. Call /me:
Shell
export ATK="atk_AbCd1234_…"
curl https://app.trackcrown.com/api/v1/me -H "Authorization: Bearer $ATK"
JSON
{
  "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#

AreaEndpointsKeys
AccountGET /meall
OffersGET/POST /offers, GET/PATCH /offers/{id}read: all; write: admin
Offer eventsGET/POST /offers/{id}/events, PATCH/DELETE /offers/{id}/events/{event}read: all; write: admin
Offer creativesGET /offers/{id}/creativesall (read-only)
Partner accessGET /offers/{id}/affiliates, PUT /offers/{id}/affiliates/{affiliate}staff; write: admin
AffiliatesGET/POST /affiliates, GET/PATCH /affiliates/{id}staff; write: admin
AdvertisersGET/POST /advertisers, GET/PATCH /advertisers/{id}staff; write: admin
ReportsGET /reports, GET /reports/timeseriesall (scoped)
ClicksGET /clicks, GET /clicks/{click_id}all (scoped)
ConversionsGET/POST/PATCH /conversions, GET/PATCH /conversions/{id}read: all; write: admin
PostbacksGET/POST /postbacks, GET/PATCH/DELETE /postbacks/{id}admin, analyst (read), partner (own)
Tracking linksGET /tracking-linkstaff, partner
Deals, product feedsGET /deals, GET /product-feedsall (scoped)
Google AdsPOST /google-ads/lintstaff

"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/Kx7Lm2Q is the same as /offers/12.
  • Unknown paths under /api/v1/ answer 404 not_found in the same JSON error shape.

Date ranges#

Endpoints with a time range accept from, to, tz and preset:

FormMeaning
from=2026-10-01&to=2026-10-07Calendar days in tz (default: the workspace time zone); to includes that whole day.
from=2026-10-01T00:00:00Z&to=2026-10-02T00:00:00ZExact instants (with a zone); to is exclusive.
preset=today|yesterday|last7|last30|this_month|last_monthResolved against "today" in tz.

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.json into 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 /reports call (JSON or CSV).
  • MCP — connect an AI agent with a read-only key: MCP server.
Something unclear or missing in this article?Tell us