Removes a preset from the network's list, a built-in one too.
Reference
POST https://YOUR-NETWORK-DOMAIN/rest-api/video-requirements/presets/{presetId}/delete.do
Removes a preset from the network's list, a built-in one too. A preset that live sites were filled from is refused with 409, usedBy and siteIds, unless force=true: those sites keep their requirements exactly as they are and are still checked against them, but no longer name the spec they came from. Requires the VIDEO_REQUIREMENT_PRESETS admin permission (Admin → Creatives & tags → Video requirement presets).
Path Params
presetIdstringrequired
Preset id
acme-tv
Form Params
forceboolean
Delete even when sites were filled from it; they keep their requirements
false
Responses
200
{deleted, sitesKeptRequirements}
400
Bad request — invalid or missing parameters
401
Authentication error
403
Insufficient permissions, naming the missing one
404
No preset with this id
409
Sites were filled from the preset and force was not set: {usedBy, siteIds}
using var client = new HttpClient();
var request = new HttpRequestMessage(new HttpMethod("POST"), "https://YOUR-NETWORK-DOMAIN/rest-api/video-requirements/presets/acme-tv/delete.do");
request.Headers.Add("X-Api-Key", "YOUR_API_KEY");
request.Content = new FormUrlEncodedContent(new Dictionary<string, string> { ["force"] = "false" });
var response = await client.SendAsync(request);
Console.WriteLine(await response.Content.ReadAsStringAsync());