---
type: api
title: Update settings
description: **Spaces method and path for this operation:**
url: https://www.elastic.co/elastic/docs-builder/docs/4641/api/doc/kibana/v8/operation/operation-update-settings
resource: https://www.elastic.co/elastic/docs-builder/docs/4641/api/doc/kibana/v8/operation/operation-update-settings
products:
  - Kibana
---

# Update settings

Authentication: required

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

## Paths

- `PUT` `/api/fleet/settings`
- `PUT` `/s/{space_id}/api/fleet/settings`

#### 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.

## Request body

`application/json`

- `additional_yaml_config` (string) — optional
- `delete_unenrolled_agents` (object) — optional
  - `enabled` (boolean) — optional
  - `is_preconfigured` (boolean) — optional
- `fleet_server_hosts` (string[]) — optional
  Protocol and path must be the same for each URL
- `has_seen_add_data_notice` (boolean) — optional

## Responses

#### `200`

OK

`application/json`

- `item` (object)
  - `delete_unenrolled_agents` (object)
    - `enabled` (boolean)
    - `is_preconfigured` (boolean)
  - `fleet_server_hosts` (string[]) — deprecated
  - `has_seen_add_data_notice` (boolean)
  - `id` (string)
  - `prerelease_integrations_enabled` (boolean)
#### `400`

Generic Error

`application/json`

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

#### Console

```console
PUT kbn:/api/fleet/settings
{}
```

#### curl

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

## 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
{
  "item": {
    "delete_unenrolled_agents": {
      "enabled": false,
      "is_preconfigured": false
    },
    "fleet_server_hosts": [
      "string"
    ],
    "has_seen_add_data_notice": false,
    "id": "string",
    "prerelease_integrations_enabled": false
  }
}
```

#### 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
}
```

