Removes the role and the permissions it held. The accounts that held it are left without one: they cannot sign in to anything until they are given another role, so move them first. Only a role the caller may manage can be deleted. Requires the Admin Roles & Permissions or User Roles & Permissions console permission.
using var client = new HttpClient();
var request = new HttpRequestMessage(new HttpMethod("DELETE"), "https://YOUR-NETWORK-DOMAIN/rest-api/roles/1.do");
request.Headers.Add("X-Api-Key", "YOUR_API_KEY");
var response = await client.SendAsync(request);
Console.WriteLine(await response.Content.ReadAsStringAsync());