Update Contextual Targeting

Update Contextual Targeting for the specified campaign.

Rate limit: Tier 1
Recent Requests
Log in to see full request history
TimeStatusUser Agent
Retrieving recent requests…
LoadingLoading…
🚧

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 USER.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 USER.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/contextual_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/contextual_segments"
   }
}

Rate limit

🚧

Rate limit

Tier 1. Updating contextual segment targeting has its own budget, more permissive than the one used for reading it.

See Rate limits for the request allowance each tier carries.

Path Params
string
required

An alphabetic ID. See Get Account Details.

string
required

A numeric ID.

Body Params
json
Defaults to { "collection": [ { "collection": [ 1900004, 1900024, 1900037 ], "type": "INCLUDE" } ] }
Response

Language
Credentials
OAuth2
LoadingLoading…
Response
Choose an example:
application/json