---
type: api
title: Update user settings for a deployment resource
description: Replaces the component-level user-defined settings for the specified resource kind in the deployment. All existing component-level user settings are overwritten with the provided values. Submitting an empty object will remove all component-level user settings for the resource. This endpoint does not support tier/topology-level user settings overrides.
url: https://www.elastic.co/elastic/docs-builder/docs/4493/api/doc/cloud-enterprise/operation/operation-update-deployment-resource-user-settings
resource: https://www.elastic.co/elastic/docs-builder/docs/4493/api/doc/cloud-enterprise/operation/operation-update-deployment-resource-user-settings
products:
  - Elastic Cloud Enterprise
---

# Update user settings for a deployment resource

## Paths

- `PUT` `/deployments/{deployment_id}/{resource_kind}/{ref_id}/user_settings`

#### Path parameters

- `deployment_id` (string) — required
  Identifier for the Deployment
- `resource_kind` (enum) — required
  The kind of resource
  Values: `elasticsearch`, `kibana`, `apm`, `appsearch`, `enterprise_search`, `integrations_server`
- `ref_id` (string) — required
  User-specified RefId for the Resource (or '_main' if there is only one)

## Description

Replaces the component-level user-defined settings for the specified resource kind in the deployment. All existing component-level user settings are overwritten with the provided values. Submitting an empty object will remove all component-level user settings for the resource. This endpoint does not support tier/topology-level user settings overrides.

## Authentication

- Basic: `Authorization: Basic <credentials>`
- Api key: `Authorization: <value>`

## Request body

The user settings to apply to the deployment resource. Replaces all existing user settings.

`application/json`

- `user_settings` (object) — required
  A JSON object containing the user settings for the resource. Replaces all existing user settings when submitted via PUT.

## Responses

#### `202`

The updated user settings for the deployment resource

`application/json`

- `user_settings` (object)
  A JSON object containing the user settings for the resource. Replaces all existing user settings when submitted via PUT.
#### `400`

* Plan or user settings validation failed. (code: `clusters.cluster_invalid_plan`)
* The deployment plan could not be applied; see the error message. (code: `user_settings.update_failed`)

`application/json`

- `errors` (object[])
  A list of errors that occurred in the failing request
  - `code` (string)
    A structured code representing the error type that occurred
  - `message` (string)
    A human readable message describing the error that occurred
  - `fields` (string[])
    If the error can be tied to a specific field or fields in the user request, this lists those fields
##### Response headers

- `x-cloud-error-codes` (enum)
  The error codes associated with the response

#### `404`

* The Deployment specified by {deployment_id} cannot be found. (code: `deployments.deployment_not_found`)
* The Resource specified by {ref_id} cannot be found. (code: `deployments.deployment_resource_not_found`)

`application/json`

- `errors` (object[])
  A list of errors that occurred in the failing request
  - `code` (string)
    A structured code representing the error type that occurred
  - `message` (string)
    A human readable message describing the error that occurred
  - `fields` (string[])
    If the error can be tied to a specific field or fields in the user request, this lists those fields
##### Response headers

- `x-cloud-error-codes` (enum)
  The error codes associated with the response

## Code examples

#### curl

```curl
curl -X PUT "${API_URL}/deployments/${DEPLOYMENT_ID}/elasticsearch/${REF_ID}/user_settings" \
  -u "${USERNAME}:${PASSWORD}" \
  -H "Content-Type: application/json" \
  -d '{
    "user_settings": {}
  }'
```

