Set a new password from a reset email
Set a new password with the id and secret from a reset or invitation email using POST /v2/auth/reset-password/process.
| Method | Path |
|---|---|
POST | /v2/auth/reset-password/process |
Authentication · Account routes · Email templates
Sets a new password using the id and secret from a reset or invitation email. Use it when your app handles the password form itself, on the page that the emailed link opens. The first step for a reset is Send a password reset email.
This is an account-level route. It has no /v1/auth/tenant/ variant and needs no token.
Auth: None. The id and secret from the reset or invitation email are the credential.
Scope: The user the request was created for.
Request
Body
| Name | Type | Required | Description |
|---|---|---|---|
id | string | Yes | The request id from the reset or invitation email's <app URL>/setpassword/<id>/<secret> link. |
secret | string | Yes | The secret from the same link. |
password | string | Yes | The new password. It must meet the password policy. |
Behaviour
- A request can be used once. Ovok marks it used before it changes the password. If the password change then fails, the request cannot be retried and the user must ask for a new email.
- A newer reset email replaces the older one: after a second reset request, only the newest
idandsecretwork. - Reset links have no lifetime limit. A set-password link from an invitation works for 7 days after it was sent; see Invitations.
- Setting the password also marks the user's email address as verified, because the secret came by email.
- The route does not end existing sessions.
- The response is a minimal User with
resourceType,idandemail. - The route is rate limited to 5 requests per minute for each caller.
Example
curl -X POST 'https://api.sandbox.ovok.com/v2/auth/reset-password/process' \
-H 'Content-Type: application/json' \
-d '{
"id": "4d8f1a63-9b2e-4c70-8e15-a3b6d9c2f047",
"secret": "<secret from the email>",
"password": "<new password>"
}'Successful response
201 — The password is changed.
{
"resourceType": "User",
"id": "9a4e6c10-3b7d-4f28-8c15-2d0e7b9a6f43",
"email": "alex@example.com"
}| Field | Type | Description |
|---|---|---|
resourceType | "User" | Always User. |
id | string (uuid) | User id. |
email | string | Sign-in email address. |
Errors
| Status | Meaning |
|---|---|
404 | No reset request has this id. |
409 | The reset request was already used, or a newer reset email replaced it. |
422 | id, secret or password is missing or not a string, password breaks the password policy, or secret does not match the request. |
429 | More than 5 requests in a minute from the same caller. |
410 | The invitation's set-password link expired. Ask for a new invite. |
Last updated on
Send a password reset email
Email a patient, carer or practitioner a password reset link with POST /v2/auth/reset-password, without revealing whether the account exists.
Schedule account deletion
Schedule the deletion of the signed-in user's own account with DELETE /v1/auth/delete, and how signing in again cancels it.