# 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 (Germany & Finland). Up to 75% cheaper than Resend, SendGrid, and Postmark. 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 built-in webmail - **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 TypeScript/JavaScript: Next.js, Bun, Express, Hono Other languages: Python, Go, Ruby, PHP, Java, Elixir, Rust ## Migration Guides Step-by-step migration from Resend, SendGrid, and Postmark with code examples and pricing comparisons. ## Articles Long-form guides and comparisons written by the PostStack founder. All updated 2026-05-27. - [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. - [Best Transactional Email APIs in 2026](https://poststack.dev/blog/best-transactional-email-apis-2026): Side-by-side of PostStack, Resend, Postmark, SendGrid, Mailgun, and Amazon SES with pricing at 10k, 50k, and 100k emails/month. - [PostStack vs Resend](https://poststack.dev/blog/poststack-vs-resend): Same DX, 25-75% cheaper, EU-hosted, with IMAP mailboxes and DMARC reporting in the base product. - [PostStack vs SendGrid](https://poststack.dev/blog/poststack-vs-sendgrid): Modern API + EU residency vs the legacy Twilio incumbent. - [PostStack vs Postmark](https://poststack.dev/blog/poststack-vs-postmark): Postmark has the deliverability reputation; PostStack adds a free tier, mailboxes, and is up to 70% cheaper. - [5 Cheap Resend Alternatives in 2026](https://poststack.dev/blog/cheap-resend-alternatives): PostStack, Amazon SES, Mailgun, SendGrid, and Brevo compared by price and feature depth.