Removes one of the site's additional ads.txt lines by its id and returns the site's ads.txt view.
Reference
POST https://YOUR-NETWORK-DOMAIN/rest-api/sites/{siteId}/ads-txt/lines/{lineId}/delete.do
Removes one of the site's additional ads.txt lines by its id and returns the site's ads.txt view. Requires ENABLED level on the SITE_SUPPLY_CHAIN permission and UPDATE permission on the site; a masked share is refused.
Path Params
siteIdintegerrequired
Unique numeric ID of the site
5001
lineIdintegerrequired
ID of the line, as the GET returns it under 'additional'
42
Responses
200
Line removed
400
Bad request — invalid or missing parameters
401
Authentication error
403
No SITE_SUPPLY_CHAIN permission, or the site is outside the caller's shares or masked
404
Site not found, or the site has no line with that id
using var client = new HttpClient();
var request = new HttpRequestMessage(new HttpMethod("POST"), "https://YOUR-NETWORK-DOMAIN/rest-api/sites/5001/ads-txt/lines/42/delete.do");
request.Headers.Add("X-Api-Key", "YOUR_API_KEY");
var response = await client.SendAsync(request);
Console.WriteLine(await response.Content.ReadAsStringAsync());