---
title: "Apply a new password and auto-login"
method: PATCH
path: "/v1/reset_password/{token}"
tags: ["Reset Password"]
---

# Apply a new password and auto-login

`PATCH /v1/reset_password/{token}`

## Request

- Base URL: `https://identity-api.paymongo.com`
- URL: `https://identity-api.paymongo.com/v1/reset_password/{token}`
- Auth: none required

Validates the token + new password, archives the old digest, updates the user, invalidates existing sessions, and issues fresh auth tokens (refresh token in HttpOnly cookie).

## Path parameters

- `token` string, required

## Request body

- UserApplyResetPasswordRequestEnvelopeDTO
  - `data` object
    - `attributes` UserApplyResetPasswordRequestDTO
      - `password` string, required
      - `password_confirmation` string, required

## Response `201`

Created

- object: Standard response containing data and its metadata if any
  - `data` object
    - `attributes` UserResetPasswordSuccessAttributesDTO
      - `expiry_timer` integer
      - `organization_id` string
      - `user_contact_number` string
      - `user_first_name` string
      - `user_last_name` string
    - `id` string
    - `type` string
  - `has_more` boolean

## Other responses

- `400`: Bad Request
- `404`: Not Found
- `410`: Gone
- `422`: Unprocessable Entity
- `500`: Internal Server Error

---

[API](https://skmtc.dev/paymongo/apis/identity.md) - [All operations](https://skmtc.dev/paymongo/apis/identity/llms.txt) - [OpenAPI document](https://skmtc.dev/paymongo/apis/identity/revisions/cc3056164874?raw)
