Skip to content
MailSlurp logo

Track email opens, clicks and replies

Documentation navigation
Search documentation

Press Enter to search all docs.

Add open and click tracking to email you send from any platform, then read each recipient's opens, clicks and replies through the API, webhooks or an AI agent.

Overview

After a sales follow-up, an onboarding message or an email drafted by an AI agent goes out, the next step usually depends on what the recipient did with it. Did they open it, click the link, or reply? Most email platforms only report this for email sent through their own campaigns, and the numbers are blurred by mail apps that load images automatically and by security gateways that click every link before the reader sees the message.

MailSlurp email tracking works with email you send from anywhere: your email platform, your own SMTP server, a MailSlurp inbox or an AI agent. You give MailSlurp the HTML and the recipients. MailSlurp returns a copy for each recipient with a small tracking image and rewritten links, and you send it the way you normally would. Every open and click is recorded against that recipient and labelled so you can tell a person from a machine. Results are available through the API, webhooks and MCP tools for AI agents. Replies are recorded when they arrive in a MailSlurp inbox.

How tracking works

When you create tracked emails, MailSlurp gives each recipient a signed token and prepares their copy of the email:

  1. A 1x1 tracking image is placed just after the <body> tag. Loading it records an open.
  2. Each tracked link is replaced with a link on MailSlurp’s tracking domain. Following it records a click and redirects the reader to the original address.
  3. Everything else in your HTML stays exactly as you wrote it, including Outlook conditional comments, VML buttons and inline styles.

You then send each recipient their copy. The tracking domain is returned as trackingHost in every response; it is MailSlurp’s shared tracking domain, t.sendlander.com. A tracking link only ever redirects to a destination that was in the original email, and an unknown or altered link shows a plain “This link is not available.” page.

Opens, machines and people

An image load is a signal, not proof that someone read the email. Apple Mail Privacy Protection loads images for many iPhone and Mac users before they open anything, and corporate security gateways follow links to scan them. MailSlurp classifies every event so these do not count as reading:

Classification What it means
HUMAN Looks like a person. Gmail and Yahoo load images through their own proxies when the reader opens the email, so those opens count here.
APPLE_PRIVACY_PREFETCH Apple Mail loaded the image in advance. The reader may never have opened the email.
SECURITY_SCANNER A security gateway, link checker or link-preview bot, such as Slack’s, opened the email or followed a link.
PREFETCH Another automatic load that is not a person.
UNKNOWN Not enough information to tell.

Each event also reports the mail client family (GMAIL, APPLE_MAIL, OUTLOOK, YAHOO or OTHER) and humanLikely, which is true when the event looks like a person.

Tracked email states

Each tracked email records the furthest stage it has reached:

State Reached when
NOT_OPENED Nothing has been recorded yet.
MACHINE_OPENED Only automatic image loads so far, such as Apple’s privacy prefetch.
OPENED An open that looks like a person.
CLICKED A link was followed by something other than a security scanner.
REPLIED A reply arrived in the MailSlurp inbox that sent the email.

The tracked email also keeps openCount, humanOpenCount and clickCount, and the times of the first open, first human open, latest open, first click and reply.

Create tracked emails

Call POST /email-tracking/emails with your HTML and up to 500 recipients. Authenticate with your API key in the x-api-key header, as described in authentication. MailSlurp prepares the email but does not send it.

Get a copy of the HTML for each recipient

By default each recipient gets their own instrumented HTML:

curl -X POST https://api.mailslurp.com/email-tracking/emails \
  -H "x-api-key: $MAILSLURP_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "subject": "Your trial ends on Friday",
    "html": "<html><body><p>Hi Ana,</p><p><a href=\"https://example.com/upgrade\">Choose a plan</a></p></body></html>",
    "recipients": [
      { "email": "ana@example.com", "externalId": "crm-123" }
    ],
    "campaign": "trial-ending",
    "tags": ["lifecycle"]
  }'

The response describes the links and holds one entry per recipient:

{
  "batchId": "6f0c7a43-1d2e-4c8b-9a51-2b7e0d3f9c11",
  "trackingHost": "t.sendlander.com",
  "links": [{ "index": 0, "originalUrl": "https://example.com/upgrade" }],
  "untrackedLinks": [],
  "htmlTemplate": null,
  "emails": [
    {
      "id": "763aba81-096c-49d1-bb4d-67d36ac0d2be",
      "recipient": "ana@example.com",
      "token": "AXY6uoEJbEnRu7c2...",
      "pixelUrl": "https://t.sendlander.com/o/AXY6uoEJbEnRu7c2....gif",
      "pixelHtml": "<img src=\"https://t.sendlander.com/o/AXY6uoEJbEnRu7c2....gif\" alt=\"\" width=\"1\" height=\"1\" style=\"display:block;width:1px;height:1px;border:0\" />",
      "html": "<html><body><img src=\"https://t.sendlander.com/o/...\" ...><p>Hi Ana,</p><p><a href=\"https://t.sendlander.com/c/AXY6uoEJbEnRu7c2.../0\">Choose a plan</a></p></body></html>"
    }
  ],
  "usage": { "included": 10000, "used": 1, "remainingIncluded": 9999, "overageEnabled": true }
}

