Use case

OTP email

When you need a short numeric or alphanumeric code for login or step-up auth. Copy the HTML into your app and send with one API call.

Subject line ideas

  • Your verification code
  • Login code
  • {{CODE}} is your code

HTML example

Replace placeholders in your app before send. This is not a Notify template product — it is a starting snippet.

<p>Your code is:</p>
<p style="font-size:24px;font-weight:bold;letter-spacing:4px;">{{CODE}}</p>
<p>It expires in 10 minutes.</p>

Send with Notify

const res = await fetch('https://notify.cx/api/email/send', {
  method: 'POST',
  headers: {
    'Content-Type': 'application/json',
    'x-api-key': process.env.NOTIFY_API_KEY
  },
  body: JSON.stringify({
    to: 'user@example.com',
    from: 'noreply@yourdomain.com',
    subject: "Your verification code",
    message: `${html}`
  })
});

Security notes

  • Short codes with short TTL
  • Limit attempts
  • Never log codes in plain text client-side

Related

Frequently asked questions

When should I send a otp email?

When you need a short numeric or alphanumeric code for login or step-up auth.

Do I need Notify templates?

No. Paste HTML (or plain text) into the message field. Notify delivers — your app owns the content.

How do I send this with Notify?

POST https://notify.cx/api/email/send with x-api-key and fields to, from, subject, message. Free 1,000/mo; Pro $10 for 10,000.