---
type: api
title: Update package settings
description: **Spaces method and path for this operation:**
url: https://www.elastic.co/elastic/docs-builder/docs/4493/api/doc/kibana/operation/operation-put-fleet-epm-packages-pkgname-pkgversion
resource: https://www.elastic.co/elastic/docs-builder/docs/4493/api/doc/kibana/operation/operation-put-fleet-epm-packages-pkgname-pkgversion
products:
  - Kibana
---

# Update package settings

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

## Paths

- `PUT` `/api/fleet/epm/packages/{pkgName}/{pkgVersion}`
- `PUT` `/api/fleet/epm/packages/{pkgName}`
- `PUT` `/s/{space_id}/api/fleet/epm/packages/{pkgName}/{pkgVersion}`

#### Path parameters

- `pkgName` (string) — required
  Package name
- `pkgVersion` (string) — optional, leave it out to use `/api/fleet/epm/packages/{pkgName}`
  Package version

## Description

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

Update settings for a specific version of a package.

## Required authorization

- Privileges: `integrations-all` and `fleet-agent-policies-all`

## 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>`

## Header parameters

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

## Request body

`application/json`

- `keepPoliciesUpToDate` (boolean) — optional
- `namespace_customization_enabled_for` (string[] · max items: 100) — optional
  Namespaces for which namespace-level customization is enabled on this package.
- `namespace_customization_settings` (map string to object) — optional
  Per-namespace managed settings (for example, ILM policy) for this package. Keyed by namespace name.
  Map values (object)
  - `ilm_policy` (string · min length: 1 · max length: 1024) — optional

## Responses

#### `200`

Successful response

`application/json`

