Get started with PostaSend
Everything you need to integrate transactional email into your application — from quick start to advanced multi-tenant configurations.
Quick start
Create an account
Sign up at postasend.dev — free, no credit card required.
Get your API key
Navigate to Settings → API Keys and create a new key.
Install the SDK
Add @postasend to your project with your package manager.
Verify a domain
Add a custom sending domain in Settings → Domains.
Send your first email
Call client.emails.send() and check the dashboard for delivery status.
Installation
Install the PostaSend SDK using your preferred package manager.
npm install @postasendAuthentication
PostaSend authenticates your requests using API keys. Your API key carries your account privileges, so keep it secret. Store it as an environment variable — never commit it to source control.
import { PostaSend } from 'postasend';
// Initialize with your API key
const client = new PostaSend({
apiKey: process.env.POSTASEND_API_KEY!,
});
// Or pass the key directly (not recommended for production)
const client2 = new PostaSend({ apiKey: 'ps_live_...' });Security tip: Use environment variables for your API key. If a key is ever exposed, immediately rotate it in the PostaSend dashboard under Settings → API Keys.
Send your first email
With authentication configured, you can send your first email in a single API call.
import { PostaSend } from 'postasend';
const client = new PostaSend({
apiKey: process.env.POSTASEND_API_KEY!,
});
const response = await client.emails.send({
from: 'hello@yourdomain.com',
to: ['user@example.com'],
subject: 'Welcome to our app!',
html: '<h1>Welcome!</h1><p>Your account is ready.</p>',
text: 'Welcome! Your account is ready.',
// Optional headers
headers: {
'X-Entity-Ref-ID': 'user-123-welcome',
},
});
console.log(response.messageId); // 'msg_abc123'
console.log(response.status); // 'queued'The response includes a messageId you can use to track delivery status, and a status field that will be queued immediately after submission.
Explore the docs
Authentication
Learn how to authenticate API requests with API keys and scoped tokens.
Sending Email
Send transactional emails, handle recipients, and manage attachments.
Templates
Create reusable Handlebars templates with dynamic variables.
Domains
Configure custom sending domains with SPF, DKIM, and DMARC.
Webhooks
Subscribe to email events — delivered, opened, clicked, bounced.
SDK Reference
Full TypeScript SDK reference with all methods and types documented.