---
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/4493/api/doc/cloud-enterprise/operation/operation-delete-role-mappings-individually
resource: https://www.elastic.co/elastic/docs-builder/docs/4493/api/doc/cloud-enterprise/operation/operation-delete-role-mappings-individually
products:
  - Elastic Cloud Enterprise
---

# Delete role mapping

## Paths

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

#### Path parameters

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

## Description

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

## Authentication

- Basic: `Authorization: Basic <credentials>`
- Api key: `Authorization: <value>`

## 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` (object[])
  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

#### `409`

Concurrent organization modification. (code: `org.domain_claim.concurrent_organization_modification`)

`application/json`

- `errors` (object[])
  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

#### curl

```curl
curl -X DELETE "${API_URL}/organizations/${ORGANIZATION_ID}/role_mappings/${ROLE_NAMES}" \
  -u "${USERNAME}:${PASSWORD}"
```

