---
type: api
title: Delete a managed integration
description: **Spaces method and path for this operation:**
url: https://www.elastic.co/elastic/docs-builder/docs/4371/api/doc/kibana/v9/operation/operation-delete-fleet-managed-integrations-policyid
resource: https://www.elastic.co/elastic/docs-builder/docs/4371/api/doc/kibana/v9/operation/operation-delete-fleet-managed-integrations-policyid
products:
  - Kibana
---

# Delete a managed integration

Availability: 9.3+

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

## Paths

- `DELETE` `/api/fleet/managed_integrations/{policyId}`
- `DELETE` `/s/{space_id}/api/fleet/managed_integrations/{policyId}`

- [Api key auth](/elastic/docs-builder/docs/4371/api/doc/kibana/v9/authentication#apikeyauth)
- [Basic auth](/elastic/docs-builder/docs/4371/api/doc/kibana/v9/authentication#basicauth)

#### Path Parameters

- `policyId` (string · max: 256)
  The ID of the policy to delete.

## Description

Refer to [Spaces](https://www.elastic.co/docs/deploy-manage/manage-spaces) for more information.

Delete a managed integration

## Query String Parameters

- `force` (boolean)
  Force delete the policy even if the policy is managed.

## Responses

#### `200`

Indicates a successful response

`application/json`

- `id` (string)
  The ID of the deleted managed integration.
#### `400`

Bad Request

`application/json`

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

Not Found

`application/json`

- `message` (string)
#### `409`

Conflict

`application/json`

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

#### Console

```console
DELETE /api/fleet/managed_integrations/{policyId}
```

#### curl

```curl
curl -X DELETE "https://{kibana_url}/api/fleet/managed_integrations/{policyId}" \
  -H "kbn-xsrf: true"
```

## Response Examples

#### Delete managed integrations response

Example response for deleting a managed integration

```json
{
  "item": {
    "id": "d52a7812-5736-4fdc-aed8-72152afa1ffa"
  }
}
```

#### Generic error response

Example of a generic error response

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

#### Not found error response

Example of a not found error response

```json
{
  "message": "Agentless policy d52a7812-5736-4fdc-aed8-72152afa1ffa not found"
}
```

#### Conflict error response

Example of a conflict error response

```json
{
  "error": "Conflict",
  "message": "An error message describing what went wrong",
  "statusCode": 409
}
```

