Email verification is usually described as a token problem: create a token, send a message, and accept the link. In a production REST API, the harder problem is deciding who is allowed to send the message when a worker crashes, a request is retried, or two workers see the same pending row.
A useful pattern is to give every email job a short database lease. The lease turns an ambiguous background task into a small, observable contract. One worker owns the job for a limited time, another worker can recover it after the lease expires, and the verification endpoint remains idempotent.
This matters whether a team tests with a disposable email address or uses a real mailbox in staging. The inbox is not the reliability boundary.…