Quickstart Guide
Get up and running with SendMailOS in under 5 minutes.
Get your API key
Sign up and generate an API key from your dashboard.
Install the SDK
Add our official SDK to your project.
Send your first email
Make your first API call to send an email.
Get your API key
First, create an account and generate an API key from your dashboard.
Sign up for a free account
No credit card required to get started.
Navigate to API Settings
Go to Dashboard → Settings → API Keys
Generate a new API key
Copy and store it securely. You won't see it again!
Install the SDK
Install our official SDK using your preferred package manager.
npm install @sendmailos/sdkUsing REST API directly? You can also use any HTTP client like fetch, axios, or requests.
Send your first email
Initialize the client and send a test email.
import { SendMailOS } from '@sendmailos/sdk';
// Initialize with your API key
const client = new SendMailOS(process.env.SENDMAILOS_API_KEY);
// Send a transactional email
const response = await client.send({
to: '[email protected]',
from_name: 'Your Company',
from_email: '[email protected]',
subject: 'Welcome aboard!',
html: '<h1>Hello!</h1><p>Welcome to our platform.</p>'
});
console.log('Email sent:', response.message_id);Expected Response
{
"success": true,
"message_id": "msg_1234567890abcdef",
"status": "queued"
}Environment Variables
Store your API key in an environment variable for security.
SENDMAILOS_API_KEY=sk_live_your_api_key_herePro tip
Use different API keys for development (sk_test_...) and production (sk_live_...).