---
type: api
title: Reset the project credentials
description: Retrieve new project credentials, invalidating the previous ones.
url: https://www.elastic.co/elastic/docs-builder/docs/4371/api/doc/cloud-serverless/operation/operation-resetelasticsearchprojectcredentials
resource: https://www.elastic.co/elastic/docs-builder/docs/4371/api/doc/cloud-serverless/operation/operation-resetelasticsearchprojectcredentials
products:
  - Elastic Cloud Serverless
---

# Reset the project credentials

- Server: `https://api.elastic-cloud.com`

## Paths

- `POST` `/api/v1/serverless/projects/elasticsearch/{id}/_reset-credentials`

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

## Description

Retrieve new project credentials, invalidating the previous ones.

## Responses

#### `200`

The new project credentials.

`application/json`

- `username` (string)
  Basic auth username that can be used to access the Elasticsearch API.
- `password` (string)
  Basic auth password that can be used to access the Elasticsearch API.
##### Response Headers

- `ETag` (string)

#### `404`

Not Found

`application/json`

- `errors` ([] ErrorResponse)
  - `message` (string)
    A human-readable message of the error.
  - `code` (string)
    An identifier for this type of error.
#### `409`

Conflict

`application/json`

- `errors` ([] ErrorResponse)
  - `message` (string)
    A human-readable message of the error.
  - `code` (string)
    An identifier for this type of error.
## Code Examples

#### Console

```console
POST /api/v1/serverless/projects/elasticsearch/{id}/_reset-credentials
```

#### curl

```curl
curl -X POST "https://api.elastic-cloud.com/api/v1/serverless/projects/elasticsearch/{id}/_reset-credentials"
```

