---
type: api
title: Update a proxy
description: **Spaces method and path for this operation:**
url: https://www.elastic.co/elastic/docs-builder/docs/4371/api/doc/kibana-serverless/operation/operation-put-fleet-proxies-itemid
resource: https://www.elastic.co/elastic/docs-builder/docs/4371/api/doc/kibana-serverless/operation/operation-put-fleet-proxies-itemid
products:
  - Kibana
---

# Update a proxy

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

## Paths

- `PUT` `/api/fleet/proxies/{itemId}`
- `PUT` `/s/{space_id}/api/fleet/proxies/{itemId}`

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

#### Path Parameters

- `itemId` (string)
  The ID of the proxy

## Description

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

Update a proxy by ID.<br/><br/>[Required authorization] Route required privileges: fleet-settings-all.

## Request Body

`application/json`

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

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

Not Found

## Code Examples

#### Console

```console
PUT /api/fleet/proxies/{itemId}
{
  "name": "Updated proxy",
  "url": "http://updated-proxy.example.com:3128"
}
```

#### curl

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

## Response Examples

#### Put fleet proxy

The updated Fleet proxy

```json
{
  "item": {
    "id": "proxy-id-1",
    "is_preconfigured": false,
    "name": "Updated proxy",
    "url": "http://updated-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
}
```

#### Not found

No proxy was found with the given ID

```json
{
  "error": "Not Found",
  "message": "Proxy proxy-id-1 not found",
  "statusCode": 404
}
```

