Create Campaign
Create Campaign
POST
https://api.ocamba.com/api/v1/adex/campaigns
Creates a new Campaign object
Request schema
bodyPOST https://api.ocamba.com/api/v1/adex/campaigns HTTP/1.1
Host: api.ocamba.com
Authorization: Bearer YOUR_SECRET_TOKEN
Content-Type: application/json
{
"name": "DemoCampaign",
"status": "active",
"pricing_model": "cpc",
"score": 78,
"iab_category": [
""
],
"frequency_cap": {},
"remote_id": 42131,
"exchange_id": 12341,
"description": "Description goes here"
}
curl -X POST "https://api.ocamba.com/api/v1/adex/campaigns" \
-H "Authorization: Bearer $TOKEN" \
-H "Content-Type: application/json" \
-d '{"name":"DemoCampaign","status":"active","pricing_model":"cpc","score":78,"iab_category":[""],"frequency_cap":{},"remote_id":42131,"exchange_id":12341,"description":"Description goes here"}'
fetch("https://api.ocamba.com/api/v1/adex/campaigns", {
method: "POST",
headers: { Authorization: `Bearer ${TOKEN}`, "Content-Type": "application/json" },
body: JSON.stringify(
{
"name": "DemoCampaign",
"status": "active",
"pricing_model": "cpc",
"score": 78,
"iab_category": [
""
],
"frequency_cap": {},
"remote_id": 42131,
"exchange_id": 12341,
"description": "Description goes here"
}
)
}).then(r => r.json());
$ch = curl_init("https://api.ocamba.com/api/v1/adex/campaigns");
curl_setopt($ch, CURLOPT_HTTPHEADER, [
"Authorization: Bearer $token",
"Content-Type: application/json"
]);
curl_setopt($ch, CURLOPT_POSTFIELDS, json_encode(
[
"name" => "DemoCampaign",
"status" => "active",
"pricing_model" => "cpc",
"score" => 78,
"iab_category" => [
""
],
"frequency_cap" => [],
"remote_id" => 42131,
"exchange_id" => 12341,
"description" => "Description goes here"
]
));
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
$response = curl_exec($ch);
Responses
201 Created
HTTP/1.1 201 Created
Content-Type: application/json
Responses