---
type: api
title: Update a space
description: Update an existing Kibana space.
url: https://www.elastic.co/elastic/docs-builder/docs/4493/api/doc/kibana/operation/operation-put-spaces-space-id
resource: https://www.elastic.co/elastic/docs-builder/docs/4493/api/doc/kibana/operation/operation-put-spaces-space-id
products:
  - Kibana
---

# Update a space

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

## Paths

- `PUT` `/api/spaces/space/{id}`

#### Path parameters

- `id` (string) — required
  The space identifier. You are unable to change the ID with the update operation.

## Description

Update an existing Kibana space.

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

- `_reserved` (boolean) — optional
- `color` (string) — optional
  The hexadecimal color code used in the space avatar. By default, the color is automatically generated from the space name.
- `description` (string) — optional
  A description for the space.
- `disabledFeatures` (string[] · max items: 100 · default: []) — optional
- `id` (string) — required
  The space ID that is part of the Kibana URL when inside the space. Space IDs are limited to lowercase alphanumeric, underscore, and hyphen characters (a-z, 0-9, _, and -). You are cannot change the ID with the update operation.
- `imageUrl` (string) — optional
  The data-URL encoded image to display in the space avatar. If specified, initials will not be displayed and the color will be visible as the background color for transparent images. For best results, your image should be 64x64. Images will not be optimized by this API call, so care should be taken when using custom images.
- `initials` (string · max length: 2) — optional
  One or two characters that are shown in the space avatar. By default, the initials are automatically generated from the space name.
- `name` (string · min length: 1) — required
  The display name for the space.
- `projectRouting` (string) — optional
  Cross-project search default routing configuration for this space. Controls whether searches are scoped to a single project or span multiple projects in serverless environments.
- `solution` (enum) — optional
  Values: `security`, `oblt`, `es`, `classic`

## Response

Indicates a successful call.

`application/json`

- `_reserved` (boolean)
- `color` (string)
  The hexadecimal color code used in the space avatar. By default, the color is automatically generated from the space name.
- `description` (string)
  A description for the space.
- `disabledFeatures` (string[] · max items: 100 · default: [])
- `id` (string)
  The space ID that is part of the Kibana URL when inside the space. Space IDs are limited to lowercase alphanumeric, underscore, and hyphen characters (a-z, 0-9, _, and -). You are cannot change the ID with the update operation.
- `imageUrl` (string)
  The data-URL encoded image to display in the space avatar. If specified, initials will not be displayed and the color will be visible as the background color for transparent images. For best results, your image should be 64x64. Images will not be optimized by this API call, so care should be taken when using custom images.
- `initials` (string · max length: 2)
  One or two characters that are shown in the space avatar. By default, the initials are automatically generated from the space name.
- `name` (string · min length: 1)
  The display name for the space.
- `projectRouting` (string)
  Cross-project search default routing configuration for this space. Controls whether searches are scoped to a single project or span multiple projects in serverless environments.
- `solution` (enum)
  Values: `security`, `oblt`, `es`, `classic`
## Code examples

#### Console

```console
PUT kbn:/api/spaces/space/ID
{
  "id": "marketing",
  "name": "Marketing",
  "description": "This is the Marketing Space",
  "color": "null",
  "initials": "MK",
  "disabledFeatures": [],
  "imageUrl": ""
}
```

#### curl

```curl
curl -X PUT "${KIBANA_URL}/api/spaces/space/${ID}" \
  -H "kbn-xsrf: true" \
  -H "Authorization: ApiKey ${API_KEY}" \
  -H "Content-Type: application/json" \
  -d '{
    "id": "marketing",
    "name": "Marketing",
    "description": "This is the Marketing Space",
    "color": "null",
    "initials": "MK",
    "disabledFeatures": [],
    "imageUrl": ""
  }'
```

## Response examples

#### Update the marketing space

A response that contains the updated configuration of the Kibana space.

```json
{
  "color": "#aabbcc",
  "description": "An updated description for the Marketing Space",
  "disabledFeatures": [],
  "id": "marketing",
  "imageUrl": "",
  "initials": "MK",
  "name": "Marketing",
  "solution": "es"
}
```

