---
type: api
title: Delete Fleet Server host by ID
description: **Spaces method and path for this operation:**
url: https://www.elastic.co/elastic/docs-builder/docs/4641/api/doc/kibana/v8/operation/operation-delete-fleet-server-hosts
resource: https://www.elastic.co/elastic/docs-builder/docs/4641/api/doc/kibana/v8/operation/operation-delete-fleet-server-hosts
products:
  - Kibana
---

# Delete Fleet Server host by ID

Authentication: required

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

## Paths

- `DELETE` `/api/fleet/fleet_server_hosts/{itemId}`
- `DELETE` `/s/{space_id}/api/fleet/fleet_server_hosts/{itemId}`

#### 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.
- `itemId` (string) — required

## Header parameters

- `kbn-xsrf` (string) — required
  Kibana's anti Cross-Site Request Forgery token. Can be any string value.

## Responses

#### `200`

OK

`application/json`

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

Generic Error

`application/json`

- `error` (string)
- `message` (string)
- `statusCode` (number)
## Code examples

#### Console

```console
DELETE kbn:/api/fleet/fleet_server_hosts/ITEM_ID
```

#### curl

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

## Response examples

#### 200

`application/json`

Generated from the API spec. Values are representative. Unions use the first variant; deeply nested or large bodies may omit fields.

```json
{
  "id": "string"
}
```

#### 400

`application/json`

Generated from the API spec. Values are representative. Unions use the first variant; deeply nested or large bodies may omit fields.

```json
{
  "error": "string",
  "message": "string",
  "statusCode": 0
}
```