Send emails[i].html to emails[i].recipient with whatever you already use. Keep the tracked email id: it is how you read results and match webhooks to your records, together with your own externalId, campaign, tags and metadata.

Send one template through your email platform

Email platforms usually send one template to a list and fill in each recipient’s details with merge fields. Set "output": "TEMPLATE" to get a single htmlTemplate in which every tracking URL contains {{mailslurp_tracking_token}}. Replace that placeholder with your platform’s merge field for a contact property, and store each recipient’s token from emails[] in that property before you send.

Get tracking URLs without HTML

When another system builds the email, leave out html. Each recipient then gets only a pixelUrl and ready-made pixelHtml for open tracking. "output": "URLS_ONLY" returns the tracking URLs without any HTML even when you include it.

MailSlurp tracks web links in <a> and <area> tags, Outlook VML buttons and the plain-text part when you send text. It leaves these links as they are and lists each one in untrackedLinks with a reason:

  • mailto:, tel: and sms: links, in-page anchors and relative links
  • links that contain merge tags such as {{ unsubscribe_url }}, so your platform can still fill them in
  • links with a data-mailslurp-notrack attribute, for example <a href="https://example.com/unsubscribe" data-mailslurp-notrack>
  • links matching excludeUrlPatterns, where * matches any characters and the pattern must cover the whole URL, for example ["*unsubscribe*", "https://example.com/account/*"]
  • links beyond the first 200 in one email

Set trackOpens or trackClicks to false to turn either off for the whole batch.

All request fields
Field Description
html The email HTML, up to 1 MiB. Leave it out to get open-tracking URLs only.
text Optional plain-text part. URLs in it are tracked like links.
subject Optional subject, shown with the results.
recipients 1 to 500 recipients, each with email and optional externalId and metadata.
campaign Optional campaign name for filtering and summaries.
tags Up to 50 tags.
metadata Key and value pairs returned with every result and webhook.
trackOpens, trackClicks Both default to true.
excludeUrlPatterns Links to leave untracked, with * as a wildcard.
output PER_RECIPIENT (default), TEMPLATE or URLS_ONLY.
inboxId, messageId The MailSlurp inbox that sends the email and the Message-ID it is sent with, for reply tracking.

Read the results

Check one tracked email

GET /email-tracking/emails/{id} returns the state, counts and timestamps for one recipient. GET /email-tracking/emails/{id}/events lists that email’s opens and clicks, newest first, with the classification, mail client and the link that was clicked.

curl https://api.mailslurp.com/email-tracking/emails/763aba81-096c-49d1-bb4d-67d36ac0d2be \
  -H "x-api-key: $MAILSLURP_API_KEY"

Find tracked emails and recipients

GET /email-tracking/emails lists tracked emails, newest first. Filter by campaign, tag, recipient, externalId, batchId, inboxId, state, since and before, and page with page and size.

For follow-ups, GET /email-tracking/recipients lists recipients by how far they got. Use state for the minimum stage reached and notState for a stage not yet reached. For example, ?campaign=trial-ending&state=OPENED&notState=CLICKED lists people who opened the trial email but did not click.

Compare campaigns

GET /email-tracking/summary counts tracked, opened, clicked and replied emails with their rates, grouped by CAMPAIGN, TAG, BATCH or DAY with groupBy. The summary keeps any open separate from human opens, so Apple’s prefetch does not inflate your open rate. GET /email-tracking/batches/{batchId} returns one create call with its links, template and engagement.

Follow every event

GET /email-tracking/events is an account-wide feed of opens and clicks in the order they happened. Without a cursor it starts 24 hours ago; since can go back up to 30 days. Narrow it with type=OPEN or type=CLICK and humanOnly=true, and pass the returned nextCursor to continue from where you left off. Events are kept for 400 days.

Stop or delete tracking

PATCH /email-tracking/emails/{id} updates a tracked email’s campaign, tags and metadata. Set "stopped": true to stop recording new opens and clicks for it. Its links keep redirecting.

DELETE /email-tracking/emails/{id} deletes the tracked email and its events. Links already sent keep redirecting, and the email still counts towards that month’s usage.

Get notified with webhooks

Tracking adds three webhook events:

  • TRACKED_EMAIL_OPENED for each open that looks like a person
  • TRACKED_LINK_CLICKED for each click not made by a security scanner
  • TRACKED_EMAIL_REPLIED when a reply arrives

Apple’s privacy prefetch and security scanners are recorded in the results but do not trigger webhooks. Create an account webhook for each event you want, in the MailSlurp dashboard or through the API:

curl -X POST https://api.mailslurp.com/webhooks \
  -H "x-api-key: $MAILSLURP_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "name": "Tracked email opens",
    "url": "https://example.com/hooks/mailslurp",
    "eventName": "TRACKED_EMAIL_OPENED"
  }'

