> This page is for API.

> For clean Markdown of any page, append .md to the page URL.
> For a complete documentation index, see https://docs.eon.io/llms.txt.
> For AI client integration (Claude Code, Cursor, etc.), connect to the MCP server at https://docs.eon.io/_mcp/server.

# Delete Role

DELETE https://%7Baccount-domain%7D.console.eon.io/api/v1/roles/{roleId}

Deletes a role.

Reference: https://docs.eon.io/api/api-reference/access-management/roles/delete-role

## Authentication

- `Authorization` header (bearer token, required) — Bearer authentication of the form `Bearer <token>`, where token is your auth token.

## Request

### Path parameters

- `roleId` (string, required) — Role ID.

## Response

### 204

Role deleted.

## Errors

### 404 Not Found Error

Role not found

- `any`

## Examples

**SDK Code**

```python
import requests

url = "https://{account-domain}.console.eon.io/api/v1/roles/ceaf2281-bf04-542d-a801-a6a4865373ad"

headers = {"Authorization": "Bearer <token>"}

response = requests.delete(url, headers=headers)

print(response.json())
```

```javascript
const url = 'https://{account-domain}.console.eon.io/api/v1/roles/ceaf2281-bf04-542d-a801-a6a4865373ad';
const options = {method: 'DELETE', headers: {Authorization: 'Bearer <token>'}};

try {
  const response = await fetch(url, options);
  const data = await response.json();
  console.log(data);
} catch (error) {
  console.error(error);
}
```

```java
import com.mashape.unirest.http.HttpResponse;
import com.mashape.unirest.http.Unirest;

HttpResponse<String> response = Unirest.delete("https://{account-domain}.console.eon.io/api/v1/roles/ceaf2281-bf04-542d-a801-a6a4865373ad")
  .header("Authorization", "Bearer <token>")
  .asString();
```