Skip to content
Browse documentation

OpenAPI document

Download the OpenAPI 3.1 description of the REST API and use it in Postman, Insomnia or a code generator.

Last updated 2 min read

On this page

The REST API is described by an OpenAPI 3.1 document:

URL
https://app.trackcrown.com/api/v1/openapi.json

It is public (no API key needed), served with Access-Control-Allow-Origin: * and cached for 5 minutes. It lists every endpoint of API reference with parameters, request bodies, response schemas, examples and error responses, grouped by tag: Account, Offers, Affiliates, Advertisers, Deals & feeds, Reports, Clicks, Conversions, Postbacks and Tracking links (the Google Ads linter, POST /google-ads/lint, is under Tracking links).

PartValue
openapi3.1.0
info.titleTrackCrown REST API — the brand of the host you fetch the document from
info.version1.0.0
servers/api/v1 (relative to the panel host)
SecuritybearerAuth — HTTP bearer, format atk_<prefix>_<secret>

Because the server URL is relative, set the base URL to https://app.trackcrown.com/api/v1 when a tool asks for one.

Inspect the document#

List every operation with its method and summary:

Shell
curl -s https://app.trackcrown.com/api/v1/openapi.json \
  | jq -r '.paths | to_entries[] | .key as $p | .value | to_entries[] | select(.key | test("get|post|put|patch|delete")) | "\(.key | ascii_upcase) \($p)  \(.value.summary)"'

Each operation has an operationId (for example listOfferCreatives, lintGoogleAdsTemplate) that code generators use as the method name, tags for grouping, the query parameters with their descriptions, and response schemas under components.schemas. Error responses reference the shared error object {error: {code, message, details?}}.

Postman#

  1. In Postman choose Import and paste https://app.trackcrown.com/api/v1/openapi.json.
  2. Open the collection's Variables and set baseUrl to https://app.trackcrown.com/api/v1.
  3. On the collection's Authorization tab choose Bearer Token and paste your API key.
  4. Send GET /me to check the key.

Insomnia#

  1. Create → Import → From URL and paste the document URL.
  2. Set the base environment's base URL to https://app.trackcrown.com/api/v1 and add a header Authorization: Bearer atk_….

Generate a client#

Any OpenAPI 3.1 generator works. Examples:

Shell
# TypeScript types
npx openapi-typescript https://app.trackcrown.com/api/v1/openapi.json -o tracking-api.d.ts

# Python client
openapi-generator-cli generate -i https://app.trackcrown.com/api/v1/openapi.json -g python -o ./tracking-client

With openapi-typescript and openapi-fetch:

TYPESCRIPT
import createClient from "openapi-fetch";
import type { paths } from "./tracking-api";

const api = createClient<paths>({
  baseUrl: "https://app.trackcrown.com/api/v1",
  headers: { Authorization: `Bearer ${process.env.ATK}` },
});

const { data, error } = await api.GET("/reports", {
  params: { query: { preset: "yesterday", group_by: "offer", metrics: "clicks,conversions,revenue" } },
});
if (error) throw new Error(error.error.message);
console.log(data.data);

Notes#

  • Generated clients still need your own retry logic for 429 and 5xx — see Rate limits & errors.
  • The document describes the API as seen by staff keys. Partner and advertiser keys get the same endpoints with fewer fields and stricter filters, as noted in the endpoint descriptions.
  • Unknown /api/v1/… paths answer 404 not_found with the hint Unknown API endpoint. See /api/v1/openapi.json.
  • The MCP server (/api/mcp) is not part of this document; see MCP server.
Something unclear or missing in this article?Tell us