---
type: api
title: "Deprecated: Update a managed integration"
description: "Deprecated. Use PUT /api/fleet/managed_integrations/{policyId} instead. Update a managed integration by ID. Uses full-replace semantics: the policy is rebuilt entirely from the request body, so any omitted optional field (for example, description, vars, global_data_tags, cloud_connector) is cleared or reset to its default. The integration package name is immutable and the runtime-managed cluster_id is preserved from the existing policy."
url: https://www.elastic.co/elastic/docs-builder/docs/5066/api/kibana-serverless/operation/operation-put-fleet-agentless-policies-policyid
resource: https://www.elastic.co/elastic/docs-builder/docs/5066/api/kibana-serverless/operation/operation-put-fleet-agentless-policies-policyid
products:
  - Kibana
---

# Deprecated: Update a managed integration

Authentication: required

Availability: Experimental

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

## Paths

- `PUT` `/api/fleet/agentless_policies/{policyId}`
- `PUT` `/s/{space_id}/api/fleet/agentless_policies/{policyId}`

#### 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.
- `policyId` (string · max length: 256) — required
  The ID of the managed integration to update.

## Description

Deprecated. Use `PUT /api/fleet/managed_integrations/{policyId}` instead. Update a managed integration by ID. Uses full-replace semantics: the policy is rebuilt entirely from the request body, so any omitted optional field (for example, `description`, `vars`, `global_data_tags`, `cloud_connector`) is cleared or reset to its default. The integration package name is immutable and the runtime-managed `cluster_id` is preserved from the existing policy.

## Query string parameters

- `onboarding_deployment_id` (string · max length: 256) — optional
  ID of the cloud onboarding instance that manages the package policies. Required to change package policies managed by a cloud onboarding instance; only the onboarding flow is expected to set it. Requests that change a managed package policy without a matching ID are rejected with a 400 error, and `force` does not bypass this check. A bulk delete that includes such a package policy is rejected as a whole.

## Header parameters

- `kbn-xsrf` (string) — required
  A required header to protect against CSRF attacks

## Request body

`application/json`

- `acknowledge_agent_version_incompatibility` (boolean) — optional
  When true, create or upgrade the package policy even though some active agents on its agent policies don't satisfy the package's agent version condition. Without it, the request is rejected, because those agents would stop collecting the integration's data. The `force` flag does not bypass this check.
- `additional_datastreams_permissions` (string[] · max items: 100) — optional — nullable
  Additional data stream permissions that will be added to the agent policy.
- `cloud_connector` (object) — optional — nullable
  - `cloud_connector_id` (string · max length: 256) — optional
    ID of an existing cloud connector to reuse. If not provided, a new connector is created. Requires `enabled: true` and cannot be combined with `name`.
  - `enabled` (boolean · default: false) — optional
    Set to `true` to attach a cloud connector to this policy. Must be `true` to set any of `cloud_connector_id`, `name`, or `target_csp`.
  - `name` (string · min length: 1 · max length: 255) — optional
    Name for a new cloud connector. If not provided, a name is generated automatically from the credentials. Requires `enabled: true` and only applies when creating a new connector (cannot be combined with `cloud_connector_id`).
  - `target_csp` (enum) — optional
    Target cloud service provider. If not provided, the provider is detected automatically from the inputs. Requires `enabled: true`.
    Values: `aws`, `azure`, `gcp`
- `create_dataset_templates` (boolean) — optional
  When true, install dedicated index templates for streams with a custom data_stream.dataset. Defaults to true for input packages, false for integration packages.
- `description` (string · max length: 2048) — optional
  Policy description.
- `force` (boolean) — optional
  Force package policy creation even if the package is not verified, or if the agent policy is managed.
- `global_data_tags` (object[] · max items: 100) — optional
  - `name` (string · max length: 1024) — required
    Name of the custom field. The name cannot contain spaces.
  - `value` (union string | number) — required
    Value of the custom field.
- `id` (string · max length: 255) — optional
  Policy unique identifier.
