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

# Create space settings

Availability: 9.1+

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

## Paths

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

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

## 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.<br/><br/>[Required authorization] Route required privileges: fleet-settings-all.

## Request Body

`application/json`

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

## Response

Successful response

`application/json`

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

#### Console

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

#### curl

```curl
curl -X PUT "https://{kibana_url}/api/fleet/space_settings" \
  -H "kbn-xsrf: true" \
  -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"
    ]
  }
}
```

