---
type: api
title: Create a proxy
description: Create a new Fleet proxy.<br/><br/>[Required authorization] Route required privileges: fleet-settings-all.
url: https://www.elastic.co/elastic/docs-builder/docs/4371/api/doc/kibana/v0/operation/operation-post-fleet-proxies
resource: https://www.elastic.co/elastic/docs-builder/docs/4371/api/doc/kibana/v0/operation/operation-post-fleet-proxies
products:
  - Kibana
---

# Create a proxy

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

## Paths

- `POST` `/api/fleet/proxies`

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

## Description

Create a new Fleet proxy.<br/><br/>[Required authorization] Route required privileges: fleet-settings-all.

## Request Body

`application/json`

- `certificate` (string) — optional — nullable
- `certificate_authorities` (string) — optional — nullable
- `certificate_key` (string) — optional — nullable
- `id` (string) — optional
- `is_preconfigured` (boolean · default: false) — optional
- `name` (string) — required
- `proxy_headers` (map string to boolean | number | string) — optional — nullable
- `url` (string) — required

## Responses

#### `200`

Successful response

`application/json`

- `item` (object)
  - `certificate` (string) — nullable
  - `certificate_authorities` (string) — nullable
  - `certificate_key` (string) — nullable
  - `id` (string)
  - `is_preconfigured` (boolean · default: false)
  - `name` (string)
  - `proxy_headers` (map string to boolean | number | string) — nullable
  - `url` (string)
#### `400`

Bad Request

`application/json`

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

#### Console

```console
POST /api/fleet/proxies
{
  "name": "My proxy",
  "url": "http://proxy.example.com:3128"
}
```

#### curl

```curl
curl -X POST "https://{kibana_url}/api/fleet/proxies" \
  -H "kbn-xsrf: true" \
  -H "Content-Type: application/json" \
  -d '{
  "name": "My proxy",
  "url": "http://proxy.example.com:3128"
}'
```

## Response Examples

#### Post fleet proxy

The created Fleet proxy

```json
{
  "item": {
    "id": "proxy-id-2",
    "is_preconfigured": false,
    "name": "My proxy",
    "url": "http://proxy.example.com:3128"
  }
}
```

#### Generic error response

Example of a generic error response

```json
{
  "error": "Bad Request",
  "message": "An error message describing what went wrong",
  "statusCode": 400
}
```