- `inputs` (map string to object) — optional
  Package policy inputs. Refer to the integration documentation to know which inputs are available.
  Map values (object)
  - `condition` (string · max length: 10000) — optional — nullable
    Agent condition expression to evaluate whether to apply this input.
  - `deprecated` (object) — optional
    - `description` (string · max length: 4096) — required
    - `replaced_by` (map string to string) — optional
      Map values (string · max length: 1024)
    - `since` (string · max length: 50) — optional
  - `enabled` (boolean) — optional
    Enable or disable that input. Defaults to `true` (enabled).
  - `streams` (map string to object) — optional
    Input streams. Refer to the integration documentation to know which streams are available.
    Map values (object)
    - `condition` (string · max length: 10000) — optional — nullable
      Agent condition expression to evaluate whether to apply this stream.
    - `deprecated` (object) — optional
      - `description` (string · max length: 4096) — required
      - `replaced_by` (map string to string) — optional
        Map values (string · max length: 1024)
      - `since` (string · max length: 50) — optional
    - `enabled` (boolean) — optional
      Enable or disable that stream. Defaults to `true` (enabled).
    - `var_group_selections` (map string to string) — optional
      Variable group selections. Maps var_group name to the selected option name within that group.
      Map values (string · max length: 1024)
    - `vars` (map string to anyOf) — optional
      Input/stream level variable. Refer to the integration documentation for more information.
      Map values (union anyOf · default: null)
      Any of:
      - **[]string**
      - **string**
      - **[]number**
      - **number**
      - **boolean**
      - **{ id, isSecretRef }**
        - `id` (string · max length: 255) — required
        - `isSecretRef` (boolean) — required
  - `vars` (map string to anyOf) — optional
    Input/stream level variable. Refer to the integration documentation for more information.
    Map values (union anyOf · default: null)
    Any of:
    - **[]string**
    - **string**
    - **[]number**
    - **number**
    - **boolean**
    - **{ id, isSecretRef }**
      - `id` (string · max length: 255) — required
      - `isSecretRef` (boolean) — required
- `name` (string · max length: 255) — required
  Unique name for the policy.
- `namespace` (string · max length: 100) — optional
  Policy namespace. When not specified, it inherits the agent policy namespace.
- `package` (object) — required
  - `experimental_data_stream_features` (object[] · max items: 100) — optional
    - `data_stream` (string · max length: 1024) — required
    - `features` (object) — required
      - `doc_value_only_numeric` (boolean) — optional
      - `doc_value_only_other` (boolean) — optional
      - `synthetic_source` (boolean) — optional
      - `tsdb` (boolean) — optional
  - `fips_compatible` (boolean) — optional
  - `name` (string · max length: 255) — required
    Package name
  - `requires_root` (boolean) — optional
  - `title` (string · max length: 255) — optional
  - `version` (string · max length: 50) — required
    Package version
- `policy_template` (string · max length: 256) — optional
  The policy template to use for the managed integration. If not provided, the default policy template is used.
- `var_group_selections` (map string to string) — optional
  Variable group selections. Maps var_group name to the selected option name within that group.
  Map values (string · max length: 1024)
- `vars` (map string to anyOf) — optional
  Input/stream level variable. Refer to the integration documentation for more information.
  Map values (union anyOf · default: null)
  Any of:
  - **[]string**
  - **string**
  - **[]number**
  - **number**
  - **boolean**
  - **{ id, isSecretRef }**
    - `id` (string · max length: 255) — required
    - `isSecretRef` (boolean) — required

## Responses

#### `200`

Indicates a successful response

`application/json`

- `item` (object)
  - `additional_datastreams_permissions` (string[] · max items: 1000)
    Additional data stream permissions granted to the managed integration.
  - `cloud_connector` (object)
    - `cloud_connector_id` (string · max length: 255)
      The ID of the cloud connector.
    - `enabled` (boolean)
      Whether the cloud connector is active for this policy.
  - `created_at` (string · max length: 64)
    Creation timestamp (ISO 8601).
  - `created_by` (string · max length: 1024)
    User who created the policy.
  - `description` (string · max length: 2048)
    Managed integration description.
  - `global_data_tags` (object[] · max items: 100)
    Custom data tags applied to all data produced by this policy.
    - `name` (string · max length: 1024)
      The name of the custom field.
    - `value` (union string | number)
      The value of the custom field.
  - `id` (string · max length: 255)
    Managed integration unique identifier.
  - `inputs` (map string to object)
    Package policy inputs. Refer to the integration documentation to know which inputs are available.
    Map values (object)
    - `condition` (string · max length: 10000) — nullable
      Agent condition expression to evaluate whether to apply this input.
    - `deprecated` (object)
      - `description` (string · max length: 4096)
      - `replaced_by` (map string to string)
        Map values (string · max length: 1024)
      - `since` (string · max length: 50)
    - `enabled` (boolean)
      Enable or disable that input. Defaults to `true` (enabled).
    - `streams` (map string to object)
      Input streams. Refer to the integration documentation to know which streams are available.
      Map values (object)
      - `condition` (string · max length: 10000) — nullable
        Agent condition expression to evaluate whether to apply this stream.
      - `deprecated` (object)
        - `description` (string · max length: 4096)
        - `replaced_by` (map string to string)
          Map values (string · max length: 1024)
        - `since` (string · max length: 50)
      - `enabled` (boolean)
        Enable or disable that stream. Defaults to `true` (enabled).
      - `var_group_selections` (map string to string)
        Variable group selections. Maps var_group name to the selected option name within that group.
        Map values (string · max length: 1024)
      - `vars` (map string to anyOf)
        Input/stream level variable. Refer to the integration documentation for more information.
        Map values (union anyOf · default: null)
        Any of:
        - **[]string**
        - **string**
        - **[]number**
        - **number**
        - **boolean**
        - **{ id, isSecretRef }**
          - `id` (string · max length: 255)
          - `isSecretRef` (boolean)
    - `vars` (map string to anyOf)
      Input/stream level variable. Refer to the integration documentation for more information.
      Map values (union anyOf · default: null)
      Any of:
      - **[]string**
      - **string**
      - **[]number**
      - **number**
      - **boolean**
      - **{ id, isSecretRef }**
        - `id` (string · max length: 255)
        - `isSecretRef` (boolean)
  - `name` (string · max length: 255)
    Managed integration name.
  - `namespace` (string · max length: 100)
    Policy namespace. Defaults to the agent policy namespace.
  - `onboarding_deployment_id` (string · max length: 256)
    ID of the cloud onboarding instance that manages this managed integration. Set by Fleet, read-only.
  - `package` (object)
    - `name` (string · max length: 255)
      Integration package name.
    - `title` (string · max length: 255)
      Integration package display title.
    - `version` (string · max length: 50)
      Integration package version.
  - `updated_at` (string · max length: 64)
    Last update timestamp (ISO 8601).
  - `updated_by` (string · max length: 1024)
    User who last updated the policy.
  - `var_group_selections` (map string to string)
    Variable group selections. Maps var_group name to the selected option name within that group.
    Map values (string · max length: 1024)
  - `vars` (map string to anyOf)
    Input/stream level variable. Refer to the integration documentation for more information.
    Map values (union anyOf · default: null)
    Any of:
    - **[]string**
    - **string**
    - **[]number**
    - **number**
    - **boolean**
    - **{ id, isSecretRef }**
      - `id` (string · max length: 255)
      - `isSecretRef` (boolean)
