Skip to Content
Developers

Quickstart

Get a Publisher API key and a real answer from the API in five minutes.

1. Get a key

Ask the account you send traffic to for a Publisher API key. If the account lets publishers make their own, open the Developers page in your publisher portal and choose New key. Copy the key: it is shown once.

The key starts traki_publisher_live_ for real data, or traki_publisher_test_ for test mode once it opens.

2. Keep the key out of your code

Put the key in an environment variable on the machine you call from. The examples on these pages all read it from TRAKI_KEY.

export TRAKI_KEY="paste your key here"

3. Ask the API who you are

GET /v1/publisher/key needs no scope, so it works with any key of this part.

curl 'https://api.traki.io/v1/publisher/key' \
  -H "Authorization: Bearer $TRAKI_KEY"

4. Read the answer

A 200 answer means the key works. It tells you what the key can do and which account it is locked to:

{
  "keyId": "8Hq2LmNpXr",
  "name": "Reporting server",
  "api": "…",
  "mode": "live",
  "scopes": ["…"],
  "version": "2026-12-01",
  "expiresAt": null,
  "account": { "name": "Harbor Lane Media", "timezone": "America/New_York", "currency": "USD" },
  "holder": null
}

For a buyer or publisher key, holder names the buyer or publisher that holds it. For an account key it is null.

If the answer is an error, its code says why. The most common ones in a first call:

CodeWhat to do
key_missingSend the header: Authorization: Bearer $TRAKI_KEY
key_malformedCopy the key again, all of it
wrong_apiUse the address of the part your key opens
plan_no_apiThe account needs a paid plan

Next