Creates a web app targeting rule for the specified advertiser.
Reference
POST https://YOUR-NETWORK-DOMAIN/rest-api/advertiser/{advertiserId}/targeting/is-web-app/create.do
Creates a web app targeting rule for the specified advertiser. The rule filters ad requests based on whether the traffic originates from a web application context. Use INCLUDE to target only web app traffic, or EXCLUDE to avoid it. Requires UPDATE permission on the advertiser and MANAGE_DEMAND_TARGETING user permission.
Path Params
advertiserIdintegerrequired
Unique numeric ID of the advertiser
1234
Form Params
rulestringrequired
Targeting rule type — INCLUDE to target web app traffic or EXCLUDE to avoid it
using var client = new HttpClient();
var request = new HttpRequestMessage(new HttpMethod("POST"), "https://YOUR-NETWORK-DOMAIN/rest-api/advertiser/1234/targeting/is-web-app/create.do");
request.Headers.Add("X-Api-Key", "YOUR_API_KEY");
request.Content = new FormUrlEncodedContent(new Dictionary<string, string> { ["rule"] = "INCLUDE" });
var response = await client.SendAsync(request);
Console.WriteLine(await response.Content.ReadAsStringAsync());