Quickstart
Get a Buyer API key and a real answer from the API in five minutes.
1. Get a key
Ask the account you buy from for a Buyer API key. If the account lets buyers make their own, open the Developers page in your buyer portal and choose New key. Copy the key: it is shown once.
The key starts traki_buyer_live_ for real data, or traki_buyer_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/buyer/key needs no scope, so it works with any key of this part.
curl 'https://api.traki.io/v1/buyer/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:
| Code | What to do |
|---|---|
key_missing | Send the header: Authorization: Bearer $TRAKI_KEY |
key_malformed | Copy the key again, all of it |
wrong_api | Use the address of the part your key opens |
plan_no_api | The account needs a paid plan |
Next
- Read authentication and keys and scopes.
- Try a route from the reference. Each page has examples in cURL, Node, Python and PHP.