---
type: api
title: Create agent binary download source
description: **Spaces method and path for this operation:**
url: https://www.elastic.co/elastic/docs-builder/docs/4493/api/doc/kibana/v8/operation/operation-post-download-sources
resource: https://www.elastic.co/elastic/docs-builder/docs/4493/api/doc/kibana/v8/operation/operation-post-download-sources
products:
  - Kibana
---

# Create agent binary download source

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

## Paths

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

## Description

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

## Authentication

- Api key: `Authorization: <value>`
  These APIs use key-based authentication. You must create an API key and use the encoded value in the request header. For example: `Authorization: ApiKey base64AccessApiKey`
- Basic: `Authorization: Basic <credentials>`

## Request body

`application/json`

- `host` (string) — required
- `id` (string) — optional
- `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
POST kbn:/api/fleet/agent_download_sources
{
  "host": "string",
  "is_default": false,
  "name": "string"
}
```

#### curl

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

