Unlinks the given competitor campaigns from this one, both ways, as the console's Competitors card does.
Reference
POST https://YOUR-NETWORK-DOMAIN/rest-api/campaign/{campaignId}/competitors/remove.do
Unlinks the given competitor campaigns from this one, both ways, as the console's Competitors card does. The switches of both campaigns stay as they are. Ids that do not exist are listed in notFound, campaigns the caller may not manage in accessForbidden; they are left alone. Answers the resulting competitor list. Requires the COMPETITOR_CAMPAIGNS permission and UPDATE access to the advertisers of both campaigns.
Path Params
campaignIdintegerrequired
Unique identifier of the campaign
2001
Form Params
competitorIdsarray<integer>required
IDs of the competitor campaigns to unlink — repeat the parameter or separate with commas
2002
Responses
200
Competitors unlinked; competitors lists the campaign's competitors afterwards
using var client = new HttpClient();
var request = new HttpRequestMessage(new HttpMethod("POST"), "https://YOUR-NETWORK-DOMAIN/rest-api/campaign/2001/competitors/remove.do");
request.Headers.Add("X-Api-Key", "YOUR_API_KEY");
request.Content = new FormUrlEncodedContent(new Dictionary<string, string> { ["competitorIds"] = "2002" });
var response = await client.SendAsync(request);
Console.WriteLine(await response.Content.ReadAsStringAsync());