---
title: "Delete a role"
type: reference
method: DELETE
path: /rest-api/roles/{roleId}.do
tag: "Users"
---

# Delete a role

`DELETE https://YOUR-NETWORK-DOMAIN/rest-api/roles/{roleId}.do`

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.

## Path params

| Name | Type | Required | Example | Description |
|---|---|---|---|---|
| `roleId` | integer | yes | `1` |  |

## Responses

- `200` — {success}
- `400` — Bad request — invalid or missing parameters
- `401` — Authentication error
- `403` — The caller may not manage this role
- `404` — No role with that id

## Example request

```bash
curl --request DELETE \
  --url 'https://YOUR-NETWORK-DOMAIN/rest-api/roles/1.do' \
  --header 'X-Api-Key: YOUR_API_KEY'
```

Source: https://epom.com/ad-server/docs/api/users/delete-roles