ZapSMTP / Developers

Build email into your stack.

Official SDKs, framework packages, a CLI, and an OpenAPI 3.1 specification. Choose the integration that fits your application.

The packages are being published to their registries. Until they are, the API reference shows every call over HTTP and the OpenAPI description is available now.

Official SDKs and framework packages

Every SDK covers the whole API, retries safely with an idempotency key, walks every page of a list, raises typed errors and verifies webhook signatures.

  • Node.js

    Node.js 18+, Bun, Deno

    TypeScript types for every request and response; ESM and CommonJS; no dependencies.

    Publishing soon
    npm install zapsmtp
    Quickstart
  • Python

    Python 3.9+

    Sync and async clients, typed models, httpx underneath.

    Publishing soon
    pip install zapsmtp
    Quickstart
  • PHP

    PHP 8.1+

    PSR-18 HTTP client, Guzzle by default; typed models with array access.

    Publishing soon
    composer require zapsmtp/zapsmtp-php
    Quickstart
  • Laravel

    Laravel 10, 11, 12

    A mail transport for your Mailables, a facade for the API and verified webhook events.

    Publishing soon
    composer require zapsmtp/zapsmtp-laravel
    Framework guide
  • Go

    Go 1.23+

    Standard library only; context on every call; range over every page.

    Publishing soon
    go get github.com/zapsmtp/zapsmtp-go
    Quickstart
  • Ruby

    Ruby 3.0+

    Standard library only; an ActionMailer delivery method for Rails.

    Publishing soon
    gem install zapsmtp
    Quickstart
  • Rails

    Action Mailer delivery method

    Set the delivery method and Action Mailer sends through the API; a Rack middleware verifies webhooks.

    Publishing soon
    gem "zapsmtp" # Gemfile
    Framework guide
  • Java

    Java 11+

    Builders for every request, immutable models, java.net.http underneath.

    Publishing soon
    implementation("com.zapsmtp:zapsmtp-java:1.0.0")
    Quickstart
  • .NET

    .NET 8, .NET Standard 2.0

    Async API with cancellation, dependency injection, IAsyncEnumerable paging.

    Publishing soon
    dotnet add package ZapSMTP
    Quickstart

Your first template send and webhook check

Send the sign-in code template with its variables, then verify the signature of the webhook that follows: with a test key and a simulator address, an email.delivered event arrives, and the verification returns it as an event object or throws. Same language, both steps.

1. Send a template
import { ZapSMTP } from 'zapsmtp';

const zap = new ZapSMTP(); // reads ZAP_API_KEY, on your server

await zap.emails.send({
  from: 'Halden <security@haldenoutfitters.com>',
  to: 'sofia.marin@example.com',
  template: {
    id: 'sign-in-code',
    variables: {
      name: 'Sofia',
      code: '482 913',
      expires_in: '10 minutes',
      device: 'Safari on iPhone',
      location: 'Portland, US',
      time: '9:41 AM',
    },
  },
});
2. Verify the webhook
import { verifyWebhook } from 'zapsmtp';

// the raw body, before any JSON parsing
const event = verifyWebhook(rawBody, req.headers, process.env.ZAP_WEBHOOK_SECRET);

A zap_test_… key runs the whole pipeline and delivers nothing; the simulator address acts out a delivery. Pass the raw body to the verification, before any JSON parsing. Webhook events

The CLI and the OpenAPI description

The zapsmtp command has a command for every API operation, prints tables in a terminal and JSON when piped, and exits non-zero with the error code and request id.

The whole API is in an OpenAPI 3.1 description: import it into Postman or Insomnia, or generate a client for a language without an SDK. Each operation’s x-sdk-method names the SDK method that calls it.

Shell · the CLI is publishing soon
npm install -g zapsmtp-cli
zapsmtp login                       # checks the key, keeps it readable by you only
zapsmtp test                        # an email to the simulator, then its events
zapsmtp send --from "Acme <hello@acme.com>" --to jane@example.org \
  --subject "Your receipt" --html-file receipt.html --attach ./invoice.pdf
zapsmtp emails list --status bounced --all --json | jq '.[].to'
zapsmtp domains verify <domain-id>

Coming from another provider

Field and event maps, template conversion, suppression import and a gradual rollout plan, provider by provider. Applications that send over SMTP only change the host and credentials.

Everything else you need

  • AI tools

    The MCP server, Agent Skills, llms.txt and Markdown docs for coding assistants.

    AI tools
  • API reference

    Every endpoint with parameters, responses, errors and examples in nine languages.

    API reference
  • Changelog

    What changed in the API, the dashboard and the SDKs.

    Changelog
  • Security

    Scoped and expiring API keys, signed webhooks and how we handle your data.

    Security
  • Support

    Questions about an integration or a migration.

    Contact us

Send your first email today.

Create a test key and send to the simulator, over HTTP today or with your SDK once it is published.

Start for free Read the docs 3,000 emails/month · 100/day · No credit card required