Quickstart
Five minutes from signup to your first inbox delivery. We'll create an API key, send a transactional email through curl, and save a reusable template.
1. Create an account & get keys
Sign up for free — no card needed. Once you're in, the dashboard shows your X-API-Key and X-API-Secret on the API page. Both are required on every request.
X-API-Secret like a password — server-side only, never in browser code. Rotate from the API page anytime; old keys are revoked instantly.
2. Send your first transactional email
The simplest send takes a recipient and an inline HTML body. Replace the placeholders with your keys and a real address:
curl -X POST https://api.mailazy.com/api/v1/send \
-H "X-API-Key: pk_live_xxx" \
-H "X-API-Secret: sk_live_xxx" \
-H "Content-Type: application/json" \
-d '{
"to": "you@example.com",
"subject": "Hello from Mailazy",
"html": "<h1>It works</h1><p>You sent your first email.</p>"
}' You'll get back a JSON response with the queued messageId. Check your inbox — delivery is usually under 3 seconds on Gmail.
3. Save it as a reusable template
One-off sends are fine for testing, but production should use templates so non-engineers can edit copy. Create a template once, send by slug forever after:
curl -X POST https://api.mailazy.com/api/v1/templates \
-H "X-API-Key: pk_live_xxx" \
-H "X-API-Secret: sk_live_xxx" \
-H "Content-Type: application/json" \
-d '{
"slug": "welcome",
"subject": "Welcome to {{product_name}}, {{name}}!",
"body": "<p>Hi {{name}}, you are in.</p>{{> unsubscribe-footer}}"
}' Then send by slug, passing template variables:
curl -X POST https://api.mailazy.com/api/v1/send \
-H "X-API-Key: pk_live_xxx" -H "X-API-Secret: sk_live_xxx" \
-H "Content-Type: application/json" \
-d '{
"to": "alice@example.com",
"templateSlug": "welcome",
"variables": { "name": "Alice", "product_name": "Acme" }
}' {{> unsubscribe-footer}} partial handles RFC 8058 one-click unsubscribe and CAN-SPAM compliance automatically. It must appear in every marketing email.
4. Verify delivery
Every send writes a row to /api/v1/logs. Filter by message id, recipient, or template to inspect status, opens, clicks, bounces and full request/response payloads:
curl https://api.mailazy.com/api/v1/logs?recipient=alice@example.com \
-H "X-API-Key: pk_live_xxx" -H "X-API-Secret: sk_live_xxx" For real-time event handling instead of polling, subscribe to webhooks.
What next?
- Templates — versions, Handlebars syntax, partials, AI generation.
- Automations — fire emails from product events with branches and delays.
- Contacts & lists — import CSV, build lists from filters.
- API reference — every endpoint, error codes, rate limits.