Skip to content

REST API

Send tracked emails from your own Gmail and read opens and clicks — from any language, with no browser or extension.

Authentication

Create an API key in the dashboard under Developers. It is shown once — store it safely. Send it as a Bearer token:

Authorization: Bearer mc_live_xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
The Developers page where API keys are created

Base URL: https://mconfirm.com/api/v1. Requests and responses are JSON. Emails are sent from the Gmail account connected to the key's owner, so Gmail must be connected.

Endpoints

MethodPathDescription
POST/api/v1/emailsSend a tracked email.
GET/api/v1/emailsList tracked emails. Query: filter=all|opened|unopened|clicked|individual|group, q, limit (1–100, default 25), before (cursor).
GET/api/v1/emails/{id}One email with its recipients, events and link stats.
GET/api/v1/emails/{id}/eventsEvery open and click of one email, newest first.
GET/api/v1/eventsYour activity feed. Query: since (ISO time), limit.
GET/api/v1/linksLink click stats. Query: email_id (optional).
GET/api/v1/statsSent, opened, clicked and rates. Query: days (default 30).
GET/api/v1/meYour account, Gmail connection and settings.

Send a tracked email

POST /api/v1/emails

FieldTypeDescription
toarray, requiredRecipients. Each is a string ("Ann <[email protected]>" or "[email protected]") or { "address", "name" }.
ccarrayCc recipients, same format.
bccarrayBcc recipients. Each gets a private copy with no Bcc line.
subjectstringSubject line. Optional when reply_to is given ("Re: …" is used).
htmlstringHTML body. Either html or text is needed.
textstringPlain-text body; turned into simple HTML so it can be tracked.
attachmentsarrayUp to 20: { "filename", "contentType", "contentBase64" }. 20 MB total.
trackbooleanTrack opens. Default: your “Track emails by default” setting.
track_clicksbooleanTrack link clicks. Default: your setting.
individualbooleanOne copy per recipient. Default: your “Individual tracking” setting.
signaturebooleanAdd the MConfirm signature. Default: your setting.
reply_tostringGmail message id or RFC Message-ID of the email you're answering — threads the reply.
remind_if_not_opened_hoursinteger0–720. Alert you if nobody opens it within this many hours.

curl

curl https://mconfirm.com/api/v1/emails \
  -H "Authorization: Bearer $MCONFIRM_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "to": ["Priya Shah <[email protected]>", "[email protected]"],
    "bcc": ["[email protected]"],
    "subject": "Q1 proposal",
    "html": "<p>Hi both, the final numbers are <a href=\"https://acme.com/q1\">here</a>.</p>",
    "individual": true,
    "remind_if_not_opened_hours": 48
  }'

Response — 201 Created

{
  "id": "eml_7dKq2mWzR4pXbN8sTa",
  "status": "sent",
  "mode": "individual",
  "messageId": "<[email protected]>",
  "recipients": [
    { "address": "[email protected]", "kind": "to",  "status": "sent" },
    { "address": "[email protected]", "kind": "to",  "status": "sent" },
    { "address": "[email protected]",  "kind": "bcc", "status": "sent" }
  ]
}

status is sent, or partial when some recipients failed (each failed recipient carries an error). mode is individual, group or untracked. A warning appears if the email was sent but the Sent folder could not be tidied.

Node.js

const res = await fetch("https://mconfirm.com/api/v1/emails", {
  method: "POST",
  headers: { Authorization: `Bearer ${process.env.MCONFIRM_API_KEY}`, "Content-Type": "application/json" },
  body: JSON.stringify({ to: ["[email protected]"], subject: "Hello", text: "Quick question…" }),
});
const email = await res.json();
if (!res.ok) throw new Error(email.error.message);

Python

import os, requests

