---
type: api
title: Create space settings
description: **Spaces method and path for this operation:**
url: https://www.elastic.co/elastic/docs-builder/docs/4493/api/doc/kibana/operation/operation-put-fleet-space-settings
resource: https://www.elastic.co/elastic/docs-builder/docs/4493/api/doc/kibana/operation/operation-put-fleet-space-settings
products:
  - Kibana
---

# Create space settings

Availability: Generally available since 9.1

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

## Paths

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

## Description

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

Create or update Fleet settings for the current Kibana space.

## Required authorization

- Privileges: `fleet-settings-all`

## 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
  A required header to protect against CSRF attacks

## Request body

`application/json`

- `allowed_namespace_prefixes` (string[] · max items: 10) — optional

## Response

Successful response

`application/json`

- `item` (object)
  - `allowed_namespace_prefixes` (string[] · max items: 100)
  - `managed_by` (string)
## Code examples

#### Console

```console
PUT kbn:/api/fleet/space_settings
{
  "allowed_namespace_prefixes": [
    "team-a",
    "team-b"
  ]
}
```

#### curl

```curl
curl -X PUT "${KIBANA_URL}/api/fleet/space_settings" \
  -H "kbn-xsrf: true" \
  -H "Authorization: ApiKey ${API_KEY}" \
  -H "Content-Type: application/json" \
  -d '{
    "allowed_namespace_prefixes": [
      "team-a",
      "team-b"
    ]
  }'
```

## Response examples

#### Put space settings

The updated Fleet settings for the current Kibana space

```json
{
  "item": {
    "allowed_namespace_prefixes": [
      "team-a",
      "team-b"
    ]
  }
}
```

