Short answer: treat an email change as a fresh, high-risk authentication ceremony. In a property-management system, require the signed-in user to confirm the new address and re-authenticate with the current credential, bind both steps to one short-lived transaction, revoke old recovery paths, and emit an audit event for every decision. A single PATCH /user call cannot provide those guarantees.

Start with the 15-minute transaction lifetime, then tune it from observed completion and abuse data.

The useful mental picture is a narrow hallway with two doors. The first door proves intent from the active session. The second proves control of the destination mailbox. Logs should show which door opened, when, and why a request stopped.

Situation Pick this control Why it fits a rental platform
Routine change from a trusted session Re-authentication plus a new-address link A leasing coordinator can finish without support intervention.
Suspicious device, burst of requests, or recovery context Delay, step-up authentication, and manual review signal A stolen session should not turn into a new recovery channel.
Current mailbox unavailable Keep the old address active and use an audited support process A forced overwrite can strand a landlord or tenant.

How can a property manager safely change a user email address through an API?

The first step proves that the requester controls the account session now. Ask for the current password or another already enrolled factor, and check the session age. OWASP recommends reauthentication for sensitive account changes and warns against relying on a user ID alone. The second step proves control of the proposed address: send a single-use, time-limited token to that mailbox and make the user complete it in the same transaction.

Do not let a browser-supplied userId choose the record. Resolve the account from the authenticated session, then create a server-side transaction containing a hash of the proposed address, the account identifier, an expiry, and a used flag. Store the token digest, never the token itself. A transaction state machine makes retries boring: pending, confirmed, expired, or cancelled.

Here is the boundary I use in Node.js services. It is deliberately a generic interface; the policy belongs in the service layer, while the mail provider remains replaceable.

type EmailChange = { id: string; accountId: string; newAddressHash: string; tokenDigest: string; expiresAt: Date; state: "pending" | "confirmed" | "expired" | "cancelled"; }; async function requestEmailChange(input: { sessionAccountId: string; currentPassword: string; newAddress: string; }): Promise<{ transactionId: string }> { await requireRecentReauthentication(input.sessionAccountId, input.currentPassword); const normalized = normalizeAddress(input.newAddress); await applyAbusePolicy(input.sessionAccountId, normalized); const token = randomToken(); const transaction = await emailChanges.insert({ accountId: input.sessionAccountId, newAddressHash: hash(normalized), tokenDigest: hash(token), expiresAt: addMinutes(new Date(), 15), state: "pending" }); await mail.sendConfirmation(normalized, token); audit.info("email_change_requested", { transactionId: transaction.id }); return { transactionId: transaction.id }; } 

The mail send is not the commit. On confirmation, load the transaction with a lock or an equivalent compare-and-swap, verify its state and expiry, compare the token digest, update the account, invalidate outstanding recovery tokens, and then write one audit record. If the confirmation is replayed, return a neutral response and record the replay attempt. That ordering prevents a second click from changing a different address. In 2026, that boring ordering still beats a clever queue because the account update and audit record must agree after a retry, a crash, or a worker handoff.

Keep this path small.

How do you make abuse visible without leaking the account?

Rate limits should be keyed across several dimensions: account, source network, destination domain, and transaction identifier. A property manager may legitimately update many units, so a single IP threshold is a poor detector. Keep responses intentionally similar for unknown accounts and existing accounts; OWASP calls out consistent responses as a defense against account enumeration.

Metrics answer “how often?” Logs answer “which decision?” Track request, confirmation, expiry, replay, throttle, and support-review events separately. Include a correlation ID, actor account ID, transaction ID, reason code, and policy version. Do not log the address, password, raw token, or full user-agent string. Alert on a rise in replayed tokens, many accounts targeted from one network, and changes followed quickly by password resets. Those signals are more actionable than a dashboard showing only successful updates.

I started by treating a successful mail send as a success metric. It was the wrong boundary. A mailbox can accept a message while the user never controls it, and a worker retry can send the same token twice. The durable metric is a confirmed transaction whose state transition and audit event were committed exactly once.

A deployable decision rule

Use the routine path only when the session is recent, the account has no active recovery lock, and the abuse score is ordinary. Otherwise require an enrolled second factor or route the case to review while retaining the old address. That choice protects recovery: changing the address must never be the easiest way to erase the evidence needed to recover the account. The trade-off is friction: a legitimate manager on a new laptop may wait for review, but that delay is preferable to silently moving a tenant's recovery channel.

Test the unhappy paths before rollout. Two confirmation requests should leave one usable transaction. An expired token should not reveal whether an address exists. A database retry after the account update should not produce a second audit event. A worker outage after transaction creation should leave a visible pending state that can expire safely.

Limits to keep explicit

Email is a possession signal, not a strong identity proof. Shared leasing-office inboxes, forwarding rules, and compromised mail accounts remain outside this flow. This design is a poor fit when an organization cannot retain the old address during review; in that case, use a separate, logged identity-verification process. Document the limitation in the threat model and give support staff a recovery procedure. Revisit the policy when regulations, tenancy roles, or your factor enrollment model changes.

References