Authenticate every request
One API key header for every endpoint, with scopes that decide what the key may do.
Every endpoint reads your API key from the Authorization header. Keys are created in the console under Settings › API keys.
--header 'Authorization: YOUR_API_KEY'
The raw key is the usual form. Authorization: Bearer YOUR_API_KEY and X-Api-Key: YOUR_API_KEY are read too, so you can use whatever your HTTP client prefers.
Server to server
Send ad requests and events from your backend, so the key never reaches a browser or app bundle.
Scopes
| Scope | Lets the key… | Endpoints |
|---|---|---|
integration | push sellers and products, end a full sync | /api/integration/* |
ad-serving | request ads, and send events | /server/v2/ads, /server/events |
events-ingest | send events only | /server/events |
promoted-products | request product ads limited to a list of skus | /server/v2/ads |
A key belongs to one domain. A request whose domain_id is not the key’s own is refused like an invalid key.
When the key is refused
| Endpoint | Answer |
|---|---|
| Catalog push | 401 Unauthorized: Invalid API key |
| Catalog push, no key | 401 Unauthorized: Authorization header is required |
| Ad request, events | 401 Permission Required. |