Creates a WiFi traffic targeting rule for the specified placement.
Reference
POST https://YOUR-NETWORK-DOMAIN/rest-api/placement/{placementId}/targeting/wifi-traffic/create.do
Creates a WiFi traffic targeting rule for the specified placement. The rule matches traffic based on whether the viewer is connected via WiFi. Use INCLUDE to target only WiFi users or EXCLUDE to block WiFi traffic. Requires UPDATE permission on the placement and MANAGE_SUPPLY_PRE_TARGETING user permission.
Path Params
placementIdintegerrequired
Unique numeric ID of the placement
4001
Form Params
rulestringrequired
Targeting rule type — INCLUDE for whitelist or EXCLUDE for blacklist
using var client = new HttpClient();
var request = new HttpRequestMessage(new HttpMethod("POST"), "https://YOUR-NETWORK-DOMAIN/rest-api/placement/4001/targeting/wifi-traffic/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());