#### `400`

Bad Request

`application/json`

- `attributes` (object)
- `error` (string)
- `errorType` (string)
- `message` (string)
- `statusCode` (number)
#### `404`

Not Found

`application/json`

- `message` (string)
#### `409`

Conflict — for example, the requested name is already used by another integration policy.

`application/json`

- `attributes` (object)
- `error` (string)
- `errorType` (string)
- `message` (string)
- `statusCode` (number)
## Code examples

#### Console

```console
PUT kbn:/api/fleet/agentless_policies/POLICY_ID
{
  "cloud_connector": {
    "enabled": true,
    "target_csp": "aws"
  },
  "description": "CSPM integration for AWS with cloud connector",
  "inputs": {
    "cspm-cloudbeat/cis_aws": {
      "enabled": true,
      "streams": {
        "cloud_security_posture.findings": {
          "enabled": true,
          "vars": {
            "aws.account_type": "organization-account",
            "aws.credentials.type": "cloud_connector",
            "aws.supports_cloud_connectors": true,
            "external_id": {
              "id": "ABCDEFGHIJKLMNOPQRST",
              "isSecretRef": true
            },
            "role_arn": "arn:aws:iam::123456789012:role/TestRole"
          }
        }
      },
      "vars": {
        "cloud_formation_template": "https://console.aws.amazon.com/cloudformation/home#/stacks/quickcreate?templateURL=https://elastic-cspm-cft.s3.eu-central-1.amazonaws.com/cloudformation-cspm-ACCOUNT_TYPE-9.2.0.yml"
      }
    },
    "cspm-cloudbeat/cis_azure": {
      "enabled": false
    },
    "cspm-cloudbeat/cis_gcp": {
      "enabled": false
    }
  },
  "name": "cspm-aws-policy",
  "namespace": "default",
  "package": {
    "name": "cloud_security_posture",
    "version": "3.1.1"
  },
  "vars": {
    "deployment": "aws",
    "posture": "cspm"
  }
}
```

#### curl

```curl
curl -X PUT "${KIBANA_URL}/api/fleet/agentless_policies/${POLICY_ID}" \
  -H "kbn-xsrf: true" \
  -H "Authorization: ApiKey ${API_KEY}" \
  -H "Content-Type: application/json" \
  -d '{
    "cloud_connector": {
      "enabled": true,
      "target_csp": "aws"
    },
    "description": "CSPM integration for AWS with cloud connector",
    "inputs": {
      "cspm-cloudbeat/cis_aws": {
        "enabled": true,
        "streams": {
          "cloud_security_posture.findings": {
            "enabled": true,
            "vars": {
              "aws.account_type": "organization-account",
              "aws.credentials.type": "cloud_connector",
              "aws.supports_cloud_connectors": true,
              "external_id": {
                "id": "ABCDEFGHIJKLMNOPQRST",
                "isSecretRef": true
              },
              "role_arn": "arn:aws:iam::123456789012:role/TestRole"
            }
          }
        },
        "vars": {
          "cloud_formation_template": "https://console.aws.amazon.com/cloudformation/home#/stacks/quickcreate?templateURL=https://elastic-cspm-cft.s3.eu-central-1.amazonaws.com/cloudformation-cspm-ACCOUNT_TYPE-9.2.0.yml"
        }
      },
      "cspm-cloudbeat/cis_azure": {
        "enabled": false
      },
      "cspm-cloudbeat/cis_gcp": {
        "enabled": false
      }
    },
    "name": "cspm-aws-policy",
    "namespace": "default",
    "package": {
      "name": "cloud_security_posture",
      "version": "3.1.1"
    },
    "vars": {
      "deployment": "aws",
      "posture": "cspm"
    }
  }'
```

