Send emails, manage contacts, verify domains, and track delivery programmatically. Authenticate with your API key and call /api/v1 endpoints.
All API requests require a Bearer token. Generate your API key from Settings → Security in your dashboard.
# Include in every request header:
Authorization: Bearer sk_live_your_api_key_here
# Base URL:
https://your-app.com/api/v1/
# Rate limits:
# Starter: 100 req/min | Professional: 500 req/min | Enterprise: 2000 req/minKeep your API key secret. Never expose it in client-side code. If compromised, revoke it immediately from Settings.
All webhook payloads are signed with HMAC-SHA256. Verify the signature to ensure authenticity.
// Node.js webhook verification
const crypto = require('crypto');
function verifyWebhook(body, signature, secret) {
const expected = crypto
.createHmac('sha256', secret)
.update(body)
.digest('hex');
return crypto.timingSafeEqual(
Buffer.from(signature),
Buffer.from(expected)
);
}
// In your webhook handler:
app.post('/webhook', (req, res) => {
const sig = req.headers['x-webhook-signature'];
if (!verifyWebhook(JSON.stringify(req.body), sig, SECRET)) {
return res.status(401).send('Invalid signature');
}
const { type, data } = req.body;
// Process event...
res.status(200).send('OK');
});Available events
/api/v1/emailsSend a transactional email
Request
curl -X POST https://your-app.com/api/v1/emails \
-H "Authorization: Bearer sk_live_your_key" \
-H "Content-Type: application/json" \
-d '{
"to": "user@example.com",
"from": "you@yourdomain.com",
"subject": "Welcome!",
"html": "<h1>Hello!</h1><p>Welcome aboard.</p>",
"tags": { "type": "welcome" }
}'Response
{
"id": "clx1234...",
"status": "sent",
"messageId": "ses-message-id"
}/api/v1/emails/batchSend up to 100 emails in one request
Request
curl -X POST https://your-app.com/api/v1/emails/batch \
-H "Authorization: Bearer sk_live_your_key" \
-H "Content-Type: application/json" \
-d '{
"emails": [
{ "to": "a@example.com", "from": "you@domain.com", "subject": "Hi", "html": "<p>Hello A</p>" },
{ "to": "b@example.com", "from": "you@domain.com", "subject": "Hi", "html": "<p>Hello B</p>" }
]
}'Response
{
"results": [
{ "to": "a@example.com", "id": "clx...", "status": "sent" },
{ "to": "b@example.com", "id": "clx...", "status": "sent" }
],
"total": 2, "sent": 2, "failed": 0
}/api/v1/emailsList email logs with pagination
Request
curl "https://your-app.com/api/v1/emails?limit=20&status=sent" \
-H "Authorization: Bearer sk_live_your_key"Response
{
"emails": [{ "id": "...", "to": "...", "subject": "...", "status": "sent", "opens": 3 }],
"total": 150, "page": 1, "pages": 8
}/api/v1/emails/:idGet email details with all events
Request
curl https://your-app.com/api/v1/emails/clx1234 \
-H "Authorization: Bearer sk_live_your_key"Response
{
"email": { "id": "...", "to": "...", "status": "sent", "opens": 5, "clicks": 2 },
"events": [{ "type": "sent", "createdAt": "..." }, { "type": "opened", "createdAt": "..." }]
}/api/v1/contactsCreate a new contact
Request
curl -X POST https://your-app.com/api/v1/contacts \
-H "Authorization: Bearer sk_live_your_key" \
-H "Content-Type: application/json" \
-d '{ "email": "new@example.com", "name": "John Doe", "listId": "list_id" }'Response
{ "id": "...", "email": "new@example.com", "name": "John Doe", "status": "subscribed" }/api/v1/contactsList contacts with pagination and filtering
Request
curl "https://your-app.com/api/v1/contacts?limit=50&listId=..." \
-H "Authorization: Bearer sk_live_your_key"Response
{ "contacts": [...], "total": 1000, "page": 1 }/api/v1/domainsList verified domains
Request
curl https://your-app.com/api/v1/domains \
-H "Authorization: Bearer sk_live_your_key"Response
{ "domains": [{ "domain": "yourdomain.com", "status": "verified" }] }/api/v1/domains/:id/verifyTrigger domain verification
Request
curl -X POST https://your-app.com/api/v1/domains/dom_id/verify \
-H "Authorization: Bearer sk_live_your_key"Response
{ "status": "verified", "domain": "yourdomain.com" }/api/v1/webhooksCreate a webhook endpoint
Request
curl -X POST https://your-app.com/api/v1/webhooks \
-H "Authorization: Bearer sk_live_your_key" \
-H "Content-Type: application/json" \
-d '{
"url": "https://your-app.com/webhook",
"events": ["email.sent", "email.opened", "email.clicked", "email.bounced"]
}'Response
{
"id": "...",
"url": "https://your-app.com/webhook",
"secret": "whsec_...",
"events": ["email.sent", "email.opened", "email.clicked", "email.bounced"]
}/api/v1/webhooksList all configured webhooks
Request
curl https://your-app.com/api/v1/webhooks \
-H "Authorization: Bearer sk_live_your_key"Response
{ "webhooks": [{ "id": "...", "url": "...", "events": [...], "isActive": true }] }/api/v1/campaignsCreate a campaign
Request
curl -X POST https://your-app.com/api/v1/campaigns \
-H "Authorization: Bearer sk_live_your_key" \
-H "Content-Type: application/json" \
-d '{ "name": "March Newsletter", "subject": "News!", "listId": "...", "content": "<h1>Hello</h1>" }'Response
{ "id": "...", "name": "March Newsletter", "status": "draft" }/api/v1/campaigns/:id/launchLaunch a campaign to start sending
Request
curl -X POST https://your-app.com/api/v1/campaigns/camp_id/launch \
-H "Authorization: Bearer sk_live_your_key"Response
{ "success": true, "status": "sending" }/api/v1/statsGet account statistics
Request
curl https://your-app.com/api/v1/stats \
-H "Authorization: Bearer sk_live_your_key"Response
{
"contacts": 1500,
"campaigns": { "total": 45, "sending": 1, "completed": 40 },
"emailsThisMonth": 12500,
"domains": 2
}Generate your API key from the dashboard and start sending emails in minutes. SDKs for Node.js, Python, and Go are coming soon.
Get your API key