> For the complete documentation index, see [llms.txt](https://docs.exads.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.exads.com/api/exads-public-api/developer-api.md).

# Developer API

The platform API automates all of the features available in the Admin Panel, for both advertiser and publisher accounts.

1\. What you can automate for advertisers:

* Campaigns/groups, variations, offers, and ad formats
* Targeting/blocking of targeting options, categories
* Goals
* Pull stats including adblock user data
* Daily budget, account funding, payment types
* Landing page name, URL & traffic share algorithm

2\. What you can automate for publishers:

* Ad formats and ad zones
* Sites, URL verifications
* Block ad types & product categories
* Pull all stats including adblock user data
* Bidding prices per ad format/GEO, pricing models
* Payment types

3\. How to use the API

* The API’s interface is fast and easy to use
* Simply select a parameter and press the **Try It Out** button to automatically generate code

4\. Download technical documentation

* [PHP Client](https://github.com/exads/exads-api-client-php)

## How to use the platform API <a href="#how-to-use-the-platform-api" id="how-to-use-the-platform-api"></a>

You can use the API for simple processes such as automating repetitive tasks to save you time to more complex projects such as changing banner creatives on the fly.

### **Before getting started**

The API interface shows a list of group titles. Click on a group and all the available options will drop down.

![list api](https://2579034597-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FLROGLSFvVMoWgQgbTuaL%2Fuploads%2FG1i6KG8M3DNg2C2nkNvR%2Flist-api.jpg?alt=media\&token=7f7fa63e-545c-4645-bdba-366fb4bb2702)

### HTTP Verbs <a href="#http-verbs" id="http-verbs"></a>

The API supports the following subset of HTTP verbs:&#x20;

{% hint style="info" %}
Not all features support all verbs.
{% endhint %}

![API uses](https://2579034597-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FLROGLSFvVMoWgQgbTuaL%2Fuploads%2Fyl6cDGhhElSxFO9i29qN%2FAPI-uses5.jpg?alt=media\&token=117ab2c7-9fd0-4cd6-aa5b-a829a09d165b)

### Setting up <a href="#setting-up" id="setting-up"></a>

To access restricted API requests, you must set a Session Token. To set a token, you must have a valid account.

To create an API Token, go to **My Profile** and select **API Tokens**.

![my profile](https://2579034597-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FLROGLSFvVMoWgQgbTuaL%2Fuploads%2FHw0mPN03q7nm1IHzun91%2Fapi-1st.jpg?alt=media\&token=87f9af67-f5f0-4897-b420-ef563fea17b0)

Click **New API Token**.

![api tokens](https://2579034597-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FLROGLSFvVMoWgQgbTuaL%2Fuploads%2FuSd4N6cEb9QZudlXPsS2%2Fapi1.png?alt=media\&token=eb34a8b9-db87-4b14-b584-07a99bace147)

Enter a name for the token. This tutorial uses `testToken`. Click **Save.**

The Token id is created.

![token id](https://2579034597-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FLROGLSFvVMoWgQgbTuaL%2Fuploads%2FrVbPKYRodWBEWUFMJKrL%2Fapi3.png?alt=media\&token=01bff98c-42be-4786-ba5b-e742415bde2f)

### Logging in to the API <a href="#logging-in-to-the-api" id="logging-in-to-the-api"></a>

In the API interface, click the **Login** button at the top right of the screen and enter your username and password or provide an API token. Click **Send** and a login request will be sent to the API to retrieve a valid session token. This token will then be used to validate all API requests you wish to make during the session.

![api login](https://2579034597-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FLROGLSFvVMoWgQgbTuaL%2Fuploads%2Fq8ZsVlq1om5UR2XYLAUW%2F2017-10-13_161038a.jpg?alt=media\&token=81c1e49d-c576-4fe1-89b9-2938bab55773)

![api login](https://2579034597-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FLROGLSFvVMoWgQgbTuaL%2Fuploads%2FwWeQEFwNLc7aiKfvOodm%2F2017-10-13_161051a.jpg?alt=media\&token=758551a8-fe23-4abc-a95c-999d938835ef)

### How to make a request to the API <a href="#how-to-make-a-request-to-the-api" id="how-to-make-a-request-to-the-api"></a>

Use the Campaigns group as an example. Click it and the group expands to list the available requests.

Click on the request you would like to automate. This example requests data for CID 1923724:

![get campaign](https://2579034597-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FLROGLSFvVMoWgQgbTuaL%2Fuploads%2FIX6PVAhFjhXhy0lhobws%2FGet-campaign-3.jpg?alt=media\&token=8310db36-8bd3-42a8-9464-55d1ecea7d27)

Click **Get campaign** which expands the window. Enter the Campaign id number into the field:

![campaign id](https://2579034597-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FLROGLSFvVMoWgQgbTuaL%2Fuploads%2Fa5ZfjQ02tjAHEVVvNjRu%2FCampaign-id-1.jpg?alt=media\&token=e7c4c91a-1007-4ea9-9274-9bdd4c498fbd)

![campaign id 1](https://docs-advanced.exads.com/docs/assets/hires/Campaign-id-1.jpg)

Then click the **Try it out!** button. The Response Body will generate the code automatically.

![response body](https://2579034597-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FLROGLSFvVMoWgQgbTuaL%2Fuploads%2FhQkPxEjYelnIKvHSuuHL%2Fresponse-body.jpg?alt=media\&token=2c034535-1dc9-457c-9596-afc91679823f)

A Response Code of 200 means the request succeeded.

### How to pause a campaign <a href="#how-to-pause-a-campaign" id="how-to-pause-a-campaign"></a>

Here is another example. First select the correct function from the Campaigns group:

![campaign pause](https://2579034597-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FLROGLSFvVMoWgQgbTuaL%2Fuploads%2FtJ0NxjL9qQr6EfJDgIlM%2Fcamp-pause2.jpg?alt=media\&token=c6eb62ad-d3c4-4d3e-9f4e-02b7d1c772cf)

Click on **Pause** for one or more campaigns. Once opened, click on the **Example Value**, then click on the yellow box, this will automatically paste the json structure into the body box.

![pause](https://2579034597-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FLROGLSFvVMoWgQgbTuaL%2Fuploads%2FwrvTrnEePyGeE0ZbzfSl%2Fpause-1.jpg?alt=media\&token=73854ee0-876d-4439-918b-5433b58d8934)

Now the current value is zero, so now change the zero to the CID that you want to put on pause. Then click the **Try it out!** button to generate the code needed.

![campaign id](https://2579034597-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FLROGLSFvVMoWgQgbTuaL%2Fuploads%2F2B4uiuKBpY01PByvaTg8%2FCampaign-id-2.jpg?alt=media\&token=6901d16b-53c4-4ee5-9ff8-c993bb36d013)

![campaign id 2](https://docs-advanced.exads.com/docs/assets/hires/Campaign-id-2.jpg)

### How to update a campaign’s pricing <a href="#how-to-update-a-campaigns-pricing" id="how-to-update-a-campaigns-pricing"></a>

Select the correct function:

![campaign id](https://2579034597-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FLROGLSFvVMoWgQgbTuaL%2Fuploads%2Fn3trxEL4z5WThsMpjQli%2Fcamp-put1.jpg?alt=media\&token=1f3137ef-74a0-4e77-a5f1-f07ddf7b027a)

![campaign id 3](https://docs-advanced.exads.com/docs/assets/hires/camp-put1.jpg)

Click **Update a campaign**, to open the window. Add the CID in the campaign id field then click **Example Value**, click on the yellow box which will copy the json structure into the body box.

This code contains a few different functions. Delete everything except the campaign pricing code, as shown below:

![campaign id](https://2579034597-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FLROGLSFvVMoWgQgbTuaL%2Fuploads%2FnFo0mB8EUqCBuPv74thz%2F1h.jpg?alt=media\&token=4ec72f0b-36f5-492b-9a34-ca1a9c6e5b20)

![campaign id 4](https://docs-advanced.exads.com/docs/assets/hires/1h.jpg)

Now change two things in the body box, starting with the model. Below is a list of the values for each pricing model.

```
CampaignPricing {
model (integer, optional): Campaign pricing model (1: CPC, 2: CPM, 3: CPA, 4: Smart CPM, 5: CPV) = [‘1’, ‘2’, ‘3’, ‘4’, ‘5’],
price (number, optional): Campaign price
}
```

This example stays with CPC, so leave model at 1.

Now change the price from zero to the price you want. This example uses 200, which means the new price is 200 cents in the account's currency.

![campaign id](https://2579034597-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FLROGLSFvVMoWgQgbTuaL%2Fuploads%2F87sWZwxDaFf8Ko626s9Y%2F1g.jpg?alt=media\&token=c22da00b-5f92-491d-bab8-93f32ba4daf2)

Then click the **Try it out** button to generate the code.&#x20;

The same approach works for every request in the API. Browse the groups in the interface to find the ones you need.

<br>


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://docs.exads.com/api/exads-public-api/developer-api.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
