OTP and verification code emails
One-time passcodes, sign-in links and password resets have one job: arrive in seconds, in the inbox. TrivSend is built for exactly this kind of email.
Start free · How to send OTP emails well · OTP by email vs SMS in India
Why OTP emails need care
A user is waiting on the screen. If the code takes a minute, lands in spam, or arrives twice, they give up or contact support. Three things decide it: how quickly the email leaves, whether the receiving server trusts your domain, and whether retries create duplicates.
How TrivSend handles it
- Codes that expire never arrive late. Send with
expires_at(say, five minutes from now). If the email hasn't left TrivSend by then (a long queue, a retry), it is never sent: it fails with anemail.failedwebhook markedexpired: true, and your app can send the code by SMS or WhatsApp instead (expiry). - Priority queue. Send with
priority: "high"(or the headerX-TrivSend-Priority: highover SMTP) and the email goes out before newsletters and bulk sends. Broadcasts run on their own queue and never delay codes (priority). - Your domain, authenticated. DKIM, SPF and DMARC for your own subdomain, so Gmail, Outlook and Yahoo trust the mail (domains).
- No duplicate codes. An idempotency key makes a retried request return the first email instead of sending a second (idempotency).
- Templates. Keep the OTP email as a template and send it by name with the code as a variable (templates).
- Time to send, measured. The Stats page shows how many transactional emails reached our mail server within 5 seconds, and the median and slowest times (stats).
- Bounces in plain English. When a code bounces, the email's page says why and what to do ("the address doesn't exist", "DMARC failed: check your DKIM record"), instead of a bare
550 5.7.26(why it bounced). - Proof of delivery. Each email's page shows when it was accepted and delivered, or why it bounced, which is the first thing support needs (check an email).
One request
curl -X POST https://api.trivsend.com/emails \
-H "Authorization: Bearer $TRIVSEND_API_KEY" \
-H "Content-Type: application/json" \
-H "Idempotency-Key: otp-7f3a9c" \
-d '{"from":"Acme <noreply@notify.acme.com>","to":["asha@example.com"],"subject":"Your Acme code: 482913","text":"Your code is 482913. It expires in 5 minutes.","expires_at":"2026-11-18T10:05:00+05:30"}'An email with expires_at goes out at high priority. Over SMTP, add the header X-TrivSend-Expires-At: 300 (seconds). Works the same from the Node.js SDK, Laravel, Django or any SMTP client.
Pricing
Free for 3,000 emails a month. Paid plans from ₹999 for 50,000 (pricing).