r = requests.post(
    "https://mconfirm.com/api/v1/emails",
    headers={"Authorization": f"Bearer {os.environ['MCONFIRM_API_KEY']}"},
    json={"to": ["[email protected]"], "subject": "Hello", "text": "Quick question…"},
    timeout=120,
)
r.raise_for_status()
print(r.json()["id"])

List emails

curl "https://mconfirm.com/api/v1/emails?filter=opened&limit=10" \
  -H "Authorization: Bearer $MCONFIRM_API_KEY"
{
  "emails": [
    {
      "id": "eml_7dKq2mWzR4pXbN8sTa",
      "subject": "Q1 proposal",
      "from": "[email protected]",
      "message_id": "<[email protected]>",
      "gmail_message_id": "18c2f0a9d3b4e5f6",
      "gmail_thread_id": "18c2f0a9d3b4e5f6",
      "mode": "individual",
      "source": "api",
      "status": "sent",
      "tracking": { "opens": true, "clicks": true },
      "sent_at": "2026-11-28T10:42:00.000Z",
      "opens": 4,
      "clicks": 1,
      "opened": true,
      "first_open_at": "2026-11-28T10:51:13.000Z",
      "last_open_at": "2026-11-28T14:02:40.000Z",
      "recipients_summary": "Priya Shah, [email protected], [email protected]",
      "recipient_count": 3
    }
  ],
  "next_cursor": "2026-11-27T08:15:00.000Z"
}

Pass next_cursor as before to get the next page; it is null on the last page.

One email

GET /api/v1/emails/{id} returns email (as above), recipients, events and links:

{
  "email": { "id": "eml_7dKq…", "subject": "Q1 proposal", "opens": 4, "clicks": 1, "...": "..." },
  "recipients": [
    {
      "id": "rcp_Hn3…", "address": "[email protected]", "name": "Priya Shah", "kind": "to", "status": "sent",
      "opens": 3, "clicks": 0,
      "first_open_at": "2026-11-28T10:51:13.000Z", "last_open_at": "2026-11-28T14:02:40.000Z"
    }
  ],
  "events": [
    { "id": "evt_9a…", "type": "click", "at": "2026-11-28T11:20:02.000Z", "recipient": "[email protected]",
      "recipient_id": "rcp_Q2…", "url": "https://acme.com/q1", "device": "desktop", "counted": true },
    { "id": "evt_8b…", "type": "open", "at": "2026-11-28T10:44:10.000Z", "recipient": "Priya Shah",
      "recipient_id": "rcp_Hn3…", "url": null, "device": "gmail", "counted": false, "not_counted_because": "self-view" }
  ],
  "links": [
    { "url": "https://acme.com/q1", "clicks": 1, "recipients_clicked": 1, "last_click_at": "2026-11-28T11:20:02.000Z" }
  ]
}

not_counted_because is one of self-cookie, self-view, prefetch, duplicate or bot — see Self-opens & accuracy.

Activity feed

curl "https://mconfirm.com/api/v1/events?since=2026-11-28T00:00:00Z" \
  -H "Authorization: Bearer $MCONFIRM_API_KEY"
{
  "events": [
    { "id": "ntf_…", "type": "open", "title": "Priya Shah opened your email",
      "body": "“Q1 proposal” — opened 3 times", "email_id": "eml_7dKq…", "created_at": "2026-11-28T14:02:40.000Z" }
  ]
}

Types: open, click, reopen, hot, unopened.

Errors

{ "error": { "code": "gmail_not_connected", "message": "Gmail is not connected" } }
HTTPcodeMeaning
400invalid_requestA field is missing or invalid; the message says which.
401unauthorizedMissing, wrong or revoked API key.
404not_foundNo such email in your account.
409gmail_not_connectedConnect or reconnect Gmail in the dashboard.
429rate_limitedToo many requests — wait and retry.
502delivery_failedGmail accepted none of the recipients.
MConfirm is for emails you'd write yourself — up to 100 recipients each. Bulk campaigns and mail merge are not supported, and Gmail's own daily sending limits apply.