## Response examples

#### Update managed integration response

`application/json`

Example response for updating a managed integration

```json
{
  "item": {
    "created_at": "2025-11-06T18:27:43.541Z",
    "created_by": "test_user",
    "description": "updated description",
    "id": "d52a7812-5736-4fdc-aed8-72152afa1ffa",
    "inputs": {
      "ESS Billing-cel": {
        "enabled": true,
        "streams": {
          "ess_billing.billing": {
            "enabled": true,
            "vars": {
              "hide_sensitive": true,
              "http_client_timeout": "30s",
              "lookbehind": 180,
              "tags": [
                "forwarded",
                "billing"
              ]
            }
          },
          "ess_billing.credits": {
            "enabled": true
          }
        },
        "vars": {
          "api_key": {
            "id": "QY1sWpoBbWcMW-edr0Ee",
            "isSecretRef": true
          },
          "organization_id": "1234",
          "url": "https://billing.elastic-cloud.com"
        }
      }
    },
    "name": "ess_billing-1",
    "namespace": "default",
    "package": {
      "name": "ess_billing",
      "title": "Elasticsearch Service Billing",
      "version": "1.6.0"
    },
    "updated_at": "2025-11-07T09:14:02.118Z",
    "updated_by": "test_user"
  }
}
```

#### Update managed integration with awscloud connector response

`application/json`

Example response after attaching an AWS cloud connector on update

```json
{
  "item": {
    "cloud_connector": {
      "cloud_connector_id": "aws-connector-67890",
      "enabled": true
    },
    "created_at": "2025-11-06T18:27:43.541Z",
    "created_by": "test_user",
    "description": "CSPM integration for AWS with cloud connector",
    "id": "aws-policy-12345",
    "inputs": {
      "cspm-cloudbeat/cis_aws": {
        "enabled": true,
        "streams": {
          "cloud_security_posture.findings": {
            "enabled": true,
            "vars": {
              "aws.account_type": "organization-account",
              "aws.credentials.type": "cloud_connector",
              "external_id": {
                "id": "secret-external-id-123",
                "isSecretRef": true
              },
              "role_arn": "arn:aws:iam::123456789012:role/TestRole"
            }
          }
        },
        "vars": {
          "cloud_formation_template": "https://console.aws.amazon.com/cloudformation/home#/stacks/quickcreate?templateURL=https://elastic-cspm-cft.s3.eu-central-1.amazonaws.com/cloudformation-cspm-ACCOUNT_TYPE-9.2.0.yml"
        }
      },
      "cspm-cloudbeat/cis_azure": {
        "enabled": false
      },
      "cspm-cloudbeat/cis_gcp": {
        "enabled": false
      }
    },
    "name": "cspm-aws-policy",
    "namespace": "default",
    "package": {
      "name": "cloud_security_posture",
      "title": "Cloud Security Posture Management",
      "version": "3.1.1"
    },
    "updated_at": "2025-11-07T09:14:02.118Z",
    "updated_by": "test_user",
    "vars": {
      "deployment": "aws",
      "posture": "cspm"
    }
  }
}
```

#### Generic error response

`application/json`

Example of a generic error response

```json
{
  "error": "Bad Request",
  "message": "An error message describing what went wrong",
  "statusCode": 400
}
```

#### Package name change error response

`application/json`

The integration package name cannot be changed on update

```json
{
  "error": "Bad Request",
  "message": "Cannot change the integration package of an agentless policy (from \u0022ess_billing\u0022 to \u0022cloud_security_posture\u0022).",
  "statusCode": 400
}
```

#### Not found error response

`application/json`

Example of a not found error response

```json
{
  "message": "Agentless policy d52a7812-5736-4fdc-aed8-72152afa1ffa not found"
}
```

#### Conflict error response

`application/json`

Example of a name-conflict error response

```json
{
  "error": "Conflict",
  "message": "An integration policy with the name my-agentless-policy already exists. Please rename it or choose a different name.",
  "statusCode": 409
}
```

