---
title: "Create an agent binary download source"
method: POST
path: "/api/fleet/agent_download_sources"
tags: ["Elastic Agent binary download sources"]
---

# Create an agent binary download source

`POST /api/fleet/agent_download_sources`

**Spaces method and path for this operation:**

<div><span class="operation-verb post">post</span>&nbsp;<span class="operation-path">/s/{space_id}/api/fleet/agent_download_sources</span></div>

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

Create a new agent binary download source.<br/><br/>[Required authorization] Route required privileges: fleet-settings-all.

## Headers

- `kbn-xsrf` string, required

## Request body

- object
  - `auth` object, nullable
    - `api_key` string
    - `headers` object[]
      - `key` string, required
      - `value` string, required
    - `password` string
    - `username` string
  - `host` string, uri, required
  - `id` string
  - `is_default` boolean
  - `name` string, required
  - `proxy_id` string, nullable — The ID of the proxy to use for this download source. See the proxies API for more information.
  - `secrets` object
    - `auth` object
      - `api_key` union
        - object
          - `id` string, required
        - string
      - `password` union
        - object
          - `id` string, required
        - string
    - `ssl` object
      - `key` union
        - object
          - `id` string, required
        - string
  - `ssl` object
    - `certificate` string
    - `certificate_authorities` string[]
    - `key` string

## Response `200`

Successful response

- object
  - `item` object, required
    - `auth` object, nullable
      - `api_key` string
      - `headers` object[]
        - `key` string, required
        - `value` string, required
      - `password` string
      - `username` string
    - `host` string, uri, required
    - `id` string, required
    - `is_default` boolean
    - `name` string, required
    - `proxy_id` string, nullable — The ID of the proxy to use for this download source. See the proxies API for more information.
    - `secrets` object
      - `auth` object
        - `api_key` union
          - object
            - `id` string, required
          - string
        - `password` union
          - object
            - `id` string, required
          - string
      - `ssl` object
        - `key` union
          - object
            - `id` string, required
          - string
    - `ssl` object
      - `certificate` string
      - `certificate_authorities` string[]
      - `key` string

## Other responses

- `400` — Bad Request

---

[API](https://skmtc.net/elastic/apis/kibana-apis.md) · [All operations](https://skmtc.net/elastic/apis/kibana-apis/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/elastic/kibana-apis/versions/531c9e2a7d23/schema)
