POST https://YOUR-NETWORK-DOMAIN/rest-api/zones/{zoneId}/delete.do
Soft-deletes the zone with the given numeric ID. The requester must have DELETE permission on the parent site's inventory through ALL or SHARED level permissions. Deleting a zone also removes its association with placements.For 90 days POST /rest-api/deleted-entities/ZONE/{id}/restore brings it back, links included.
Path Params
zoneIdintegerrequired
Unique numeric ID of the zone to delete
3001
Responses
200
Zone deleted successfully
400
Bad request — invalid or missing parameters
401
Authentication error
403
Insufficient privileges to delete the zone
404
No zone with this id, or the zone is already deleted
using var client = new HttpClient();
var request = new HttpRequestMessage(new HttpMethod("POST"), "https://YOUR-NETWORK-DOMAIN/rest-api/zones/3001/delete.do");
request.Headers.Add("X-Api-Key", "YOUR_API_KEY");
var response = await client.SendAsync(request);
Console.WriteLine(await response.Content.ReadAsStringAsync());