Quickstart
2 min read
Send your first transactional email with MailingAPI in three steps.
1. Create an account
Go to mailingapi.com/register and create a free account. You’ll get:
- 1,000 emails/month free
- 1 sending domain
- API key generated automatically
No credit card required.
2. Get your API key
After registration, you’ll find your API key in the dashboard under Settings → API Keys.
Your key looks like this:
ob_live_a1b2c3d4e5f6g7h8i9j0...
Keep it secret. Anyone with this key can send emails from your domain.
3. Send your first email
Using cURL
curl -X POST https://api.mailingapi.com/v1/messages/send \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"from": "hello@yourdomain.com",
"to": "recipient@example.com",
"subject": "Hello from MailingAPI",
"html": "<h1>It works!</h1><p>Your first email via MailingAPI.</p>",
"text": "It works! Your first email via MailingAPI."
}'
Using Python
import requests
response = requests.post(
"https://api.mailingapi.com/v1/messages/send",
headers={
"Authorization": "Bearer YOUR_API_KEY",
"Content-Type": "application/json"
},
json={
"from": "hello@yourdomain.com",
"to": "recipient@example.com",
"subject": "Hello from MailingAPI",
"html": "<h1>It works!</h1><p>Your first email via MailingAPI.</p>",
"text": "It works! Your first email via MailingAPI."
}
)
print(response.json())
Using JavaScript (Node.js)
const response = await fetch('https://api.mailingapi.com/v1/messages/send', {
method: 'POST',
headers: {
'Authorization': 'Bearer YOUR_API_KEY',
'Content-Type': 'application/json'
},
body: JSON.stringify({
from: 'hello@yourdomain.com',
to: 'recipient@example.com',
subject: 'Hello from MailingAPI',
html: '<h1>It works!</h1><p>Your first email via MailingAPI.</p>',
text: 'It works! Your first email via MailingAPI.'
})
});
const data = await response.json();
console.log(data);
Using PHP
<?php
$ch = curl_init('https://api.mailingapi.com/v1/messages/send');
curl_setopt_array($ch, [
CURLOPT_POST => true,
CURLOPT_RETURNTRANSFER => true,
CURLOPT_HTTPHEADER => [
'Authorization: Bearer YOUR_API_KEY',
'Content-Type: application/json'
],
CURLOPT_POSTFIELDS => json_encode([
'from' => 'hello@yourdomain.com',
'to' => 'recipient@example.com',
'subject' => 'Hello from MailingAPI',
'html' => '<h1>It works!</h1><p>Your first email via MailingAPI.</p>',
'text' => 'It works! Your first email via MailingAPI.'
])
]);
$response = curl_exec($ch);
echo $response;
Response
A successful response looks like this:
{
"id": "msg_1234567890abcdef",
"status": "queued",
"message": "Email queued for delivery"
}
Your email is now on its way. Most emails are delivered within seconds.
What’s next?
Need help?
- Check the API Reference for detailed endpoint documentation
- Read our troubleshooting guide for common issues
- Contact us at support@mailingapi.com