---
type: api
title: Delete role
description: Delete a role.
url: https://www.elastic.co/elastic/docs-builder/docs/4371/api/doc/cloud-enterprise/operation/operation-delete-blueprinter-role
resource: https://www.elastic.co/elastic/docs-builder/docs/4371/api/doc/cloud-enterprise/operation/operation-delete-blueprinter-role
products:
  - Elastic Cloud Enterprise
---

# Delete role

## Paths

- `DELETE` `/platform/infrastructure/blueprinter/roles/{blueprinter_role_id}`

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

#### Path Parameters

- `blueprinter_role_id` (string)
  User-specified Blueprinter role ID.

## Description

Delete a role.

## Query String Parameters

- `skip_validations` (boolean · default: false)
  When sent as true, ignores validation errors.
- `version` (integer)
  When specified, checks for conflicts against the version stored in the persistent store (returned in 'x-cloud-resource-version' of the GET request)

## Responses

#### `200`

The role was successfully deleted.

`application/json`

Type: `EmptyResponse`

#### `400`

The role is currently running container sets. (code: `roles.in_use`)

`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

#### `404`

The role can't be found. (code: `roles.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

#### `409`

Your request failed because the specified version does not match the persisted version. (code: `roles.version_conflict`)

`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 /platform/infrastructure/blueprinter/roles/{blueprinter_role_id}
```

#### curl

```curl
curl -X DELETE "/platform/infrastructure/blueprinter/roles/{blueprinter_role_id}"
```