A webhook on an inbox also receives these events for tracked emails created with that inboxId. Webhooks can be delivered more than once, so use trackingEventId to ignore a repeat. Webhooks covers signatures and retries, and reliable processing covers duplicates and replay.

Example click payload
{
  "eventName": "TRACKED_LINK_CLICKED",
  "webhookId": "0d3c6a8e-5f4b-4b1e-9c7a-2a1e8b6f4d20",
  "webhookName": "Tracked email clicks",
  "messageId": "b4a3f2e1-7c6d-4e5f-8a9b-0c1d2e3f4a5b",
  "trackedEmailId": "763aba81-096c-49d1-bb4d-67d36ac0d2be",
  "batchId": "6f0c7a43-1d2e-4c8b-9a51-2b7e0d3f9c11",
  "trackingEventId": "9f8e7d6c-5b4a-4392-8170-6f5e4d3c2b1a",
  "recipient": "ana@example.com",
  "externalId": "crm-123",
  "campaign": "trial-ending",
  "tags": ["lifecycle"],
  "metadata": {},
  "inboxId": null,
  "linkIndex": 0,
  "linkUrl": "https://example.com/upgrade",
  "occurredAt": "2026-12-03T01:15:42.000Z",
  "classification": "HUMAN",
  "client": "APPLE_MAIL",
  "humanLikely": true
}

The open payload has the same fields without linkIndex and linkUrl, and the reply payload adds replyEmailId. The JSON schemas are at opened, clicked and replied.

Track replies

Replies are recorded when the email is sent from a MailSlurp inbox and the reply comes back to that inbox. Pass the inbox as inboxId and the Message-ID header of the email you send as messageId when you create the tracked email. When a received email’s In-Reply-To matches that Message-ID, the tracked email moves to REPLIED and TRACKED_EMAIL_REPLIED fires with the reply’s email id. The reply is also delivered to the inbox as usual, with its own new-email webhooks. AI agents that send through MailSlurp’s MCP tools get reply tracking without these fields.

Track email from an AI agent

MailSlurp’s MCP server lets an AI agent add tracking, check results and follow up, using the same tracked emails as the API. After you connect your AI client, select Email tracking on the MailSlurp connection page. View email tracking lets the agent read results; Track emails also lets it create and update tracked emails, which counts towards your allowance. A connection made before tracking was available needs to be reconnected to add these permissions.

Tool What the agent can do
mailslurp.track_email Add tracking to an email for up to 25 recipients, within a number of tracked emails you authorize
mailslurp.get_tracked_email, mailslurp.list_tracked_emails Check a tracked email or find tracked emails
mailslurp.list_tracking_recipients Find recipients who opened, clicked or did neither
mailslurp.list_tracking_events Read opens and clicks as they happen
mailslurp.get_tracking_summary Compare campaigns, tags, batches or days
mailslurp.update_tracked_email Change tags, campaign or metadata, or stop tracking
mailslurp.get_tracking_usage Check the allowance, overage and spend cap

When an agent sends or replies from a MailSlurp inbox, the send and reply tools can turn on open and click tracking for that message and record replies to it.

Allowance, overage and limits

Each plan includes a monthly number of tracked emails. One tracked email is one recipient of one create call, whether or not it is opened.

Plan Tracked emails included each month
Free 1,000
Starter 2,500
Pro 10,000
Team 50,000
Enterprise 50,000

Package plans include 10,000 with Messaging, 2,500 with Email Quality and 10,000 with both. On a paid plan, tracked emails beyond the allowance are billed per 1,000 each month: USD 2.00 for the first 50,000, USD 1.00 up to 500,000 and USD 0.50 after that, with equivalent prices in the other plan currencies. Free accounts stop at their included 1,000.

Every create response includes a usage block, and GET /email-tracking/usage returns the allowance, the amount used and any overage this period. To limit spending, set a monthly maximum, including the allowance, with PUT /email-tracking/usage/cap and { "maxTrackedEmails": 50000 }; send null to remove it. Setting the cap needs an account admin or the billing permission. When a create call would pass the allowance or cap, it is refused with HTTP 426 and a code that says which: W_426_TRACKING_FREE_LIMIT_REACHED, W_426_TRACKING_ALLOWANCE_REACHED, W_426_TRACKING_SPEND_CAP_REACHED, or W_426_TRACKING_BATCH_TOO_LARGE_FOR_REMAINING when a smaller batch would still fit.

Each create call takes up to 500 recipients and 1 MiB of HTML, and tracks up to 200 links per email.

Privacy

MailSlurp records the time, the user agent and a shortened network address for each open and click: the address is cut to its /24 network for IPv4 or /48 for IPv6 before it is stored, and full addresses are never kept. Tracking sets no cookies, and the tracking domain asks search engines not to crawl it. Opens depend on the recipient’s mail app loading images, so a missing open does not mean the email was not read; clicks and replies are stronger signals.

Tell your recipients about tracking in your privacy notice where your local rules require it, and use trackOpens: false, data-mailslurp-notrack or excludeUrlPatterns for messages or links that should not be tracked.