Create a new campaign
You are only required to submit the following parameters to create a campaign:
- name
- zone_type
- cpmv
- daily_budget
The rest will be filled in via. defaults
PHP
Replace:
[CAMPAIGN_NAME] with your campaigns name
[ZONE_TYPE] with your campaigns zone - List campaign zone types
[TRAFFIC_TYPE] with your traffic type - List traffic types
[CPMV] with your cpmv (lowest 0.01)
[DAILY_BUDGET] with your daily budget - List campaign budgets
[PAGE_FREQ] with your page freq capping - List campaign page frequency capping
[USER_TIMES] with your uses frequency times - List campaign frequency times
[USER_HOUR] with your user frequency hour - List campaign frequency hour
[COUNTRIES] with your country targeting - List countries
[REGIONS] with your region targeting - List regions
[CITIES] with your city targeting - List cities
[LANGUAGES] with your language targeting - List languages
[OS] with your os targeting - List operating systems
[DEVICES] with your device targeting - List devices
[CARRIERS] with your carrier targeting - List carriers
[YOUR_API_TOKEN] with your token
<?php
$params = array(
'name'=>[CAMPAIGN_NAME],
'zone_type'=>[ZONE_TYPE],
'traffic_type'=>[TRAFFIC_TYPE],
'cpmv'=>[CPMV],
'daily_budget'=>[DAILY_BUDGET],
'page_freq'=>[PAGE_FREQ],
'user_freq_times'=>[USER_TIMES],
'user_freq_hour'=>[USER_HOUR],
'countries'=>[COUNTRIES],
'regions'=>[REGIONS],
'cities'=>[CITIES],
'languages'=>[LANGUAGES],
'os'=>[OS],
'devices'=>[DEVICES],
'carriers'=>[CARRIERS]
);
$curl = curl_init('https://api.adnium.com/v1/advertiser/campaign/add/?token=[YOUR_API_TOKEN]');
curl_setopt($this->curl, CURLOPT_RETURNTRANSFER, true);
curl_setopt($this->curl, CURLOPT_POST, true);
curl_setopt($this->curl, CURLOPT_POSTFIELDS, $params);
$response = curl_exec($curl);
curl_close($curl);
var_dump($response);
?>