Email API
Send transactional email from EU infrastructure with a single API call. Official TypeScript, Python, and Go SDKs, plus REST examples for every major language.
One POST request
Send an email with a single HTTPS call. Official SDKs for TypeScript, Python, and Go, with REST examples for Ruby, PHP, Java, and curl.
EU-hosted infrastructure
Hetzner data centre in Helsinki, Finland, operated by a Danish company. GDPR compliant and not subject to the US CLOUD Act.
Real-time tracking
Opens, clicks, bounces, and complaints are recorded in real time. Every event is available in the dashboard and via signed webhooks.
Send an email
import PostStack from '@poststack/sdk';
const poststack = new PostStack('sk_live_...');
await poststack.emails.send({
from: 'hello@yourdomain.com',
to: 'user@example.com',
subject: 'Welcome aboard!',
html: '<h1>Welcome!</h1><p>Thanks for signing up.</p>',
});Use cases
Transactional sends
Welcome flows, password resets, magic links, order confirmations, receipts, invoices, and 2FA codes. Single-recipient, low-latency, high-deliverability email triggered from your application code in response to a user action.
Notifications and alerts
System alerts, weekly digests, scheduled reports, and account warnings. Compose templates once, fan them out per recipient with merge variables, and rely on automatic retries when downstream MTAs hiccup.
AI agents and MCP-driven workflows
PostStack ships a Model Context Protocol server, so Claude, Cursor, and other AI assistants can send email on a user’s behalf with proper scope controls, audit logs, and per-agent suppression handling.
Replacing Resend or SendGrid
Drop-in compatible REST shape with up to 72% lower cost, EU data residency by default, and IMAP mailboxes on the same domain. The same SDK ergonomics, without the CLOUD Act exposure.
How it works
The PostStack email API is a REST endpoint over HTTPS that accepts a JSON payload describing the message — from, to, subject, html, and optional text, cc, bcc, reply_to, headers, attachments, tags, and tracking flags. Every request authenticates with a Bearer token using your `sk_live_` API key. We sign every outbound message with DKIM keys we provision automatically when you add a domain, align SPF and DMARC, and apply rate shaping per-domain so a noisy sender cannot impact your reputation. Idempotency keys (sent via the `Idempotency-Key` header) guarantee at-most-once delivery if your application retries a request after a network error. Responses come back within 50–150 ms inside the EU; the actual SMTP delivery is queued and dispatched within a few seconds, with retries scheduled with exponential backoff for up to 24 hours on transient failures. Every send creates an event stream — `email.queued`, `email.sent`, `email.delivered`, `email.bounced`, `email.opened`, `email.clicked`, `email.complained`, `email.unsubscribed` — that you can poll via the API, subscribe to via webhook, or query historically in the dashboard. Suppressions (hard bounces and unsubscribes) are enforced automatically and exposed via the API so you can mirror them into your own systems.
Frequently asked questions
How is the PostStack email API different from Resend or SendGrid?
The wire format is similar (POST JSON, Bearer auth), but PostStack is operated by a Danish company, hosted in a Hetzner data centre in Finland, and not subject to the US CLOUD Act. Pricing is up to 72% lower at common volumes, and the same domain can host IMAP mailboxes alongside the API without a second provider.
Where does my email data live?
All processing, queuing, sending, and event storage runs inside the European Union (Finland). PostStack does not replicate, mirror, or copy email content outside the EU. Backups, logs, and metrics are EU-only.
Do you have SDKs?
Yes — official SDKs for TypeScript/JavaScript, Python (sync and async), and Go. Every SDK is MIT-licensed, open-source on GitHub, and matches the REST API one-to-one. We publish typed clients with auto-completion, retries, and structured error handling.
What about rate limits?
Default rate limits are generous: 100 requests/second per API key, 1,000 burst. Limits scale with your plan and can be raised on request. Limits are returned in `X-RateLimit-*` headers on every response.
How do I migrate from another provider?
Most teams switch in under an hour. Point your DNS to PostStack DKIM/SPF records, swap the SDK or HTTP client, and (optionally) import your suppression list via the API. We have dedicated migration guides for Resend, SendGrid, and Postmark.
What is the free tier?
3,000 emails per month, free forever, no credit card. The free tier includes full API access, the dashboard, open and click tracking, webhooks, and one verified domain. Paid plans start at €5/month for 10,000 emails.