Mailzo Developer Quickstart

Welcome to the Mailzo API documentation. Mailzo provides a predictable, lightning-fast transactional delivery pipeline engineered for high-throughput modern applications.

Base URL: All API requests must be directed to https://mailzo.co.in/v1.

Authentication

Authenticate your API requests by including your secret API key in the Authorization header as a Bearer token.

Authorization: Bearer ez_live_38bf8c92a910...

POST /v1/emails

Dispatches a transactional email to the BullMQ queue for async delivery.

curl -X POST https://mailzo.co.in/v1/emails \
  -H "Authorization: Bearer ez_live_your_api_key_here" \
  -H "Idempotency-Key: idemp_948a31e8bc" \
  -H "Content-Type: application/json" \
  -d '{
    "from": "Acme Team <notifications@mailzo.co.in>",
    "to": ["developer@company.com"],
    "subject": "Deploy Success #482",
    "html": "<h1>Your deploy is live!</h1><p>Processed in 42ms.</p>"
  }'

Node.js SDK

import { Mailzo } from "mailzo";

const mailzo = new Mailzo("ez_live_your_api_key_here");

const { data, error } = await mailzo.emails.send({
  from: "Acme Team <notifications@mailzo.co.in>",
  to: ["user@company.com"],
  subject: "Your Weekly Digest",
  html: "<p>Check out what shipped this week.</p>",
});

console.log("Email dispatched:", data.id);

Idempotency Guarantees

Mailzo supports the Idempotency-Key header to prevent double-charging or duplicate transactional emails caused by network timeouts or automatic client retries.