Links each creative of the campaign to the placements its auto-linking rule now matches and unlinks it from the ones it no longer matches.
Reference
POST https://YOUR-NETWORK-DOMAIN/rest-api/campaigns/{campaignId}/auto-linking/apply.do
Links each creative of the campaign to the placements its auto-linking rule now matches and unlinks it from the ones it no longer matches. Creatives without auto-linking rules and placements with auto-linking disabled are left alone. linkCount: creative-placement links to add, unlinkCount: links to remove, placementCount: placements affected. All zero means the links already follow the auto-linking rules. Requires UPDATE share on the campaign and AUTO_LINKING_SETTINGS.
Path Params
campaignIdintegerrequired
ID of the campaign
3001
Responses
200
Applied; the counts say what changed
400
Bad request — invalid or missing parameters
401
Authentication error
403
Missing share or permission; the message names the permission
using var client = new HttpClient();
var request = new HttpRequestMessage(new HttpMethod("POST"), "https://YOUR-NETWORK-DOMAIN/rest-api/campaigns/3001/auto-linking/apply.do");
request.Headers.Add("X-Api-Key", "YOUR_API_KEY");
var response = await client.SendAsync(request);
Console.WriteLine(await response.Content.ReadAsStringAsync());