# How to Use the API

This page shows how to start using the Eskimi DSP API: create an API client, get an access token and make your first call. For what the API can do, see [API Overview](https://manual.eskimi.com/books/api/page/api-overview).

### Create an API Client

1. In the DSP, click the **three-dot icon** in the top right corner.
2. Click **API Clients**.
3. Click **Add Client** in the top right corner.
4. Enter a **Client name** (any name; it is not used in the token) and click **Generate** next to Client Secret.
5. Click **Save**. The client is created, and you can now get an access token for it.

![ScreenRecording2024-04-11at10.44.19-ezgif.com-video-to-gif-converter.gif](https://manual.eskimi.com/uploads/images/gallery/2024-04/SdImjqz707INGF6X-screenrecording2024-04-11at10-44-19-ezgif-com-video-to-gif-converter.gif)

### Get an Access Token

By default an **access token** is valid **for 1 day** and a **refresh token** for **30 days**. There are two ways to get a token:

#### a. In the DSP

1. Click the **three-dot icon** next to your client, then **Edit**.
2. Click **Generate Client Token**.
3. Enter your account password and click **Confirm Identity &amp; Generate**.
4. Click **Copy** to keep the token, then click **Save**.

[![image.png](https://manual.eskimi.com/uploads/images/gallery/2026-11/scaled-1680-/6pcrVfpKAL4fikEA-image.png)](https://manual.eskimi.com/uploads/images/gallery/2026-11/6pcrVfpKAL4fikEA-image.png)

#### b. With an HTTP Request

Send a `POST` request to `https://dsp-api.eskimi.com/api/oauth/token` with this body (documentation: [https://dsp-api.eskimi.com/docs/api/auth/](https://dsp-api.eskimi.com/docs/api/auth/)):

```json
{
  "grant_type": "eskimi_dsp",
  "username": "your DSP login email",
  "password": "Password",
  "client_id": client_id,
  "client_secret": "client_secret"
}
```

<p class="callout success">A successful request returns access\_token, refresh\_token, token\_type and expires\_in. </p>

#### Grant Types

The grant\_type parameter says how you are logging in. The Eskimi DSP API supports these grant types:

<table border="1" class="align-center" id="bkmrk-grant_type-usage-esk" style="border-collapse: collapse; width: 100%; height: 135.984px; border: 1px solid rgb(0, 0, 0);"><colgroup><col style="width: 36.1127%;"></col><col style="width: 63.8873%;"></col></colgroup><tbody><tr style="height: 29.7969px;"><td class="align-left" style="height: 29.7969px; border-color: rgb(0, 0, 0); padding-left: 120px;"><span style="color: rgb(53, 152, 219);">grant\_type</span></td><td style="height: 29.7969px; border-color: rgb(0, 0, 0); padding-left: 200px;"><span style="color: rgb(53, 152, 219);">Usage</span></td></tr><tr style="height: 29.7969px;"><td style="height: 29.7969px; border-color: rgb(0, 0, 0);">eskimi\_dsp</td><td style="height: 29.7969px; border-color: rgb(0, 0, 0);">A script or integration logs in as a DSP user</td></tr><tr style="height: 46.5938px;"><td style="height: 46.5938px; border-color: rgb(0, 0, 0);">eskimi\_dsp\_client\_credentials</td><td style="height: 46.5938px; border-color: rgb(0, 0, 0);">Clients created for other systems can be flagged for **machine to machine** access</td></tr><tr style="height: 29.7969px;"><td style="height: 29.7969px; border-color: rgb(0, 0, 0);">refresh\_token</td><td style="height: 29.7969px; border-color: rgb(0, 0, 0);">You want a new access token without logging in again</td></tr></tbody></table>

### Make Your First Call

Send the token in the `Authorization` header. For example, a campaign report:

```bash
curl 'https://dsp-api.eskimi.com/api/v1/report/campaigns/get?advertiserId=1&byDate=1&byCampaign=1&dateFrom=2026-01-01&dateTo=2026-01-30' \
-H 'authorization: Bearer {ACCESS_TOKEN}'
```

<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>

All endpoints, parameters and examples are in the API documentation: [https://dsp-api.eskimi.com/docs/api/v1/](https://dsp-api.eskimi.com/docs/api/v1/). To try them without writing code, import the [API Postman Template](https://manual.eskimi.com/books/api/page/api-postman-template).

Watch the video for a walk-through:

<iframe allowfullscreen="allowfullscreen" height="429" src="//www.youtube.com/embed/9yn3oZAynOg" style="width: 764px; height: 429px;" width="764"></iframe>

### What the API Can and Cannot Do

- Campaigns, packages, creatives, audiences, brand safety sets and optimisation (start or stop by exchange, creative, operating system, browser, operator, site or app, placement or package) can all be managed through the API. See [API Overview](https://manual.eskimi.com/books/api/page/api-overview) for the full list.
- Packages (since September 2026): create with `POST /package/create`, list with `GET /package/get`, update with `POST /package/update/{id}`, add domains with `POST /package/{id}/domains` and delete with `DELETE /package/{id}`. To use a package in a campaign, send it in the campaign's `packages` and `packageType` parameters.
- Video campaigns can be created through the API, but video creatives must first be uploaded in the DSP: the API uploads banner and native assets only.
- Not every reporting split in the DSP is available in the API. The available splits are listed [here](https://dsp-api.eskimi.com/docs/api/v1/#api-Report).
- Total reach for a period comes from `/report/totals` and matches DSP reporting. Do not add up the daily `reach` values from the split reports: one user is counted again on every day they were reached.
- Reports return spend in USD or in the advertiser's local currency, depending on the `spentBased` parameter.

### Summary

Create an API client in the DSP, get a token (in the DSP or with an HTTP request), and send it with every call. Renew the token before it expires after 30 days.