Quick Start
Get up and running with Unosend in under 5 minutes. This guide will walk you through creating an account, getting your API key, and sending your first email.
Prerequisites
- A Unosend account (free to create)
- cURL or any HTTP client (for testing)
- A verified domain (optional, but recommended)
Create an Account
Sign up for a free Unosend account at unosend.co/signup. No credit card required.
Tip: The free plan includes 5,000 emails/month - perfect for getting started!
Get Your API Key
Navigate to API Keys in your dashboard and click "Create API Key". Your API key will start with the un_ prefix.
un_xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxImportant: Copy and save your API key immediately - it's only shown once! Keep it secure and never expose it in client-side code.
Add a Domain
Go to Domains in your dashboard and add your sending domain. You'll need to add DNS records to verify ownership.
curl -X POST https://www.unosend.co/api/v1/domains \
-H "Authorization: Bearer un_your_api_key" \
-H "Content-Type: application/json" \
-d '{"domain": "yourdomain.com"}'Add the returned DNS records to your domain provider, then verify:
curl -X POST https://www.unosend.co/api/v1/domains/{domain_id}/verify \
-H "Authorization: Bearer un_your_api_key"Send Your First Email
Once your domain is verified, send your first email using the REST API:
curl -X POST https://www.unosend.co/api/v1/emails \
-H "Authorization: Bearer un_your_api_key" \
-H "Content-Type: application/json" \
-d '{
"from": "hello@yourdomain.com",
"to": ["recipient@example.com"],
"subject": "Hello from Unosend!",
"html": "<h1>Welcome!</h1><p>This is your first email sent with Unosend.</p>"
}'Response
{
"id": "550e8400-e29b-41d4-a716-446655440000",
"from": "hello@yourdomain.com",
"to": ["recipient@example.com"],
"created_at": "2024-01-15T10:30:00.000Z"
}Using Node.js (fetch)
Here's how to send emails using Node.js with the native fetch API:
const response = await fetch('https://www.unosend.co/api/v1/emails', {
method: 'POST',
headers: {
'Authorization': 'Bearer un_your_api_key',
'Content-Type': 'application/json'
},
body: JSON.stringify({
from: 'hello@yourdomain.com',
to: ['recipient@example.com'],
subject: 'Hello from Unosend!',
html: '<h1>Welcome!</h1><p>Sent with Node.js</p>'
})
});
const data = await response.json();
console.log('Email sent!', data.id);Using Python
import requests
response = requests.post(
'https://www.unosend.co/api/v1/emails',
headers={
'Authorization': 'Bearer un_your_api_key',
'Content-Type': 'application/json'
},
json={
'from': 'hello@yourdomain.com',
'to': ['recipient@example.com'],
'subject': 'Hello from Unosend!',
'html': '<h1>Welcome!</h1><p>Sent with Python</p>'
}
)
data = response.json()
print('Email sent!', data['id'])You're all set!
Congratulations! You've successfully sent your first email with Unosend. Check your inbox to see the email.