---
type: api
title: Delete a role
description: Delete a Kibana role by its name.
url: https://www.elastic.co/elastic/docs-builder/docs/4493/api/doc/kibana/operation/operation-delete-security-role-name
resource: https://www.elastic.co/elastic/docs-builder/docs/4493/api/doc/kibana/operation/operation-delete-security-role-name
products:
  - Kibana
---

# Delete a role

- Server: `https://{kibana_url}`

## Paths

- `DELETE` `/api/security/role/{name}`

#### Path parameters

- `name` (string · min length: 1) — required
  The role name.

## Description

Delete a Kibana role by its name.

## Authentication

- Api key: `Authorization: <value>`
  These APIs use key-based authentication. You must create an API key and use the encoded value in the request header. For example: `Authorization: ApiKey base64AccessApiKey`
- Basic: `Authorization: Basic <credentials>`

## Header parameters

- `kbn-xsrf` (string) — required
  A required header to protect against CSRF attacks

## Response

Indicates a successful call.

## Code examples

#### Console

```console
DELETE kbn:/api/security/role/NAME
```

#### curl

```curl
curl -X DELETE "${KIBANA_URL}/api/security/role/${NAME}" \
  -H "kbn-xsrf: true" \
  -H "Authorization: ApiKey ${API_KEY}"
```

