Use Case

Send verification emails with Postkit

Verify user email addresses at signup with a confirmation link or code. Postkit makes it a single API call with built-in retry safety.

Get Started Free

The problem

Unverified emails mean bots, typos, and dead accounts. Your verification email needs to be reliable, fast, and resilient to double-submits on the signup form.

The Postkit solution

Send a verification email with Postkit's REST API. Use an idempotency key tied to the user ID so form double-submits never send two emails. Track delivery via webhooks.

verify-email.ts
await fetch("https://api.postkit.eu/v1/emails", {
  method: "POST",
  headers: {
    Authorization: "Bearer pk_live_...",
    "Content-Type": "application/json",
    "Idempotency-Key": `verify-${userId}`,
  },
  body: JSON.stringify({
    from: "noreply@yourapp.eu",
    to: user.email,
    subject: "Verify your email",
    template_id: "tmpl_verify",
    data: { name: user.name, verifyUrl },
  }),
});

Template example

Use a Handlebars template to keep your email content separate from your application code.

template.hbs
<h1>Verify your email, {{name}}</h1>
<p>Click below to confirm your address:</p>
<a href="{{verifyUrl}}">Verify email</a>

Start sending in under 5 minutes

Free plan. No credit card required.

Get Started Free