Skip to main content
API

Learn how to request Adsterra API

Anna avatar
Written by Anna
Updated this week

Getting an API token

To get an API token, go to the API page from the sidebar menu and click Generate new token. You can also access the API documentation from that page and see all the tokens you've used before.

❗ Note that there can only be one valid token at a time. So once you generate a new token, you have to make a change to all API requests you've made.

Include the token in a header parameter called X-API-Key:

Available endpoints and URI

All requests are made to the following URI:

<https://api3.adsterratools.com/advertiser>

  • BALANCE

    /balance.{format} - Check the current balance of your account.

  • BANNER


    /banner/{banner_id}.{format} - Update the activity of а banner.


    /banner/{banner_id}/landings.{format}- Check the status of landings linked to a specific banner.

  • CAMPAIGN


    /campaign/{campaign_id}.{format} - (GET) - Check the status of a specific campaign.


    /campaign/{campaign_id}.{format} - (PATCH)- Update the activity settings of a campaign.


    /campaign/{campaign_id}/banners.{format} - See the status of banners in a specific campaign.


    /campaign/{campaign_id}/landings.{format} - Check the status of landings in a specific campaign.


    /campaign/{campaign_id}/linking/blacklist.{format} - View blocked placements (blacklist) for a specific campaign (not visible in the user interface).


  • CAMPAIGNS


    /campaigns.{format} - View the status of all your campaigns.


  • LINKING


    /linking/blacklist.{format} - Block placements from sending traffic to your campaign by adding them to a blacklist.


    /linking/blacklist/delete.{format} - Remove specific placements from a campaign's blacklist.


    /linking/blacklist/clean.{format} - Clear all placements from a specific campaign's blacklist.


    /linking/whitelist.{format} - Add specific placements to a whitelist, allowing traffic only from these sources


    /linking/whitelist/delete.{format} - Remove specific placements from a campaign's whitelist


    /campaign/{campaignId}/linking/whitelist.{format} - Clear all placements from a campaign's whitelist


    /campaign/{campaignId}/linking/whitelist.{format} - View all placements in your campaign's whitelist


  • STATISTICS


    /stats.{format} - Access detailed performance reports for your campaigns.


  • CUSTOM-BIDS


    /campaign/{campaignId}/custom_bid.{format} - See the list of custom bids for a specific campaign


    /campaign/{campaignId}/custom_bid.{format} - Set a custom bid list for a campaign


    /campaign/{campaignId}/custom_bid.{format} - Update the custom bid list for a campaign


    /campaign/{campaignId}/custom_bid.{format} - Remove specific bids from a campaign's custom bid list


    /campaign/{campaignId}/custom_bid/clean.{format} - Clear all custom bids from a campaign

The data can be retrieved as JSON, XML, and CSV. Make sure to specify the data format you need in the URI:

<https://api3.adsterratools.com/advertiser/stats.json>

Example requests on how to get Adsterra statistics via API

We'll walk you through a few requests using Postman — a popular API testing tool. You can use it to get the idea of how we format the data and to test the requests you are planning to make.

First, we need to get the IDs of our campaigns from the following URI:

https://api3.adsterratools.com/advertiser/stats.json?group_by=campaign&start_date=2024-12-01&finish_date=2025-01-15

We can use group_by to fetch campaigns' stats:

In the response body, we can see the following:

Let's take campaign id from the previous query and check the status of landings linked to a specific banner:

The response:

Possible errors and ways to fix them

401 — Unauthorized request. Please use the token available in your dashboard.

403 — Access denied, the token is no longer valid. Please generate a new token.

404 — Not found. Make sure the URI is correct.

Did this answer your question?