Getting started with the Adzerk API

Dave Yarwood edited this page Mar 16, 2017 · 15 revisions

Welcome to the Adzerk Management API! Before we get started, be aware of several other resources that can help you develop on the Adzerk platform in addition to the API documentation:

  • The Adzerk Knowledge Base explains Adzerk features and best practices in depth, and it also contains the documentation for our other APIs, such as the Native Ads API.
  • If you have questions about the API or would like to open issues, the fastest way to get in touch with our team is by writing Adzerk support at "support" AT "adzerk" dot "com". You are welcome to open pull requests as well.

Generating an API Key

The first step to using the Adzerk API is to generate an API Key:

  • Navigate to the Settings section of your Adzerk account and choose the API Keys tab.
  • Click *Add a new API Key' and then copy the generated key to use in your code.

Authenticating Requests

To authenticate with the Adzerk API, the API Key must be passed as a header with the name X-Adzerk-ApiKey on every request. In curl:

curl -X GET -H 'X-Adzerk-ApiKey:1234567890ABCDEF1234567890ABCDEF'

Your API Key is the same as a username/password so be sure to treat it the same way!

Although it is only required for certain applications, you should specify the content-type header as application/x-www-form-urlencoded.

In production, all API requests need to use SSL to protect your key.


The base domain of the management API is The current version is v1, so all requests in this documentation will be made to:


The Management API uses GET, POST, and PUT.

For POST and PUT endpoints, the data payload is structured as a form key (such as criteria) and a JSON object. The API takes the serialized data and passes it as form encoded where the key is the type of the data (in this case, criteria).

For example, POSTing to the endpoint to queue a report uses the following:

criteria={"StartDate":"01/01/2015","EndDate":"02/02/2015","GroupBy":["campaignId"], "Parameters":[{"siteId":123456}]}

In curl:

curl -X POST -H 'X-Adzerk-ApiKey:<APIKEY>' -d 'criteria={"StartDate":"01/01/2015","EndDate":"02/02/2015","GroupBy":["campaignId"], "Parameters":[{"siteId":123456}]}'


Responses are returned as JSON, with very few exceptions (such as the string "Successfully Deleted".)

A typical response from an advertiser endpoint:

"Id": 12345,
"Title": "Test advertiser",
"IsActive": true,
"IsDeleted": false,


An example of pulling a report with RestSharp:

var client = new RestClient();
client.BaseUrl = "";
client.AddDefaultHeader("X-Adzerk-ApiKey", "0223F375AE09CA4E55A82FFA241A23282485");

var request = new RestRequest();
request.Method = Method.POST;
request.Resource = "report";
request.AddParameter("criteria", "{'StartDate': '1/1/2011', 'EndDate': '5/16/2011', 'GroupBy': ['day']}");
RestResponse response = client.Execute(request);

API Explorer

We also offer an API Explorer that enables you to GET, POST and PUT to any of the API endpoints via a web form.

You can’t perform that action at this time.
You signed in with another tab or window. Reload to refresh your session. You signed out in another tab or window. Reload to refresh your session.
Press h to open a hovercard with more details.