---
type: api
title: Delete cloud onboarding deployment
description: **Spaces method and path for this operation:**
url: https://www.elastic.co/elastic/docs-builder/docs/4641/api/doc/kibana/v9/operation/operation-delete-fleet-cloud-onboarding-deployments-id
resource: https://www.elastic.co/elastic/docs-builder/docs/4641/api/doc/kibana/v9/operation/operation-delete-fleet-cloud-onboarding-deployments-id
products:
  - Kibana
---

# Delete cloud onboarding deployment

Authentication: required

Availability: Experimental since 9.5

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

## Paths

- `DELETE` `/api/fleet/cloud_onboarding_deployments/{id}`
- `DELETE` `/s/{space_id}/api/fleet/cloud_onboarding_deployments/{id}`

#### Path parameters

- `space_id` (string) — optional
  An identifier for the space. If `space_id` is not provided in the URL, the default space is used. Refer to [Spaces](https://www.elastic.co/docs/deploy-manage/manage-spaces) for more information.
- `id` (string · max length: 255) — required
  The saved object ID of the cloud onboarding deployment.

## Description

Delete a cloud onboarding deployment by ID.

## Required authorization

- Privileges: `fleet-agent-policies-all` or `integrations-all`

## Header parameters

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

## Responses

#### `200`

Successful response

`application/json`

- `id` (string)
#### `400`

Bad Request

`application/json`

- `attributes` (object)
- `error` (string)
- `errorType` (string)
- `message` (string)
- `statusCode` (number)
#### `404`

Not Found

`application/json`

- `message` (string)
## Code examples

#### Console

```console
DELETE kbn:/api/fleet/cloud_onboarding_deployments/ID
```

#### curl

```curl
curl -X DELETE "${KIBANA_URL}/api/fleet/cloud_onboarding_deployments/${ID}" \
  -H "kbn-xsrf: true" \
  -H "Authorization: ApiKey ${API_KEY}"
```

## Response examples

#### Delete cloud onboarding deployment

`application/json`

The cloud onboarding deployment was successfully deleted

```json
{
  "id": "onboarding-deployment-id-1"
}
```

#### Generic error response

`application/json`

Example of a generic error response

```json
{
  "error": "Bad Request",
  "message": "An error message describing what went wrong",
  "statusCode": 400
}
```

#### Not found response

`application/json`

The requested cloud onboarding deployment does not exist

```json
{
  "error": "Not Found",
  "message": "Saved object [fleet-cloud-onboarding-deployment/unknown-id] not found",
  "statusCode": 404
}
```

