---
type: api
title: Reset 'elastic' user password
description: Resets the password of the 'elastic' user.
url: https://www.elastic.co/elastic/docs-builder/docs/4371/api/doc/cloud-enterprise/operation/operation-reset-elasticsearch-user-password
resource: https://www.elastic.co/elastic/docs-builder/docs/4371/api/doc/cloud-enterprise/operation/operation-reset-elasticsearch-user-password
products:
  - Elastic Cloud Enterprise
---

# Reset 'elastic' user password

## Paths

- `POST` `/deployments/{deployment_id}/elasticsearch/{ref_id}/_reset-password`

- [Basic auth](/elastic/docs-builder/docs/4371/api/doc/cloud-enterprise/authentication#basicauth)
- [Api key auth](/elastic/docs-builder/docs/4371/api/doc/cloud-enterprise/authentication#apikey)

#### Path Parameters

- `deployment_id` (string)
  Identifier for the Deployment.
- `ref_id` (string)
  User-specified RefId for the Resource (or '_main' if there is only one).

## Description

Resets the password of the 'elastic' user.

## Query String Parameters

- `check_completion` (boolean · default: false)
  If true, will not reset elastic user password and instead will return a status code signaling whether or not the current credentials are ready to use (eg from creation or the last call to _reset_password)

## Responses

#### `200`

The password reset was out carried successfully

`application/json`

- `username` (string)
  The username for the newly-reset password for the given Elasticsearch cluster
- `password` (string)
  The newly-reset password for the given Elasticsearch cluster
#### `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` ([] BasicFailedReplyElement)
  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

#### `500`

Failed to reset the 'elastic' user's password. (code: `deployments.elasticsearch.password_reset_error`)

`application/json`

- `errors` ([] BasicFailedReplyElement)
  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

#### Console

```console
POST /deployments/{deployment_id}/elasticsearch/{ref_id}/_reset-password
```

#### curl

```curl
curl -X POST "/deployments/{deployment_id}/elasticsearch/{ref_id}/_reset-password"
```

