Disables all targeting rules for the specified site by setting the site's enableTargeting flag to false.
Reference
POST https://YOUR-NETWORK-DOMAIN/rest-api/site/{siteId}/targeting/disable.do
Disables all targeting rules for the specified site by setting the site's enableTargeting flag to false. Existing targeting rules are preserved but will not be applied during ad serving. Returns an error if the site has blocked or blocking entity records. Requires UPDATE permission on the site and MANAGE_SUPPLY_PRE_TARGETING user permission.
using var client = new HttpClient();
var request = new HttpRequestMessage(new HttpMethod("POST"), "https://YOUR-NETWORK-DOMAIN/rest-api/site/3001/targeting/disable.do");
request.Headers.Add("X-Api-Key", "YOUR_API_KEY");
var response = await client.SendAsync(request);
Console.WriteLine(await response.Content.ReadAsStringAsync());