---
type: api
title: Update agent binary download source by ID
description: **Spaces method and path for this operation:**
url: https://www.elastic.co/elastic/docs-builder/docs/4371/api/doc/kibana/v8/operation/operation-update-download-source
resource: https://www.elastic.co/elastic/docs-builder/docs/4371/api/doc/kibana/v8/operation/operation-update-download-source
products:
  - Kibana
---

# Update agent binary download source by ID

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

## Paths

- `PUT` `/api/fleet/agent_download_sources/{sourceId}`
- `PUT` `/s/{space_id}/api/fleet/agent_download_sources/{sourceId}`

- [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` (string) — required
- `is_default` (boolean) — required
- `name` (string) — required

## Responses

#### `200`

OK

`application/json`

- `item` ({})
  - `host` (string)
  - `id` (string)
  - `is_default` (boolean)
  - `name` (string)
  - `proxy_id` (string) — nullable
    The ID of the proxy to use for this download source. See the proxies API for more information.
#### `400`

Generic Error

`application/json`

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

#### Console

```console
PUT /api/fleet/agent_download_sources/{sourceId}
```

#### curl

```curl
curl -X PUT "https://{kibana_url}/api/fleet/agent_download_sources/{sourceId}" \
  -H "kbn-xsrf: true"
```

