# PostStack > European email API platform for developers and AI agents. Send transactional and marketing emails via REST API, SMTP, or MCP server. EU-hosted infrastructure in Finland. 3,000 emails free every month, paid plans from €5. PostStack is a Danish company. All data is processed and stored in the EU. GDPR compliant by design. ## Docs - [Full API Reference](https://poststack.dev/llms-full.txt): Complete API documentation with all endpoints, schemas, and examples - [OpenAPI 3.1 Spec](https://poststack.dev/openapi.json): Machine-readable API schema - [Web Docs](https://poststack.dev/docs): Interactive documentation - [MCP Server](https://poststack.dev/docs/mcp): Model Context Protocol server for AI assistants - [MCP Discovery](https://poststack.dev/.well-known/mcp.json): Hosted MCP manifest (transport URL, auth methods, scopes) ## Quick Start Install the SDK: ```bash npm install @poststack.dev/sdk ``` Send your first email: ```typescript import { PostStack } from '@poststack.dev/sdk'; const poststack = new PostStack('sk_live_...'); await poststack.emails.send({ from: 'you@yourdomain.com', to: ['user@example.com'], subject: 'Hello', html: '
Welcome!
', }); ``` ## MCP Server (AI Agents) Connect PostStack to Claude, Cursor, Windsurf, and other AI assistants: ```bash claude mcp add poststack -e POSTSTACK_API_KEY=sk_live_... -- npx -y @poststack.dev/mcp ``` 72 tools covering the full API surface — send emails, manage contacts, domains, templates, broadcasts, and more via natural language. ## API Sections - **Authentication**: Bearer token auth with API keys (`sk_live_...` or `sk_test_...`) - **Emails**: Send single/batch emails, schedule, cancel, list with filtering - **Domains**: Add and verify sending domains (SPF, DKIM, DMARC), configure tracking - **Contacts**: Create, import (CSV), export, manage subscribers with custom properties - **Templates**: Reusable email templates with `{{variable}}` placeholders and versioning - **Broadcasts**: Bulk email campaigns to segments/topics with scheduling and analytics - **Segments**: Dynamic (rule-based) and manual audience segmentation - **Subscription Topics**: Fine-grained email preference management per contact - **Workflows**: Automated email sequences triggered by contact events - **Tracking**: Open and click tracking with custom domains, client/location detection - **Inbound Email**: Receive emails via MX records and webhook notifications - **Webhooks**: Real-time event notifications with signature verification - **SMTP Relay**: Send via standard SMTP (port 587/465) using API key as password - **Mailboxes**: Full email hosting with IMAP, POP3, and webmail at https://mail.poststack.dev (mailbox users sign in with their own address and password; they can also connect t-online, GMX, WEB.DE and other IMAP accounts) - **Test Mode**: Use `sk_test_` keys for development — full validation, no delivery - **SDK Reference**: TypeScript SDK with typed methods for all resources - **Errors**: HTTP status codes, common error messages, and rate limiting ## Base URL ``` https://api.poststack.dev ``` ## Authentication All API requests require a Bearer token: ``` Authorization: Bearer sk_live_... ``` Two permission levels: `full_access` (all operations) and `sending_access` (send only). ## SDK Resources ``` poststack.emails — send, list, get, cancel poststack.domains — create, list, get, verify, update, delete poststack.contacts — create, list, get, update, delete, import, export poststack.templates — create, list, get, update, delete, publish, duplicate poststack.webhooks — create, list, update, delete, test poststack.broadcasts — create, list, get, send, test, cancel poststack.segments — create, list, get, preview, addContacts, removeContacts, delete poststack.subscriptionTopics — create, list, update, delete, subscribe, unsubscribe poststack.inboundEmails — list, get poststack.workflows — create, list, get, activate, pause, delete ``` ## Pricing - **Free**: €0/mo — 3,000 emails, 1 domain - **Starter**: €5/mo — 10,000 emails, 3 domains - **Pro**: €15/mo — 50,000 emails, 10 domains, 30-day log retention - **Scale**: €30/mo — 100,000 emails, 1,000 domains, 90-day log retention - **Enterprise**: Custom pricing Add-ons (any paid plan): hosted mailboxes €1/mo each (no count limit; each includes 1 GB, extra storage €1/GB/mo up to 50 GB), dedicated IP €25/mo (up to 1). Overage: €0.25 per 1,000 emails on paid plans. ## Framework Guides Copy-paste guides for sending transactional email with the PostStack SDK or SMTP from each stack. - [Send email with Next.js](https://poststack.dev/docs/send-with-nextjs): Server actions and route handlers with the PostStack SDK. - [Send email with Bun](https://poststack.dev/docs/send-with-bun): Native fetch and the SDK from a Bun server. - [Send email with Express](https://poststack.dev/docs/send-with-express): Node.js route handlers, background jobs, and webhook verification. - [Send email with Hono](https://poststack.dev/docs/send-with-hono): Edge and Node runtimes. - [Send email with NestJS](https://poststack.dev/docs/send-with-nestjs): The SDK as an injectable provider, a MailService, and queued sends. - [Send email with Nuxt](https://poststack.dev/docs/send-with-nuxt): Nitro server routes with runtimeConfig secrets. - [Send email with SvelteKit](https://poststack.dev/docs/send-with-sveltekit): Form actions and +server.ts endpoints with a server-only client. - [Send email with Python](https://poststack.dev/docs/send-with-python): Sync and async sends with the Python SDK. - [Send email with Django](https://poststack.dev/docs/send-with-django): The SDK, or a drop-in EMAIL_BACKEND for send_mail, EmailMessage, EmailMultiAlternatives, and attachments. - [Send email with Flask](https://poststack.dev/docs/send-with-flask): App-factory setup, background jobs, or Flask-Mail over SMTP. - [Send email with FastAPI](https://poststack.dev/docs/send-with-fastapi): Async sends with BackgroundTasks. - [Send email with Go](https://poststack.dev/docs/send-with-go): net/http client and the Go SDK. - [Send email with Ruby on Rails](https://poststack.dev/docs/send-with-ruby): Net::HTTP or ActionMailer SMTP delivery. - [Send email with PHP](https://poststack.dev/docs/send-with-php): cURL against the REST API, Symfony Mailer over SMTP, and WordPress. - [Send email with Laravel](https://poststack.dev/docs/send-with-laravel): SMTP mailer in .env, Mailables, queued mail, notifications, and the Http client. - [Send email with Java](https://poststack.dev/docs/send-with-java): JavaMail/SMTP and the REST API. - [Send email with Spring Boot](https://poststack.dev/docs/send-with-spring): spring-boot-starter-mail with JavaMailSender over SMTP, or RestClient against the REST API. - [Send email with Elixir](https://poststack.dev/docs/send-with-elixir): Swoosh and Bamboo SMTP adapters. - [Send HTML email with Rust](https://poststack.dev/docs/send-with-rust): reqwest client and the REST API. ## Articles Long-form guides written by the PostStack founder. - [How to Set Up SPF, DKIM and DMARC for Your Sending Domain](https://poststack.dev/blog/spf-dkim-dmarc-setup-guide): Exact record examples, alignment, the 10-lookup limit, and how to verify with dig. - [Why Are My Emails Going to Spam? A Developer's Checklist](https://poststack.dev/blog/why-emails-go-to-spam): Authentication, reputation, list hygiene, one-click unsubscribe, and reading Authentication-Results headers. - [How to Choose a Transactional Email API: A Checklist](https://poststack.dev/blog/choose-transactional-email-api-checklist): Vendor-neutral criteria: data residency, deliverability tooling, webhooks, idempotency, pricing model, inbound, and SDKs. - [Email Bounce Handling with Webhooks](https://poststack.dev/blog/email-bounce-handling-webhooks): Processing bounce and complaint events and keeping a suppression list in sync. - [Automate SPF, DKIM, and DMARC with HostStack DNS](https://poststack.dev/blog/automate-spf-dkim-dmarc-with-hoststack-dns): Skip the copy-paste loop on every new sending domain. The integration publishes SPF, DKIM, DMARC, and return-path records into your HostStack zone and verifies via authoritative-server polling in 8-30 seconds. - [Running an Email API on Managed Postgres: How PostStack Uses HostStack](https://poststack.dev/blog/email-api-on-managed-postgres-hoststack): Engineering story of moving PostStack's OLTP layer from bare-metal Postgres to HostStack-managed Postgres 18. What stayed self-managed (Postfix, Dovecot, Rspamd, workers), what the bill works out to, what the migration actually looked like. - [The EU Email Stack: Why Your DNS and Database Provider Matter Too](https://poststack.dev/blog/eu-email-stack-dns-database-residency): GDPR doesn't stop at the email row. Four places EU residency typically leaks (DNS, backups, object storage, ops tooling) and how an end-to-end EU stack closes them. - [Self-Host Email vs Use an API: A Decision Framework](https://poststack.dev/blog/self-host-email-vs-api-2026): When self-hosting Postfix makes sense vs paying for an API. Five variables, two clear-win scenarios, and the hybrid pattern most teams converge on. - [GDPR-Compliant Email API in 2026: A Buyer's Guide](https://poststack.dev/blog/gdpr-compliant-email-api-2026): What "GDPR-compliant" actually means in practice, the four traps US-hosted providers fall into (CLOUD Act, "GDPR-ready" defaults, tracking pixels, log retention), and a 9-question checklist. ## Use Cases - [All use cases](https://poststack.dev/use-cases) - [Transactional email](https://poststack.dev/use-cases/transactional-email): password resets, magic links, receipts - [Newsletters](https://poststack.dev/use-cases/newsletters): broadcasts to segments, A/B tests, one-click unsubscribe - [AI agents](https://poststack.dev/use-cases/ai-agents): send email from Claude, Cursor and other MCP clients - [SaaS products](https://poststack.dev/use-cases/saas): onboarding workflows and per-customer sending domains - [E-commerce](https://poststack.dev/use-cases/ecommerce): order confirmations, shipping and receipts - [Business email](https://poststack.dev/use-cases/business-email): IMAP mailboxes on your own domain - [GDPR-compliant email](https://poststack.dev/use-cases/gdpr-compliant-email): EU hosting, a DPA and no CLOUD Act ## Glossary - [DKIM](https://poststack.dev/glossary/dkim) - [SPF](https://poststack.dev/glossary/spf) - [DMARC](https://poststack.dev/glossary/dmarc) - [Hard bounce vs soft bounce](https://poststack.dev/glossary/hard-bounce-vs-soft-bounce) - [Transactional vs marketing email](https://poststack.dev/glossary/transactional-vs-marketing-email) - [Return-Path](https://poststack.dev/glossary/return-path) - [MTA-STS](https://poststack.dev/glossary/mta-sts) - [BIMI](https://poststack.dev/glossary/bimi) - [Feedback loop](https://poststack.dev/glossary/feedback-loop) - [Email warmup](https://poststack.dev/glossary/email-warmup) - [One-click unsubscribe](https://poststack.dev/glossary/one-click-unsubscribe)