---
type: api
title: Delete role mapping
description: Deletes the organization role  mapping. Currently unavailable in self-hosted ECE.
url: https://www.elastic.co/elastic/docs-builder/docs/4371/api/doc/cloud-enterprise/v4/operation/operation-delete-role-mappings-individually
resource: https://www.elastic.co/elastic/docs-builder/docs/4371/api/doc/cloud-enterprise/v4/operation/operation-delete-role-mappings-individually
products:
  - Elastic Cloud Enterprise
---

# Delete role mapping

## Paths

- `DELETE` `/organizations/{organization_id}/role_mappings/{role_names}`

- [Basic auth](/elastic/docs-builder/docs/4371/api/doc/cloud-enterprise/v4/authentication#basicauth)
- [Api key auth](/elastic/docs-builder/docs/4371/api/doc/cloud-enterprise/v4/authentication#apikey)

#### Path Parameters

- `organization_id` (string)
  Identifier for the Organization
- `role_names` (string)
  Comma separated list of role names

## Description

Deletes the organization role  mapping. Currently unavailable in self-hosted ECE.

## Responses

#### `200`

The mappings were successfully deleted

`application/json`

- `mappings` ([] string)
  The list of deleted role assignments to the organization
#### `404`

Organization not found. (code: `organization.not_found`)

`application/json`

- `errors` ([] BasicFailedReplyElement)
  A list of errors that occurred in the failing request
  - `code` (string)
    A structured code representing the error type that occurred
  - `message` (string)
    A human readable message describing the error that occurred
  - `fields` ([] string)
    If the error can be tied to a specific field or fields in the user request, this lists those fields
##### Response Headers

- `x-cloud-error-codes` (enum)
  The error codes associated with the response

## Code Examples

#### Console

```console
DELETE /organizations/{organization_id}/role_mappings/{role_names}
```

#### curl

```curl
curl -X DELETE "/organizations/{organization_id}/role_mappings/{role_names}"
```

