Create Campaign limit

Create Campaign limit

POST https://api.ocamba.com/api/v1/adex/campaign-limits
Creates a new Campaign limit object

Request schema

body
curl -X POST \
 "https://api.ocamba.com/api/v1/adex/campaign-limits" \
  -H "Authorization: Bearer {TOKEN}" \
  -H "Content-Type: application/json" \
  -d '{
  "campaign_id": "1008865",
  "type": "budget",
  "period": "day",
  "limit_value": "10",
  "budget_type": "income"
}'
const url = 'https://api.ocamba.com/api/v1/adex/campaign-limits';
const options = {
  method: 'POST',
  headers: {
    Authorization: "Bearer {TOKEN}",
    'Content-Type': "application/json"
  },
  body: JSON.stringify(
    {
      "campaign_id": "1008865",
      "type": "budget",
      "period": "day",
      "limit_value": "10",
      "budget_type": "income"
    }
  )
};

try {
  const response = await fetch(url, options);
  const data = await response.json();
  console.log(data);
} catch (error) {
  console.error(error);
}
$ch = curl_init("https://api.ocamba.com/api/v1/adex/campaign-limits");
curl_setopt($ch, CURLOPT_HTTPHEADER, [
  "Authorization: Bearer {TOKEN}",
  "Content-Type: application/json"
]);
curl_setopt($ch, CURLOPT_POSTFIELDS, json_encode(
  [
    "campaign_id" => "1008865",
    "type" => "budget",
    "period" => "day",
    "limit_value" => "10",
    "budget_type" => "income"
  ]
));
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
$response = curl_exec($ch);
curl -X POST \
 "https://api.ocamba.com/api/v1/adex/campaign-limits" \
  -H "Authorization: Bearer {TOKEN}" \
  -H "Content-Type: application/json" \
  -d '{
  "campaign_id": "1008865",
  "type": "frequency",
  "period": "day",
  "limit_value": "20",
  "method": "impressions"
}'
const url = 'https://api.ocamba.com/api/v1/adex/campaign-limits';
const options = {
  method: 'POST',
  headers: {
    Authorization: "Bearer {TOKEN}",
    'Content-Type': "application/json"
  },
  body: JSON.stringify(
    {
      "campaign_id": "1008865",
      "type": "frequency",
      "period": "day",
      "limit_value": "20",
      "method": "impressions"
    }
  )
};

try {
  const response = await fetch(url, options);
  const data = await response.json();
  console.log(data);
} catch (error) {
  console.error(error);
}
$ch = curl_init("https://api.ocamba.com/api/v1/adex/campaign-limits");
curl_setopt($ch, CURLOPT_HTTPHEADER, [
  "Authorization: Bearer {TOKEN}",
  "Content-Type: application/json"
]);
curl_setopt($ch, CURLOPT_POSTFIELDS, json_encode(
  [
    "campaign_id" => "1008865",
    "type" => "frequency",
    "period" => "day",
    "limit_value" => "20",
    "method" => "impressions"
  ]
));
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
$response = curl_exec($ch);

Responses

201 Created

{
  "id": "994"
}
Responses