Update Contextual Targeting

Update Contextual Targeting for the specified campaign.

🚧

For a list of Contextual Segments that can be targeted by a given account, see the Dictionary (dictionary/contextual_segments endpoint).

Sample requests

Sample request path

POST <<server_url>>/backstage/api/1.0/demo-account/campaigns/1234/targeting/contextual_segments

Sample request objects

{
   "collection": []
}
{
    "collection": [
        {
            "collection": [
                1900004,
                1900024,
                1900037
            ],
            "type": "INCLUDE"
        }
    ]
}
{
    "collection": [
        {
            "collection": [
                1900004,
                1900024,
                1900037
            ],
            "type": "INCLUDE"
        },
        {
            "collection": [
                1905924,
                1899997
            ],
            "type": "EXCLUDE"
        }        
    ]
}

🚧

Guidelines

  1. Contextual Targeting does not support a PATCH operation.
  2. To add/remove segments, re-submit the entire collection.
  3. To remove all segments, submit an empty collection.
  4. For a given campaign, you can apply an INCLUDE and an EXCLUDE.

📘

For a successful request, the same object is returned in the response.

Campaign Object

Sample request path

GET <<server_url>>/backstage/api/1.0/demo-account/campaigns/1234

Sample responses

{
   // Other campaign fields omitted..
   "contextual_segments_targeting": {
      "state": "ALL",
      "value": null,
      "href": "https://backstage.taboola.com/backstage/api/1.0/demo-account/campaigns/1234/targeting/audience_segments"
   }
}
{
   // Other campaign fields omitted..
   "contextual_segments_targeting": {
      "state": "EXISTS",
      "value": null,
      "href": "https://backstage.taboola.com/backstage/api/1.0/demo-account/campaigns/1234/targeting/audience_segments"
   }
}
Language