Create Campaign
Create a new campaign in a project.
curl -X POST "https://api.5centscdn.com/v2/ad-manager/101/campaigns" \
-H "Content-Type: application/json" \
-H "X-API-Key: YOUR_API_KEY" \
-d '{
"name": "Summer Promo 2026",
"advertiser_id": "adv_8f2a",
"campaign_type": "guaranteed_impressions",
"budget": {
"pricing_model": "cpm",
"cpm_micros": 5000000,
"total_budget_micros": 500000000,
"daily_budget_cap_micros": 50000000,
"impression_goal": 1000000,
"daily_impression_cap": 100000,
"lifetime_impression_cap": 1000000
},
"timezone": "America/New_York",
"start_at": "2026-06-01T00:00:00-04:00",
"end_at": "2026-08-31T23:59:59-04:00",
"priority": 50,
"pacing": {
"pacing_mode": "even"
},
"pod_rules": {
"allow_in_pods": true,
"max_ads_per_pod": 1,
"max_seconds_per_pod": 30,
"allow_multiple_creatives_per_pod": false,
"allow_same_creative_repeat": false,
"preferred_pod_position": "any",
"competitive_category": [
10,
25
]
},
"targeting": {
"include_tags": [
"sports",
"live"
],
"exclude_tags": [
"kids"
],
"categories": [
3,
7
],
"content_ids": [
"1024",
"1025"
],
"placements": [
"preroll"
],
"devices": [
1,
3
],
"languages": [
"en",
"es"
],
"oses": [
"iOS",
"Android"
],
"browsers": [
"Chrome",
"Safari"
],
"continent_geoname_ids": [
6255149
],
"country_geoname_ids": [
6252001
],
"subdivision_1_geoname_ids": [
5332921
],
"subdivision_2_geoname_ids": [
5391959
],
"city_geoname_ids": [
5391811
]
},
"creative_ids": [
"crv_9a71",
"crv_9a72"
],
"creative_weights": {
"crv_9a71": 60,
"crv_9a72": 40
},
"fallback_allowed": false,
"is_house": false,
"share_of_voice_percent": 25,
"category": "3",
"competitive_category": [
10,
25
]
}'
import requests
import json
url = "https://api.5centscdn.com/v2/ad-manager/101/campaigns"
headers = {
"Content-Type": "application/json",
"X-API-Key": "YOUR_API_KEY"
}
data = {
"name": "Summer Promo 2026",
"advertiser_id": "adv_8f2a",
"campaign_type": "guaranteed_impressions",
"budget": {
"pricing_model": "cpm",
"cpm_micros": 5000000,
"total_budget_micros": 500000000,
"daily_budget_cap_micros": 50000000,
"impression_goal": 1000000,
"daily_impression_cap": 100000,
"lifetime_impression_cap": 1000000
},
"timezone": "America/New_York",
"start_at": "2026-06-01T00:00:00-04:00",
"end_at": "2026-08-31T23:59:59-04:00",
"priority": 50,
"pacing": {
"pacing_mode": "even"
},
"pod_rules": {
"allow_in_pods": true,
"max_ads_per_pod": 1,
"max_seconds_per_pod": 30,
"allow_multiple_creatives_per_pod": false,
"allow_same_creative_repeat": false,
"preferred_pod_position": "any",
"competitive_category": [
10,
25
]
},
"targeting": {
"include_tags": [
"sports",
"live"
],
"exclude_tags": [
"kids"
],
"categories": [
3,
7
],
"content_ids": [
"1024",
"1025"
],
"placements": [
"preroll"
],
"devices": [
1,
3
],
"languages": [
"en",
"es"
],
"oses": [
"iOS",
"Android"
],
"browsers": [
"Chrome",
"Safari"
],
"continent_geoname_ids": [
6255149
],
"country_geoname_ids": [
6252001
],
"subdivision_1_geoname_ids": [
5332921
],
"subdivision_2_geoname_ids": [
5391959
],
"city_geoname_ids": [
5391811
]
},
"creative_ids": [
"crv_9a71",
"crv_9a72"
],
"creative_weights": {
"crv_9a71": 60,
"crv_9a72": 40
},
"fallback_allowed": false,
"is_house": false,
"share_of_voice_percent": 25,
"category": "3",
"competitive_category": [
10,
25
]
}
response = requests.post(url, headers=headers, json=data)
print(response.json())
const response = await fetch("https://api.5centscdn.com/v2/ad-manager/101/campaigns", {
method: "POST",
headers: {
"Content-Type": "application/json",
"X-API-Key": "YOUR_API_KEY"
},
body: JSON.stringify({
"name": "Summer Promo 2026",
"advertiser_id": "adv_8f2a",
"campaign_type": "guaranteed_impressions",
"budget": {
"pricing_model": "cpm",
"cpm_micros": 5000000,
"total_budget_micros": 500000000,
"daily_budget_cap_micros": 50000000,
"impression_goal": 1000000,
"daily_impression_cap": 100000,
"lifetime_impression_cap": 1000000
},
"timezone": "America/New_York",
"start_at": "2026-06-01T00:00:00-04:00",
"end_at": "2026-08-31T23:59:59-04:00",
"priority": 50,
"pacing": {
"pacing_mode": "even"
},
"pod_rules": {
"allow_in_pods": true,
"max_ads_per_pod": 1,
"max_seconds_per_pod": 30,
"allow_multiple_creatives_per_pod": false,
"allow_same_creative_repeat": false,
"preferred_pod_position": "any",
"competitive_category": [
10,
25
]
},
"targeting": {
"include_tags": [
"sports",
"live"
],
"exclude_tags": [
"kids"
],
"categories": [
3,
7
],
"content_ids": [
"1024",
"1025"
],
"placements": [
"preroll"
],
"devices": [
1,
3
],
"languages": [
"en",
"es"
],
"oses": [
"iOS",
"Android"
],
"browsers": [
"Chrome",
"Safari"
],
"continent_geoname_ids": [
6255149
],
"country_geoname_ids": [
6252001
],
"subdivision_1_geoname_ids": [
5332921
],
"subdivision_2_geoname_ids": [
5391959
],
"city_geoname_ids": [
5391811
]
},
"creative_ids": [
"crv_9a71",
"crv_9a72"
],
"creative_weights": {
"crv_9a71": 60,
"crv_9a72": 40
},
"fallback_allowed": false,
"is_house": false,
"share_of_voice_percent": 25,
"category": "3",
"competitive_category": [
10,
25
]
})
});
const data = await response.json();
console.log(data);
package main
import (
"fmt"
"net/http"
"bytes"
"encoding/json"
)
func main() {
data := []byte(`{
"name": "Summer Promo 2026",
"advertiser_id": "adv_8f2a",
"campaign_type": "guaranteed_impressions",
"budget": {
"pricing_model": "cpm",
"cpm_micros": 5000000,
"total_budget_micros": 500000000,
"daily_budget_cap_micros": 50000000,
"impression_goal": 1000000,
"daily_impression_cap": 100000,
"lifetime_impression_cap": 1000000
},
"timezone": "America/New_York",
"start_at": "2026-06-01T00:00:00-04:00",
"end_at": "2026-08-31T23:59:59-04:00",
"priority": 50,
"pacing": {
"pacing_mode": "even"
},
"pod_rules": {
"allow_in_pods": true,
"max_ads_per_pod": 1,
"max_seconds_per_pod": 30,
"allow_multiple_creatives_per_pod": false,
"allow_same_creative_repeat": false,
"preferred_pod_position": "any",
"competitive_category": [
10,
25
]
},
"targeting": {
"include_tags": [
"sports",
"live"
],
"exclude_tags": [
"kids"
],
"categories": [
3,
7
],
"content_ids": [
"1024",
"1025"
],
"placements": [
"preroll"
],
"devices": [
1,
3
],
"languages": [
"en",
"es"
],
"oses": [
"iOS",
"Android"
],
"browsers": [
"Chrome",
"Safari"
],
"continent_geoname_ids": [
6255149
],
"country_geoname_ids": [
6252001
],
"subdivision_1_geoname_ids": [
5332921
],
"subdivision_2_geoname_ids": [
5391959
],
"city_geoname_ids": [
5391811
]
},
"creative_ids": [
"crv_9a71",
"crv_9a72"
],
"creative_weights": {
"crv_9a71": 60,
"crv_9a72": 40
},
"fallback_allowed": false,
"is_house": false,
"share_of_voice_percent": 25,
"category": "3",
"competitive_category": [
10,
25
]
}`)
req, err := http.NewRequest("POST", "https://api.5centscdn.com/v2/ad-manager/101/campaigns", bytes.NewBuffer(data))
if err != nil {
panic(err)
}
req.Header.Set("Content-Type", "application/json")
req.Header.Set("X-API-Key", "YOUR_API_KEY")
client := &http.Client{}
resp, err := client.Do(req)
if err != nil {
panic(err)
}
defer resp.Body.Close()
fmt.Println("Response Status:", resp.Status)
}
require 'net/http'
require 'json'
uri = URI('https://api.5centscdn.com/v2/ad-manager/101/campaigns')
http = Net::HTTP.new(uri.host, uri.port)
http.use_ssl = true
request = Net::HTTP::Post.new(uri)
request['Content-Type'] = 'application/json'
request['X-API-Key'] = 'YOUR_API_KEY'
request.body = '{
"name": "Summer Promo 2026",
"advertiser_id": "adv_8f2a",
"campaign_type": "guaranteed_impressions",
"budget": {
"pricing_model": "cpm",
"cpm_micros": 5000000,
"total_budget_micros": 500000000,
"daily_budget_cap_micros": 50000000,
"impression_goal": 1000000,
"daily_impression_cap": 100000,
"lifetime_impression_cap": 1000000
},
"timezone": "America/New_York",
"start_at": "2026-06-01T00:00:00-04:00",
"end_at": "2026-08-31T23:59:59-04:00",
"priority": 50,
"pacing": {
"pacing_mode": "even"
},
"pod_rules": {
"allow_in_pods": true,
"max_ads_per_pod": 1,
"max_seconds_per_pod": 30,
"allow_multiple_creatives_per_pod": false,
"allow_same_creative_repeat": false,
"preferred_pod_position": "any",
"competitive_category": [
10,
25
]
},
"targeting": {
"include_tags": [
"sports",
"live"
],
"exclude_tags": [
"kids"
],
"categories": [
3,
7
],
"content_ids": [
"1024",
"1025"
],
"placements": [
"preroll"
],
"devices": [
1,
3
],
"languages": [
"en",
"es"
],
"oses": [
"iOS",
"Android"
],
"browsers": [
"Chrome",
"Safari"
],
"continent_geoname_ids": [
6255149
],
"country_geoname_ids": [
6252001
],
"subdivision_1_geoname_ids": [
5332921
],
"subdivision_2_geoname_ids": [
5391959
],
"city_geoname_ids": [
5391811
]
},
"creative_ids": [
"crv_9a71",
"crv_9a72"
],
"creative_weights": {
"crv_9a71": 60,
"crv_9a72": 40
},
"fallback_allowed": false,
"is_house": false,
"share_of_voice_percent": 25,
"category": "3",
"competitive_category": [
10,
25
]
}'
response = http.request(request)
puts response.body
{
"result": "success",
"campaign": {
"id": "cmp_4c19",
"admanager_id": 4019,
"advertiser_id": "adv_8f2a",
"advertiser_name": "Acme Corp",
"name": "Summer Promo 2026",
"category": "3",
"campaign_type": "guaranteed_impressions",
"status": "draft",
"priority": 50,
"timezone": "America/New_York",
"start_at": "2026-06-01T00:00:00-04:00",
"end_at": "2026-08-31T23:59:59-04:00",
"budget": {
"pricing_model": "cpm",
"cpm_micros": 5000000,
"total_budget_micros": 500000000,
"daily_budget_cap_micros": 50000000,
"impression_goal": 1000000,
"daily_impression_cap": 100000,
"lifetime_impression_cap": 1000000
},
"pacing": {
"pacing_mode": "even"
},
"pacing_mode": "even",
"pod_rules": {
"allow_in_pods": true,
"max_ads_per_pod": 1,
"max_seconds_per_pod": 30,
"allow_multiple_creatives_per_pod": false,
"allow_same_creative_repeat": false,
"preferred_pod_position": "any",
"competitive_category": [
10,
25
]
},
"share_of_voice_percent": 25,
"fallback_allowed": false,
"is_house": false,
"pricing_model": "example_string",
"cpm_micros": 5000000,
"total_budget_micros": 500000000,
"daily_budget_cap_micros": 50000000,
"impression_goal": 1000000,
"daily_impression_cap": 100000,
"lifetime_impression_cap": 1000000
}
}
POST
/ad-manager/{pid}/campaignsPOST
Base URLstring
Target server for requests. Edit to use your own host.
API Key (header: X-API-Key)
X-API-Keystring
RequiredAPI key (sent in header)
path
pidinteger
RequiredID of the Ad Manager project.
Content-Typestring
RequiredThe media type of the request body
Options: application/json
namestring
RequiredMax length: 120
campaign_typestring
RequiredOptions: guaranteed_impressions, budget_based, share_of_voice, house
start_atstring
Flight start, RFC3339 with UTC offset (e.g. 2026-06-01T00:00:00-04:00). Space-separated wall-clock timestamps are rejected.
Format: date-time
end_atstring
Format: date-time
creative_weightsobject
Rotation weight per creative ID.
Request Preview
Response
Response will appear here after sending the request
Authentication
header
X-API-Keystring
RequiredAPI Key for authentication. Provide your API key in the header.
Path Parameters
Body
application/json
namestring
RequiredExample:
Summer Promo 2026advertiser_idstring
RequiredExample:
adv_8f2acampaign_typestring
RequiredAllowed values:
guaranteed_impressionsbudget_basedshare_of_voicehousetimezonestring
Example:
America/New_Yorkstart_atstring
Flight start, RFC3339 with UTC offset (e.g. 2026-06-01T00:00:00-04:00). Space-separated wall-clock timestamps are rejected.
Example:
2026-06-01T00:00:00-04:00end_atstring
Example:
2026-08-31T23:59:59-04:00priorityinteger
Example:
50creative_idsarray
Example:
["crv_9a71","crv_9a72"]fallback_allowedboolean
Example:
falseis_houseboolean
Example:
falsecategorystring
Example:
3competitive_categoryarray
Example:
[10,25]Responses
resultstring
Operation outcome.
Allowed values:
successerrorcampaignobject
Was this page helpful?