apis

How to Send Password Reset Emails from a Backend API

A production-ready guide to password reset email: secure tokens, generic responses, rate limits, HTML you control, Notify send + webhooks, and a full FAQ.

ByJordan Hale
•Published on

Frequently Asked Questions

Common questions about this topic

How do I send a password reset email from a backend API?
Generate a secure short-lived token, store only its hash, build a reset URL containing the raw token, then call a transactional email API from your server. With Notify, that is one POST to /api/email/send with to, from, subject, and message.
Should the reset token live in the email or only in the database?
Email the raw token inside the link. Store a hash in the database. Never store the raw token in plaintext if you can avoid it.
How long should a password reset link last?
Thirty minutes is a solid default for most apps. Shorter (15 minutes) is fine for high-security products; longer than a few hours increases replay risk if a mailbox is compromised.
Do I need to verify a domain with Notify before testing?
You can rehearse with Notify’s test/sandbox flows and dashboard guided send. Production sends from your own from address require a verified domain with SPF, DKIM, and DMARC.
What should I log when a reset email is sent?
Log user id (not the raw token), timestamp, request IP, and the provider messageId. That is enough to debug delivery without turning your logs into a second credential store.
How do I handle bounce events on reset emails?
Subscribe to Notify webhooks for Bounce and Complaint on Pro/Scale. When those fire, suppress the address and avoid repeated sends that damage domain reputation.
Is Notify only for password resets?
No. The same send path works for magic links, email verification, receipts, and product alerts. Password reset is simply the highest-stakes transactional template most apps ship first.

Enjoyed this article?

Share it with your network to help others discover it

Comments

Loading comments…

Promote your content

Reach over 400,000 developers and grow your brand.

Join our developer community

Hang out with over 4,500 developers and share your knowledge.