Getting Started
PostStack is the email API for developers. Send transactional emails, manage contacts, verify domains, and track delivery -- all through a simple, type-safe API.
Install the SDK
Install the PostStack SDK with your preferred package manager:
bun add @poststack.dev/sdknpm install @poststack.dev/sdkpnpm add @poststack.dev/sdkSend Your First Email
Initialize the client with your API key and send an email in just a few lines:
import { PostStack } from '@poststack.dev/sdk';
const poststack = new PostStack('sk_live_...');
const { id } = await poststack.emails.send({
from: 'you@yourdomain.com',
to: ['user@example.com'],
subject: 'Hello!',
html: '<p>Welcome!</p>',
});
// id = "em_abc123..."Base URL
All API requests are made to the following base URL.
https://api.poststack.devKey Concepts
Each concept below has its own dedicated reference page — click through for the full API surface, code samples, and configuration details.
Domains
Verify your domains with SPF, DKIM, and DMARC records before sending emails. PostStack provides the DNS records you need to add.
API Keys
Authenticate requests with API keys. Create keys with full access or sending-only permissions, optionally scoped to specific domains.
Contacts & Segments
Manage your recipient lists with contacts and organize them into segments for targeted broadcasts.
Templates
Create reusable email templates with variable substitution. Use them when sending emails to keep your code clean.
Webhooks
Receive real-time notifications for email events like delivery, opens, clicks, and bounces via HTTP webhooks.
Suppressions
Manage your suppression list to prevent emails from being sent to addresses that have bounced, complained, or been manually blocked.
Mailboxes
Create mailboxes for full email hosting. Users connect with Thunderbird, Outlook, Apple Mail, or Gmail to read and manage their email.
Email Validations
Validate email addresses before sending to reduce bounces. Checks syntax, MX records, disposable providers, and risk scoring.
Contact Properties
Define custom properties on contacts for personalized messaging, dynamic segments, and workflow conditions.
Signup Forms
Create embeddable signup forms to collect contacts from your website with automatic segment and topic assignment.
What's Next
Pick the path that matches what you're building:
Send transactional email
Full reference for `/emails`: scheduling, batching, attachments, idempotency, spam scoring, one-click unsubscribe.
Run a marketing broadcast
Send a campaign to a segment, run an A/B test, or schedule for later.
Receive email via webhook
Route incoming mail to your application as a parsed JSON webhook.
Read the SDK reference
Every method on the TypeScript SDK with type signatures and examples.