Request a change of the authenticated identity's email address
POST
/current-identity-email
Starts the email-change flow for the identity's email-password auth method. The caller must already be authenticated with a JWT — the identity to update is taken from the authenticated session (identity_id), not from the request body.The target email-password auth method for the caller is located, new_email is checked against all existing email-password auth records to ensure no other account already uses it, and a pending_auth_id of new_email is staged on the auth record. A single-use, 6-digit email-change-otp code is then generated (expiring after 5 minutes) and emailed to the new address — the change only takes effect once that code is confirmed via the email-verification flow; this endpoint does not itself flip the email over.Resending is rate-limited: only one request may be made per identity every 60 seconds (configurable via EMAIL_CHANGE_OTP_COOLDOWN_MS), based on the most recently issued email-change-otp token. The response is intentionally minimal ({ "pending": true }) and never returns the raw OTP.
Request
Authorization
JWT Bearer
Add the parameter
Authorization
to Headers
Example:
Authorization: ********************
or
Body Params application/jsonRequired
Examples
Responses
🟢200
application/json
The email-change request was accepted. A confirmation code has been generated and queued for delivery to new_email.