Skip to Content
Developers

Quickstart

Make an Account API key and get a real answer from the API in five minutes.

1. Make a key

  1. Sign in to the TRAKI portal as the account's Owner or an Admin.
  2. Open the Developers page and choose New key.
  3. Pick Account API, give the key a name that says where it will run, and choose the Read only preset.
  4. Confirm with your two-factor code. Copy the key: it is shown once.

The key starts traki_account_live_ for real data, or traki_account_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/account/key needs no scope, so it works with any key of this part.

curl 'https://api.traki.io/v1/account/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