API keys
An API key lets your scripts and servers call the Adexium API on behalf of your account:
- Advertisers — the Developer API: campaigns, creatives, stats, balance.
- Publishers and SSP partners — widget stats and widget creation.
Before you start
API access is turned on by your account manager. Until then, the API keys tab in your account says "API access is off for your account" — write to your manager.
Create a key
- Open Account → API keys: advertiser cabinet · publisher cabinet.
- Click New key and fill in:
- Name — what the key is for, e.g. Reporting script.
- Scopes — what the key may do (see below). Give each key only what it needs.
- Expires — 7 days, 30 days, 180 days, 1 year or no expiry.
- Two-factor code — if two-factor login is on for your account.
- Copy the key.
The key is shown only once
We keep only a fingerprint (hash) of the key, so nobody — our team included — can show it to you again. If you lose a key, revoke it and create a new one.
A key looks like axk_3f9a1c2e_5b7d…. In the list you see only its beginning (axk_3f9a1c2e…), together with its name, scopes, creation date, when and from which IP it was last used, and when it expires.
Scopes
| Scope | Account | Allows |
|---|---|---|
campaigns:read | advertiser | list and read campaigns, their sources and stats; targeting dictionaries |
campaigns:write | advertiser | create and edit campaigns, start and pause them, manage sources, upload creatives |
account:read | advertiser | read the balance |
widgets:read | publisher | widget stats |
widgets:write | publisher | create widgets |
A script that only pulls stats needs a :read scope alone. If such a key leaks, nothing can be changed with it.
Expiry
An expired key stops working at once. The API keys tab warns you 7 days before a key expires — create a new key and switch your script to it in time. A key with no expiry works until you revoke it.
Use the key
Send it in the Authorization header of every request:
Authorization: Bearer axk_3f9a1c2e_5b7d…Advertiser key — list your campaigns:
curl 'https://api.adexium.io/api/v1/campaigns' \
--header 'Authorization: Bearer <YOUR_API_KEY>'Publisher key — widget stats by country:
curl 'https://api.adexium.io/api/v1/widget/stats/<WIDGET_ID>?startDate=2026-11-01&endDate=2026-11-07&viewBy=country' \
--header 'Authorization: Bearer <YOUR_API_KEY>'Errors
| Response | Meaning |
|---|---|
401 | No Authorization header |
400 Unable to authorize | Unknown, revoked or expired key, or API access is off for the account |
403 This API key does not have the … scope | The key exists but may not call this endpoint — create a key with the needed scope |
Keep keys safe
- One key per script or server, so you can revoke one without stopping the others.
- Never put a key in browser or mobile app code, in a public repository or in a chat.
- Revoke keys you no longer use. If a key may have leaked, revoke it right away — it stops working at once.
- Up to 10 active keys per account.
Keys issued by your manager
Your manager can issue a key for you — partners usually get their first key this way. Such a key is marked issued by your manager, follows the same rules and can be revoked by you at any time.
Keys created before November 2026 keep working. They have no expiry and every scope of your account type; consider replacing them with keys that have only the scopes you need.