Users

Toggle the authenticated user's login_notification preference (OTP-gated)

Two-call flow with the same payload. Empty code validates the payload and issues an OTP challenge — response has data.type = "challenge" and carries expiration_at/resend_at/factor. Populated code re-validates, verifies the OTP, applies the toggle, and returns the persisted value — response has data.type = "user". Both flows return 201 (challenge) / 200 (apply); clients discriminate on data.type.

patch/v1/users/login_notification

Request

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

Request body

Example request

{
  "data": {
    "attributes": {
      "code": "123456",
      "factor": "email",
      "login_notification": true
    }
  }
}

Response

Applied the toggle (populated code in request)

has_moreboolean

Changes

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