﻿---
title: stack kb spaces post-spaces-space cli command
description: Create a space Behaviour flags: --dry-run — validate all inputs and exit without performing any action 
url: https://www.elastic.co/elastic/docs-builder/docs/4116/reference/elastic-cli/cli/stack/kb/spaces/post-spaces-space
applies_to:
  - Elastic Cloud Serverless: Preview
  - Elastic Stack: Preview
---

# stack kb spaces post-spaces-space cli command
<cli-modifiers>
</cli-modifiers>

```bash
elastic stack kb spaces post-spaces-space --id <id> --name <name> [options]
```

Create a space
**Behaviour flags:**
`--dry-run` — validate all inputs and exit without performing any action

## Options

<definitions>
  <definition term="--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.
  </definition>
  <definition term="--name string required">
    The display name for the space.
  </definition>
  <definition term="--reserved">
  </definition>
  <definition term="--color string">
    The hexadecimal color code used in the space avatar. By default, the color is automatically generated from the space name.
  </definition>
  <definition term="--description string">
    A description for the space.
  </definition>
  <definition term="--disabled-features string[]">
    **Repeatable:** pass `--disabled-features` multiple times to supply more than one value
  </definition>
  <definition term="--image-url 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.
  </definition>
  <definition term="--initials string">
    One or two characters that are shown in the space avatar. By default, the initials are automatically generated from the space name.
  </definition>
  <definition term="--project-routing 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.
  </definition>
  <definition term="--input-file string">
    path to a JSON file to use as command input
  </definition>
  <definition term="--dry-run">
    validate all inputs and exit without performing any action (preview changes without applying them)
  </definition>
</definitions>


## Global Options

<definitions>
  <definition term="--json">
    output as JSON
  </definition>
</definitions>