Quickstart
Send one email through MailPush, then read back what happened to it.
Prerequisites
Section titled “Prerequisites”- A domain whose DNS records you can edit.
- cURL, or Node.js 22 or later for the SDK.
1. Create an account
Section titled “1. Create an account”Sign up at mailpush.app/signup with an email address and a password, then open the confirmation email.
2. Verify your domain
Section titled “2. Verify your domain”In the dashboard, open Domaines (domains), add the domain you send from, and publish the two DNS records shown. The page checks them every 20 seconds and switches to Vérifié when they resolve. See Verify a domain for the records.
3. Create an API key
Section titled “3. Create an API key”Open Clés API (API keys) and create a production key. It starts with mp_live_ and is shown once, so store it in an environment variable now.
export MAILPUSH_API_KEY="mp_live_..."4. Send an email
Section titled “4. Send an email”Replace example.com with your verified domain.
With cURL:
curl https://api.mailpush.app/v1/emails \ -H "Authorization: Bearer $MAILPUSH_API_KEY" \ -H "Content-Type: application/json" \ -d '{ "from": "Acme <hello@example.com>", "to": "customer@example.org", "subject": "Your order is ready", "html": "<p>Hello, your order is waiting for you.</p>" }'With the Node.js SDK, after npm install mailpush:
import { MailPush } from "mailpush";
const mailpush = new MailPush(process.env.MAILPUSH_API_KEY);
const { id } = await mailpush.emails.send({ from: "Acme <hello@example.com>", to: "customer@example.org", subject: "Your order is ready", html: "<p>Hello, your order is waiting for you.</p>",});The response is the id of the email.
{ "id": "em_4b9b3c1f0a2e7d5c9e8f1a2b" }5. Check what happened
Section titled “5. Check what happened”Ask for the email with the same key. Each recipient has its own status and the last answer of its mail server.
curl https://api.mailpush.app/v1/emails/em_4b9b3c1f0a2e7d5c9e8f1a2b \ -H "Authorization: Bearer $MAILPUSH_API_KEY"const email = await mailpush.emails.get(id);console.log(email.recipients);The same information is in the dashboard, under Emails, with a preview of the content.
Next steps
Section titled “Next steps”- How sending works: retries, idempotency, test keys and suppressed addresses.
- Receive webhooks: stop polling and get a request when a status changes.
- Send an email: every parameter of the endpoint.