# Start a password reset

Operation ID: `provider.resetPassword`

Generate a password reset code and email it to the account via SendGrid; the client submits that code plus the new password to provider.confirmResetPassword — no other server round-trip is needed in between.

## Public method

`resetPassword`

Signature: `provider.resetPassword(request)`

Return type: `Promise<ResetPractitionerPasswordResponse>`

## Authentication

Classification: **PUBLIC**

## Prerequisites

None documented.

## HTTP

`POST /auth/reset-password`

## Path parameters

None.

## Query parameters

None.

## Body parameters

| Name | Type | Required | Format | Allowed values | Default | Nullable | Description |
|---|---|---:|---|---|---|---:|---|
| `body` | [`provider.ResetPasswordRequest`](../models/provider.ResetPasswordRequest.md) | No |  |  |  | Yes |  |

Request model: [`provider.ResetPasswordRequest`](../models/provider.ResetPasswordRequest.md)

## Request example

```json
{
  "email": "provider.user@example.com",
  "tenant_id": "tenant-example-001"
}
```

## Success responses

| Status | Shape | Content type | Description |
|---|---|---|---|
| `200` | [`provider.ResetPasswordResponse`](../models/provider.ResetPasswordResponse.md) | application/json | Reset code sent |

## Success response examples

### 200

```json
{
  "message": "Password reset code sent to email"
}
```

## Common errors

| Status | Shape | Content type | Description |
|---|---|---|---|
| `400` | [`provider.ErrorResponse`](../models/provider.ErrorResponse.md) | application/json | Required fields are missing, or Cognito rejected the request |

## Error examples

### 400 — Required fields are missing

```json
{
  "error": "email and tenant_id are required"
}
```

## NodeJS / TypeScript implementation

```ts
import { HCSDK } from "@healthcloudai/hc-sdk";
import type { ResetPractitionerPasswordRequest } from "@healthcloudai/hc-sdk";
```

```ts
const request = {
  "email": "provider.user@example.com",
  "tenant_id": "tenant-example-001"
};

const result = await provider.resetPassword(request);
```

## cURL

```bash
curl -X POST \
  -H 'Content-Type: application/json' \
  -d '{"email":"provider.user@example.com","tenant_id":"tenant-example-001"}' \
  'https://dev-api-provider.health.cloud/auth/reset-password'
```

## Notes

None.

## Prepared Test Console scenario

No canonical scenario is currently associated.

## Real response

No approved real integration response is currently published. Unapproved candidates are never rendered as examples.
