---
title: "Create a configuration deployment"
method: POST
path: "/api/unstable/fleet/deployments/configure"
tags: ["Fleet Automation"]
---

# Create a configuration deployment

`POST /api/unstable/fleet/deployments/configure`

Create a new deployment to apply configuration changes
to a fleet of hosts matching the specified filter query.

This endpoint supports two types of configuration operations:
- `merge-patch`: Merges the provided patch data with the existing configuration file,
  creating the file if it doesn't exist
- `delete`: Removes the specified configuration file from the target hosts

The deployment is created and started automatically. You can specify multiple configuration
operations that will be executed in order on each target host. Use the filter query to target
specific hosts using the Datadog query syntax.

## Request body

- FleetDeploymentConfigureCreateRequest — Request payload for creating a new configuration deployment.
  - `data` FleetDeploymentConfigureCreate, required — Data for creating a new configuration deployment.
    - `attributes` FleetDeploymentConfigureAttributes, required — Attributes for creating a new configuration deployment.
      - `config_operations` FleetDeploymentOperation[], required — Ordered list of configuration file operations to perform on the target hosts.
        - `file_op` 'merge-patch' | 'delete', required — Type of file operation to perform on the target configuration file. - `merge-patch`: Merges the provided patch data with the existing configuration file. Creates the file if it doesn't exist. - `delete`: Removes the specified configuration file from the target hosts.
        - `file_path` string, required — Absolute path to the target configuration file on the host.
        - `patch` object — Patch data in JSON format to apply to the configuration file. When using `merge-patch`, this object is merged with the existing configuration, allowing you to add, update, or override specific fields without replacing the entire file. The structure must match the target configuration file format (for example, YAML structure for Datadog Agent config). Not applicable when using the `delete` operation.
      - `filter_query` string — Query used to filter and select target hosts for the deployment. Uses the Datadog query syntax.
    - `type` 'deployment', required — The type of deployment resource.

## Response `201`

CREATED

- FleetDeploymentResponse — Response containing a single deployment.
  - `data` FleetDeployment — A deployment that defines automated configuration changes for a fleet of hosts.
    - `attributes` FleetDeploymentAttributes, required — Attributes of a deployment in the response.
      - `config_operations` FleetDeploymentOperation[] — Ordered list of configuration file operations to perform on the target hosts.
        - `file_op` 'merge-patch' | 'delete', required — Type of file operation to perform on the target configuration file. - `merge-patch`: Merges the provided patch data with the existing configuration file. Creates the file if it doesn't exist. - `delete`: Removes the specified configuration file from the target hosts.
        - `file_path` string, required — Absolute path to the target configuration file on the host.
        - `patch` object — Patch data in JSON format to apply to the configuration file. When using `merge-patch`, this object is merged with the existing configuration, allowing you to add, update, or override specific fields without replacing the entire file. The structure must match the target configuration file format (for example, YAML structure for Datadog Agent config). Not applicable when using the `delete` operation.
      - `estimated_end_time_unix` integer — Estimated completion time of the deployment as a Unix timestamp (seconds since epoch).
      - `filter_query` string — Query used to filter and select target hosts for the deployment. Uses the Datadog query syntax.
      - `high_level_status` string — Current high-level status of the deployment (for example, "pending", "running", "completed", "failed").
      - `hosts` FleetDeploymentHost[] — Paginated list of hosts in this deployment with their individual statuses. Only included when fetching a single deployment by ID. Use the `limit` and `page` query parameters to navigate through pages. Pagination metadata is included in the response `meta.hosts` field.
        - `error` string — Error message if the deployment failed on this host.
        - `hostname` string — The hostname of the agent.
        - `status` string — Current deployment status for this specific host.
        - `versions` FleetDeploymentHostPackage[] — List of packages and their versions currently installed on this host.
          - `current_version` string — The current version of the package on the host.
          - `initial_version` string — The initial version of the package on the host before the deployment started.
          - `package_name` string — The name of the package.
          - `target_version` string — The target version that the deployment is attempting to install.
      - `packages` FleetDeploymentPackage[] — List of packages to deploy to target hosts. Present only for package upgrade deployments.
        - `name` string, required — The name of the package to deploy.
        - `version` string, required — The target version of the package to deploy.
      - `total_hosts` integer — Total number of hosts targeted by this deployment.
    - `id` string, required — Unique identifier for the deployment.
    - `type` 'deployment', required — The type of deployment resource.
  - `meta` FleetDeploymentResponseMeta — Metadata for a single deployment response, including pagination information for hosts.
    - `hosts` FleetDeploymentHostsPage — Pagination details for the list of hosts in a deployment.
      - `current_page` integer — Current page index (zero-based).
      - `page_size` integer — Number of hosts returned per page.
      - `total_hosts` integer — Total number of hosts in this deployment.
      - `total_pages` integer — Total number of pages available.

## Other responses

- `400` — Bad Request
- `401` — Unauthorized
- `403` — Forbidden
- `429` — Too many requests

---

[API](https://skmtc.net/datadog/apis/api-v2.md) · [All operations](https://skmtc.net/datadog/apis/api-v2/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/datadog/api-v2/revisions/da68bf029e4c/schema)
