Users

Update the authenticated user's email (OTP-gated, requires confirmation link click)

Two-call flow with the same payload (only code differs). Empty code issues the OTP challenge to the current email. Populated code verifies the OTP and stages the email change — the new address is stored in email_confirmations with a 1-day expiry and a confirmation link is sent to it. The user's email is only swapped when the link is clicked.

patch/v1/users/email

Request

  • Base URL
    https://identity-api.paymongo.com
  • URL
    https://identity-api.paymongo.com/v1/users/email
  • Auth
    HTTP bearer

Request body

Example request

{
  "data": {
    "attributes": {
      "code": "123456",
      "current_password": "Str0ng!Password",
      "email": "new-email@example.com",
      "factor": "email"
    }
  }
}

Response

Staged the email change (populated code in request)

has_moreboolean

Example response

{
  "data": {
    "attributes": {
      "expires_at": 1735776000,
      "pending_email": "new-email@example.com"
    }
  }
}

Changes

No recorded changes to this operation across all 1 revision of this API.