# API Overview

The Eskimi DSP API lets advertisers and agencies do through code what they do in the DSP: create and manage campaigns, creatives, audiences and packages, optimise delivery, and pull reports. It is for teams that want to automate their work or connect the DSP to their own tools.

### What You Can Do With the API

<table id="bkmrk-areawhat-you-can-do-"><thead><tr><th>Area</th><th>What you can do</th></tr></thead><tbody><tr><td>Campaigns</td><td>Create and update banner, native and video campaigns; start, stop and delete them; read their status; change budget pacing (Even or None) without touching any other setting.</td></tr><tr><td>Optimisation</td><td>Read campaign optimisation data, and start or stop delivery by exchange, creative, operating system, browser, operator, site or app, placement or package — the same actions as the Optimisation table in the DSP. Each option must be enabled for the advertiser.</td></tr><tr><td>Packages</td><td>Create, list, rename and delete apps/sites or placement packages, and add or replace their domains (up to 50,000 per request).</td></tr><tr><td>Creatives</td><td>Create, update, list and delete creative sets and creatives; upload banner and native assets.</td></tr><tr><td>Audiences</td><td>Create, update and delete behavioural and DMP audiences; list audience interests.</td></tr><tr><td>Brand safety</td><td>Create and list brand safety keyword sets.</td></tr><tr><td>Reports</td><td>Campaign reports and their splits (sites, exchanges, creatives, operating systems, operators, browsers, placements, age, gender and more), video reports, device ID reports, and period totals including deduplicated reach.</td></tr><tr><td>Reference data</td><td>The IDs that campaign settings use: countries and states, operators, devices, exchanges, sites, ad placements, age groups, genders and private marketplaces.</td></tr><tr><td>Invoices</td><td>Invoice details and the invoice PDF.</td></tr></tbody></table>

<p class="callout info">The full list of endpoints, parameters and examples is in the API documentation: [https://dsp-api.eskimi.com/docs/api/v1/](https://dsp-api.eskimi.com/docs/api/v1/)</p>

### How Access Tokens Work

Every API call needs an access token. The token tells the API who is calling and what that account may do.

[![How access tokens work: 1. request a token, 2. call the API with the token, 3. request a new token before it expires](https://manual.eskimi.com/uploads/images/gallery/2026-10/scaled-1680-/aFDLMjFvr5msGILK-token-flow.png)](https://manual.eskimi.com/uploads/images/gallery/2026-10/aFDLMjFvr5msGILK-token-flow.png)

1. Get an access token: generate it in the DSP, or request it with an HTTP call. Both ways are described in [How to Use the API](https://manual.eskimi.com/books/api/page/how-to-use-the-api).
2. Send the token in the `Authorization` header of every call: `Authorization: Bearer {ACCESS_TOKEN}`
3. A token is valid for one year. When you request it with an HTTP call, the response states its lifetime in seconds (`expires_in`). Before it expires, request a new token the same way and use the new one from then on.

<p class="callout info">The token belongs to your user and works for every advertiser your user has access to. Choose the advertiser with the `advertiserId` parameter in each request.</p>

### Working With the API

A few conventions apply to every endpoint:

- Send requests to `https://dsp-api.eskimi.com/api/v1/`. The access token comes from `https://dsp-api.eskimi.com/api/oauth/token`.
- Write dates as `YYYY-MM-DD`, for example `2026-10-23`.
- Lists come in pages. Use `page` and `per_page`: 15 items per page by default, 100 at most.
- Every ID a campaign setting needs (country, operator, device, exchange, site and so on) comes from the reference data endpoints. Look the ID up first, then use it in the campaign.
- When you update a campaign, send all of its settings, not only the ones you change. Settings left out of an update request can be reset. To change only budget pacing, use the pacing endpoint, which leaves every other setting as it is.

### Common Errors

<table id="bkmrk-codewhat-it-meanswha"><thead><tr><th>Code</th><th>What it means</th><th>What to do</th></tr></thead><tbody><tr><td>400</td><td>The request data is invalid, or the action is not possible for this campaign.</td><td>Read the error message in the response; it names the field or the reason.</td></tr><tr><td>401</td><td>The access token is missing or has expired.</td><td>Check the `Authorization` header. If the token is older than a year, request a new one.</td></tr><tr><td>403</td><td>Your user has no access to this advertiser.</td><td>Ask an admin of your account to give your user access to the advertiser.</td></tr><tr><td>422</td><td>A value is outside what the endpoint accepts.</td><td>Check the allowed values for that field in the API documentation.</td></tr></tbody></table>

### Matching the API to DSP Reports

API reports use the same data as the DSP. When the figures differ, one of these settings is usually the reason:

- **Time zone** (`timeZone`): `1` = Vilnius time, `2` = local time. Use the same setting as the DSP report you compare with.
- **Spend currency** (`spentBased`): `4` = client spend in USD, `5` = client spend in the advertiser's local currency.
- **Reach**: take total reach for a period from `/report/totals`. Adding up daily reach counts the same person again on every day they were reached.

### Keeping Your Credentials Safe

- Treat the client secret and the access token like a password: they can do everything the account can do.
- Keep them out of shared code, screenshots, tickets and chat messages. Store them in your system's secret settings instead.
- Create a separate API client for each integration, so one can be replaced without affecting the others.

<p class="callout info">For step-by-step campaign set-up through the API, see [How to Launch a Campaign with the API](https://manual.eskimi.com/books/api/page/how-to-launch-a-campaign-with-the-api). Quick answers to common questions are in [FAQ: Eskimi DSP API](https://manual.eskimi.com/books/api/page/faq-eskimi-dsp-api).</p>

### Summary

The API covers campaigns, optimisation, packages, creatives, audiences, brand safety, reports and invoices. Get a token once, send it with every call, and renew it before it expires. For a ready-made set of requests, see [API Postman Template](https://manual.eskimi.com/books/api/page/api-postman-template).