---
type: api
title: Create Fleet Server host
description: **Spaces method and path for this operation:**
url: https://www.elastic.co/elastic/docs-builder/docs/4371/api/doc/kibana/v8/operation/operation-post-fleet-server-hosts
resource: https://www.elastic.co/elastic/docs-builder/docs/4371/api/doc/kibana/v8/operation/operation-post-fleet-server-hosts
products:
  - Kibana
---

# Create Fleet Server host

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

## Paths

- `POST` `/api/fleet/fleet_server_hosts`
- `POST` `/s/{space_id}/api/fleet/fleet_server_hosts`

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

## Description

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

## Request Body

`application/json`

- `host_urls` ([] string) — required
- `id` (string) — optional
- `is_default` (boolean) — optional
- `is_internal` (boolean) — optional
- `name` (string) — required
- `proxy_id` (string) — optional
  The ID of the proxy to use for this fleet server host. See the proxies API for more information.

## Responses

#### `200`

OK

`application/json`

- `item` ({})
  - `host_urls` ([] string)
  - `id` (string)
  - `is_default` (boolean)
  - `is_internal` (boolean)
  - `is_preconfigured` (boolean)
  - `name` (string)
  - `proxy_id` (string)
#### `400`

Generic Error

`application/json`

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

#### Console

```console
POST /api/fleet/fleet_server_hosts
```

#### curl

```curl
curl -X POST "https://{kibana_url}/api/fleet/fleet_server_hosts"
```

