Skip to main content
GET
/
api
/
v2
/
network
/
campaigns
List campaigns
curl --request GET \
  --url https://{domain}/api/v2/network/campaigns \
  --header 'X-API-Key: <api-key>'
import requests

url = "https://{domain}/api/v2/network/campaigns"

headers = {"X-API-Key": "<api-key>"}

response = requests.get(url, headers=headers)

print(response.text)
const options = {method: 'GET', headers: {'X-API-Key': '<api-key>'}};

fetch('https://{domain}/api/v2/network/campaigns', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));
<?php

$curl = curl_init();

curl_setopt_array($curl, [
CURLOPT_URL => "https://{domain}/api/v2/network/campaigns",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"X-API-Key: <api-key>"
],
]);

$response = curl_exec($curl);
$err = curl_error($curl);

curl_close($curl);

if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
package main

import (
"fmt"
"net/http"
"io"
)

func main() {

url := "https://{domain}/api/v2/network/campaigns"

req, _ := http.NewRequest("GET", url, nil)

req.Header.Add("X-API-Key", "<api-key>")

res, _ := http.DefaultClient.Do(req)

defer res.Body.Close()
body, _ := io.ReadAll(res.Body)

fmt.Println(string(body))

}
HttpResponse<String> response = Unirest.get("https://{domain}/api/v2/network/campaigns")
.header("X-API-Key", "<api-key>")
.asString();
require 'uri'
require 'net/http'

url = URI("https://{domain}/api/v2/network/campaigns")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Get.new(url)
request["X-API-Key"] = '<api-key>'

response = http.request(request)
puts response.read_body
{
  "message": "Campaigns",
  "success": true,
  "info": [
    {
      "id": 123,
      "hash": "<string>",
      "name": "<string>",
      "created": 123,
      "date_added": 123,
      "date_updated": 123,
      "countries": [
        {
          "id": 123,
          "title": "<string>",
          "code": "<string>"
        }
      ],
      "offer": {
        "id": 123,
        "title": "<string>"
      },
      "affiliate": {
        "id": 123,
        "title": "<string>"
      },
      "advertiser": {
        "id": 123,
        "title": "<string>"
      },
      "commission_plan": {
        "id": 123,
        "title": "<string>"
      },
      "traffic_source": {
        "id": 123,
        "title": "<string>"
      },
      "traffic_approach": {
        "id": 123,
        "title": "<string>"
      },
      "landing_page": {
        "id": 123,
        "title": "<string>",
        "offer_id": 123
      },
      "creative": {
        "id": 123,
        "title": "<string>"
      }
    }
  ]
}

Authorizations

X-API-Key
string
header
required

Preferred authentication method. Pass the API key in the X-API-Key HTTP request header. The user account must have api_status enabled.

Query Parameters

Search by campaign name, hash, or numeric ID.

status
enum<string>

Filter by campaign status. active or paused.

Available options:
active,
paused
affiliate_id
string

Filter by affiliate ID. Comma-separated values accepted (e.g. 1,2,3).

offer_id
string

Filter by offer ID. Comma-separated values accepted.

advertisers
string

Filter by advertiser ID. Comma-separated values accepted.

traffic_source_ids
string

Filter by traffic source ID. Comma-separated values accepted.

traffic_approach_ids
string

Filter by traffic approach ID. Comma-separated values accepted.

commission_plan_ids
string

Filter by commission plan ID. Comma-separated values accepted.

countries
string

Filter by country GeoNames ID. Comma-separated values accepted.

Filter by landing page ID. Comma-separated values accepted.

sortField
enum<string>

Field to sort by.

Available options:
id,
name,
hash,
status,
created,
date_added,
updated,
date_updated,
countries,
affiliate,
offer,
advertiser,
commission_plan,
traffic_source,
traffic_approach,
landing_page,
creative
sortDirection
enum<string>

Sort direction.

Available options:
asc,
desc
perPage
integer
default:20

Items per page. Defaults to 20.

page
integer
default:1

Page number. Defaults to 1.

Response

Campaigns list.

message
string
Example:

"Campaigns"

success
boolean
Example:

true

info
object[]

List of campaigns. Pagination metadata is in response headers.