Quickstart
Send your first email in under 5 minutes.
Prerequisites
Before you start, you need:
- An Emitlo account — sign up at app.emitlo.com
- A verified sending domain (see Domain Setup)
- An API credential with
sendpermission (see Credentials)
Step 1 — Get your API key
After creating a credential, copy the secret key shown once at creation. Store it securely — it won’t be shown again.
Your API key looks like: ek_live_xxxxxxxxxxxxxxxxxxxx
Step 2 — Send your first email
curl -X POST https://api.emitlo.com/api/v1/messages \ -H "Authorization: Bearer YOUR_API_KEY" \ -H "Content-Type: application/json" \ -d '{ "from_email": "hello@yourdomain.com", "from_name": "Your App", "to_email": "user@example.com", "to_name": "John Doe", "subject": "Welcome to our platform!", "body": "<h1>Welcome!</h1><p>Thanks for signing up.</p>" }'const response = await fetch('https://api.emitlo.com/api/v1/messages', { method: 'POST', headers: { 'Authorization': 'Bearer YOUR_API_KEY', 'Content-Type': 'application/json', }, body: JSON.stringify({ from_email: 'hello@yourdomain.com', from_name: 'Your App', to_email: 'user@example.com', to_name: 'John Doe', subject: 'Welcome to our platform!', body: '<h1>Welcome!</h1><p>Thanks for signing up.</p>', }),});
const data = await response.json();console.log(data.data.message_id); // "550e8400-e29b-41d4-a716-446655440000"<?php$response = file_get_contents('https://api.emitlo.com/api/v1/messages', false, stream_context_create([ 'http' => [ 'method' => 'POST', 'header' => [ 'Authorization: Bearer YOUR_API_KEY', 'Content-Type: application/json', ], 'content' => json_encode([ 'from_email' => 'hello@yourdomain.com', 'from_name' => 'Your App', 'to_email' => 'user@example.com', 'to_name' => 'John Doe', 'subject' => 'Welcome to our platform!', 'body' => '<h1>Welcome!</h1><p>Thanks for signing up.</p>', ]), ],]));
$data = json_decode($response, true);echo $data['data']['message_id'];import httpx
response = httpx.post( "https://api.emitlo.com/api/v1/messages", headers={ "Authorization": "Bearer YOUR_API_KEY", "Content-Type": "application/json", }, json={ "from_email": "hello@yourdomain.com", "from_name": "Your App", "to_email": "user@example.com", "to_name": "John Doe", "subject": "Welcome to our platform!", "body": "<h1>Welcome!</h1><p>Thanks for signing up.</p>", },)
data = response.json()print(data["data"]["message_id"])Step 3 — Check the response
A successful send returns HTTP 202 Accepted:
{ "status": "success", "data": { "message_id": "550e8400-e29b-41d4-a716-446655440000" }}Save the message_id — you can use it to query delivery status or correlate webhook events.
Step 4 — Track delivery
Once sent, you can track the message in the dashboard or via the API:
curl https://api.emitlo.com/api/v1/messages/550e8400-e29b-41d4-a716-446655440000 \ -H "Authorization: Bearer YOUR_API_KEY"Or set up webhooks to receive real-time delivery notifications.
What’s next?
- Domain Setup & DNS — verify your sending domain
- Credentials & Permissions — manage API keys
- SMTP Integration — use Emitlo as an SMTP relay
- Webhooks — receive delivery events in real time
- Full API Reference — all endpoints documented