---
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/4641/api/doc/kibana/v8/operation/operation-update-download-source
resource: https://www.elastic.co/elastic/docs-builder/docs/4641/api/doc/kibana/v8/operation/operation-update-download-source
products:
  - Kibana
---

# Update agent binary download source by ID

Authentication: required

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

## Paths

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

#### Path parameters

- `space_id` (string) — optional
  An identifier for the space. If `space_id` is not provided in the URL, the default space is used. Refer to [Spaces](https://www.elastic.co/docs/deploy-manage/manage-spaces) for more information.
- `sourceId` (string) — required

## Header parameters

- `kbn-xsrf` (string) — required
  Kibana's anti Cross-Site Request Forgery token. Can be any string value.

## Request body

`application/json`

- `host` (string) — required
- `is_default` (boolean) — required
- `name` (string) — required

## Responses

#### `200`

OK

`application/json`

- `item` (object)
  - `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 kbn:/api/fleet/agent_download_sources/SOURCE_ID
{
  "host": "string",
  "is_default": false,
  "name": "string"
}
```

#### curl

```curl
curl -X PUT "${KIBANA_URL}/api/fleet/agent_download_sources/${SOURCE_ID}" \
  -H "kbn-xsrf: true" \
  -H "Authorization: ApiKey ${API_KEY}" \
  -H "Content-Type: application/json" \
  -d '{
    "host": "string",
    "is_default": false,
    "name": "string"
  }'
```

## Response examples

#### 200

`application/json`

Generated from the API spec. Values are representative. Unions use the first variant; deeply nested or large bodies may omit fields.

```json
{
  "item": {
    "host": "string",
    "id": "string",
    "is_default": false,
    "name": "string",
    "proxy_id": "string"
  }
}
```

#### 400

`application/json`

Generated from the API spec. Values are representative. Unions use the first variant; deeply nested or large bodies may omit fields.

```json
{
  "error": "string",
  "message": "string",
  "statusCode": 0
}
```

