Quick Start
Send your first transactional email in under 5 minutes.
Prerequisites
Before you begin, make sure you have:
- A Transactional account (sign up free)
- A verified domain for sending emails
- An API key from your dashboard
Step 1: Create an Email Server
An email server is a logical container for your emails. Create one from the dashboard:
- Go to Email > Servers
- Click Create Server
- Enter a name (e.g., "Production" or "My App")
- Click Create
Step 2: Set Up a Message Stream
Each server has message streams to separate different types of emails:
- Open your newly created server
- Go to the Streams tab
- You'll see a default Transactional stream already created
- This stream is configured for transactional emails (welcome emails, receipts, etc.)
Step 3: Add a Sender Identity
You need a verified sender address to send emails:
- Go to Senders in your server
- Click Add Sender
- Enter your sender email (e.g.,
hello@yourdomain.com) - Verify the domain by adding DNS records
Step 4: Generate an API Key
- Go to API Keys in your server
- Click Create API Key
- Copy and securely store your API key
Step 5: Send Your First Email
Using the TypeScript SDK
Install the SDK:
npm install transactional-sdkSend an email:
import { Transactional } from 'transactional-sdk';
const client = new Transactional({
apiKey: process.env.TRANSACTIONAL_API_KEY,
});
async function sendWelcomeEmail() {
const result = await client.emails.send({
from: 'hello@yourdomain.com',
to: 'user@example.com',
subject: 'Welcome to our platform!',
html: `
<h1>Welcome!</h1>
<p>Thanks for signing up. We're excited to have you.</p>
`,
});
console.log('Email sent:', result.messageId);
}
sendWelcomeEmail();Using cURL
curl -X POST https://api.usetransactional.com/v1/emails/send \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"from": "hello@yourdomain.com",
"to": "user@example.com",
"subject": "Welcome to our platform!",
"html": "<h1>Welcome!</h1><p>Thanks for signing up.</p>"
}'Step 6: Verify Delivery
After sending, you can:
- Check the Activity tab in your server to see the email
- View delivery status (sent, delivered, opened, clicked)
- See any bounce or error information
What's Next?
Now that you've sent your first email, explore more features:
- Templates - Create reusable email templates
- Tracking - Set up open and click tracking
- Webhooks - Receive real-time delivery events
- Best Practices - Improve your deliverability