- `item` (object)
  - `agent` (object)
    - `privileges` (object)
      - `root` (boolean)
  - `asset_tags` (object[] · max items: 1000)
    - `asset_ids` (string[] · max items: 1000)
    - `asset_types` (string[] · max items: 100)
    - `text` (string)
  - `assets` (map string to object)
  - `categories` (string[] · max items: 100)
  - `conditions` (object)
    - `deprecated` (object)
      - `description` (string · max length: 4096)
      - `replaced_by` (map string to string)
        Map values (string · max length: 1024)
      - `since` (string · max length: 50)
    - `elastic` (object)
      - `capabilities` (string[] · max items: 10)
      - `subscription` (string)
    - `kibana` (object)
      - `version` (string)
  - `data_streams` (string to object[] · max items: 1000)
  - `deprecated` (object)
    - `description` (string · max length: 4096)
    - `replaced_by` (map string to string)
      Map values (string · max length: 1024)
    - `since` (string · max length: 50)
  - `description` (string)
  - `discovery` (object)
    - `datasets` (object[] · max items: 100)
      - `name` (string)
    - `fields` (object[] · max items: 100)
      - `name` (string)
  - `download` (string)
  - `elasticsearch` (map string to object)
  - `format_version` (string)
  - `icons` (object[] · max items: 100)
    - `dark_mode` (boolean)
    - `path` (string)
    - `size` (string)
    - `src` (string)
    - `title` (string)
    - `type` (string)
  - `installationInfo` (object)
    - `additional_spaces_installed_kibana` (map string to object)
      Map values (object[] · max items: 100)
    - `created_at` (string)
    - `experimental_data_stream_features` (object[] · max items: 100)
      - `data_stream` (string · max length: 1024)
      - `features` (object)
        - `doc_value_only_numeric` (boolean)
        - `doc_value_only_other` (boolean)
        - `synthetic_source` (boolean)
        - `tsdb` (boolean)
    - `install_format_schema_version` (string)
    - `install_source` (enum)
      Values: `registry`, `upload`, `bundled`, `custom`
    - `install_status` (enum)
      Values: `installed`, `installing`, `install_failed`
    - `installed_es` (object[] · max items: 10000)
      - `customDataStreamOriginDataset` (string)
      - `customDataStreamOriginType` (string)
      - `deferred` (boolean)
      - `id` (string)
      - `type` (enum)
        Values: `index`, `index_template`, `component_template`, `ingest_pipeline`, `ilm_policy`, `data_stream_ilm_policy`, `transform`, `ml_model`, `knowledge_base`, `esql_view`
      - `version` (string)
    - `installed_kibana` (object[] · max items: 10000)
      - `deferred` (boolean)
      - `id` (string)
      - `originId` (string)
      - `type` (union enum | string)
        Values: `dashboard`, `lens`, `visualization`, `search`, `index-pattern`, `map`, `ml-module`, `security-rule`, `csp-rule-template`, `osquery-pack-asset`, `osquery-saved-query`, `tag`
    - `installed_kibana_space_id` (string)
    - `is_rollback_ttl_expired` (boolean)
    - `latest_executed_state` (object)
      - `error` (string)
      - `name` (string)
      - `started_at` (string)
    - `latest_install_failed_attempts` (object[] · max items: 10)
      - `created_at` (string)
      - `error` (object)
        - `message` (string)
        - `name` (string)
        - `stack` (string)
      - `missing_assets` (object[] · max items: 10000)
        - `id` (string)
        - `type` (string)
      - `target_version` (string)
    - `name` (string)
    - `namespaces` (string[] · max items: 100)
    - `previous_version` (string) — nullable
    - `rolled_back` (boolean)
    - `type` (string)
    - `updated_at` (string)
    - `verification_key_id` (string) — nullable
    - `verification_status` (enum)
      Values: `unverified`, `verified`, `unknown`
    - `version` (string)
  - `internal` (boolean)
  - `keepPoliciesUpToDate` (boolean)
  - `latestVersion` (string)
  - `license` (string)
  - `licensePath` (string)
  - `name` (string)
  - `notice` (string)
  - `owner` (object)
    - `github` (string)
    - `type` (enum)
      Values: `elastic`, `partner`, `community`
  - `path` (string)
  - `policy_templates` (string to object[] · max items: 1000)
  - `readme` (string)
  - `release` (enum)
    Values: `ga`, `beta`, `experimental`
  - `screenshots` (object[] · max items: 100)
    - `dark_mode` (boolean)
    - `path` (string)
    - `size` (string)
    - `src` (string)
    - `title` (string)
    - `type` (string)
  - `signature_path` (string)
  - `source` (object)
    - `license` (string)
  - `status` (string)
  - `title` (string)
  - `type` (union enum | string)
    Values: `integration`, `input`, `content`
  - `var_groups` (object[] · max items: 100)
    - `description` (string)
    - `name` (string)
    - `options` (object[] · max items: 100)
      - `description` (string)
      - `hide_in_deployment_modes` (enum[] · max items: 2)
        Values: `default`, `agentless`
      - `name` (string)
      - `title` (string)
      - `vars` (string[] · max items: 100)
    - `selector_title` (string)
    - `title` (string)
  - `vars` (string to object[] · max items: 1000)
  - `version` (string)
- `warnings` (object[] · max items: 100)
  - `baseTemplateName` (string · max length: 1000)
  - `conflictingTemplates` (object[] · max items: 100)
    - `conflictType` (enum)
      Values: `overrides_fleet`, `blocked_by_same_priority`, `overridden_by_fleet`
    - `name` (string · max length: 1000)
    - `priority` (number)
  - `dataStreamName` (string · max length: 1000)
  - `namespace` (string · max length: 255)
  - `nsTemplateName` (string · max length: 1000)
#### `400`

Bad Request

`application/json`

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

#### Console

```console
PUT kbn:/api/fleet/epm/packages/PKG_NAME/PKG_VERSION
{
  "namespace_customization_enabled_for": [
    "production",
    "staging"
  ]
}
```

#### curl

```curl
curl -X PUT "${KIBANA_URL}/api/fleet/epm/packages/${PKG_NAME}/${PKG_VERSION}" \
  -H "kbn-xsrf: true" \
  -H "Authorization: ApiKey ${API_KEY}" \
  -H "Content-Type: application/json" \
  -d '{
    "namespace_customization_enabled_for": [
      "production",
      "staging"
    ]
  }'
```

## Response examples

#### Put update package

Updated package settings

```json
{
  "item": {
    "keepPoliciesUpToDate": true,
    "name": "aws",
    "version": "2.10.0"
  }
}
```

#### Generic error response

Example of a generic error response

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

