---
title: "Rotate the expired password (OTP-gated)"
method: POST
path: "/v1/password_reminder/update_password"
tags: ["Password Reminder"]
---

# Rotate the expired password (OTP-gated)

`POST /v1/password_reminder/update_password`

## Request

- Base URL: `https://identity-api.paymongo.com`
- URL: `https://identity-api.paymongo.com/v1/password_reminder/update_password`
- Auth: none required

Unauthenticated. Verifies email + current password + OTP + new-password policy, archives the old digest, writes the new digest, and refreshes password_expires_at. Returns 201 with `data.type = "jwt"` and sets the refresh-token cookie.

## Request body

- UserPasswordReminderUpdateRequestEnvelopeDTO
  - `data` object
    - `attributes` UserPasswordReminderUpdateRequestDTO
      - `code` string, required
      - `email` string, required
      - `factor` 'email' | 'sms' | 'totp'
      - `new_password` string, required
      - `new_password_confirmation` string, required
      - `password` string, required

## Response `201`

Created

- object: Standard response containing data and its metadata if any
  - `data` object
    - `attributes` UserPasswordReminderSuccessAttributesDTO
      - `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
- `401`: Unauthorized
- `410`: Gone
- `422`: Unprocessable Entity
- `429`: Too Many Requests
- `500`: Internal Server Error
- `502`: Bad Gateway

---

[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)
