Permanently deletes a targeting rules group from the specified banner.
Reference
POST https://YOUR-NETWORK-DOMAIN/rest-api/rules/banner/{bannerId}/remove.do
Permanently deletes a targeting rules group from the specified banner. The rule group is identified by the 'ruleGroupId' query parameter, and the banner by its path ID. After removal, the rules in that group will no longer affect ad serving for this banner. The response is a JSON object with 'success: true'. Requires UPDATE permission on the banner's parent advertiser campaign share and CAMPAIGN_RULES_MANAGEMENT permission. POST only: a GET answers 405, since a state change over GET can be triggered by a prefetch or an embedded link.
Path Params
bannerIdintegerrequired
The unique numeric identifier of the banner to remove the rules group from
7890
Form Params
ruleGroupIdintegerrequired
The unique numeric identifier of the rules group to remove
50
Responses
200
Rules group removed successfully
400
Bad request - ruleGroupId is missing
401
Unauthorized - authentication error
403
Forbidden - insufficient permissions
404
Banner not found, or the rules group is not one of its groups
using var client = new HttpClient();
var request = new HttpRequestMessage(new HttpMethod("POST"), "https://YOUR-NETWORK-DOMAIN/rest-api/rules/banner/7890/remove.do");
request.Headers.Add("X-Api-Key", "YOUR_API_KEY");
request.Content = new FormUrlEncodedContent(new Dictionary<string, string> { ["ruleGroupId"] = "50" });
var response = await client.SendAsync(request);
Console.WriteLine(await response.Content.ReadAsStringAsync());