Update Campaign

Update Campaign

PATCH https://api.ocamba.com/v2/adex/campaigns/{id}

Updates the specific campaign by setting the values of the parameters passed. Any parameters not provided will be left unchanged

Path parameters

parameters

Request schema

body
PATCH https://api.ocamba.com/v2/adex/campaigns/{id} HTTP/1.1
Host: api.ocamba.com
Authorization: Bearer YOUR_SECRET_TOKEN
Content-Type: application/json
{
  "description": "Description goes here",
  "iab_categories": [
    ""
  ],
  "frequency_cap": {},
  "targeting": {}
}
curl -X PATCH "https://api.ocamba.com/v2/adex/campaigns/{id}" \
  -H "Authorization: Bearer $TOKEN" \
  -H "Content-Type: application/json" \
  -d '{"description":"Description goes here","iab_categories":[""],"frequency_cap":{},"targeting":{}}'
fetch("https://api.ocamba.com/v2/adex/campaigns/{id}", {
  method: "PATCH",
  headers: { Authorization: `Bearer ${TOKEN}`, "Content-Type": "application/json" },
  body: JSON.stringify(
    {
      "description": "Description goes here",
      "iab_categories": [
        ""
      ],
      "frequency_cap": {},
      "targeting": {}
    }
  )
}).then(r => r.json());
$ch = curl_init("https://api.ocamba.com/v2/adex/campaigns/{id}");
curl_setopt($ch, CURLOPT_HTTPHEADER, [
  "Authorization: Bearer $token",
  "Content-Type: application/json"
]);
curl_setopt($ch, CURLOPT_POSTFIELDS, json_encode(
  [
    "description" => "Description goes here",
    "iab_categories" => [
      ""
    ],
    "frequency_cap" => [],
    "targeting" => []
  ]
));
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
$response = curl_exec($ch);

Responses

204 No Content

HTTP/1.1 204 No Content
Content-Type: application/json
Responses

Note
1
At least one of the updatable fields should be sent via HTTP body in order to change the current state of the campaign.
2
We recommend using containers instead of tags, as tags are deprecated. If both parameters are sent, containers will take priority.
Tip
1
If you don’t know the campaign id, list the campaigns to find it.