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

# Update Fleet Server host by ID

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

## Paths

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

#### Path parameters

- `itemId` (string) — required

## Description

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

## Authentication

- Api key: `Authorization: <value>`
  These APIs use key-based authentication. You must create an API key and use the encoded value in the request header. For example: `Authorization: ApiKey base64AccessApiKey`
- Basic: `Authorization: Basic <credentials>`

## Header parameters

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

## Request body

`application/json`

- `host_urls` (string[]) — optional
- `is_default` (boolean) — optional
- `is_internal` (boolean) — optional
- `name` (string) — optional
- `proxy_id` (string) — optional — nullable
  The ID of the proxy to use for this fleet server host. See the proxies API for more information.

## Responses

#### `200`

OK

`application/json`

- `item` (object)
  - `host_urls` (string[])
  - `id` (string)
  - `is_default` (boolean)
  - `is_internal` (boolean)
  - `is_preconfigured` (boolean)
  - `name` (string)
  - `proxy_id` (string)
#### `400`

Generic Error

`application/json`

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

#### Console

```console
PUT kbn:/api/fleet/fleet_server_hosts/ITEM_ID
{}
```

#### curl

```curl
curl -X PUT "${KIBANA_URL}/api/fleet/fleet_server_hosts/${ITEM_ID}" \
  -H "kbn-xsrf: true" \
  -H "Authorization: ApiKey ${API_KEY}" \
  -H "Content-Type: application/json" \
  -d '{}'
```

