Trackify.email

Email Tracking API Tutorial: Track Opens and Clicks from Your Own App (Trackify API)

Add open and click tracking to your app with the Trackify REST API: create trackers, generate pixels and tracked links, fetch opens, and receive signed webhooks. Code examples included.

Trackify email tracking API: an email.opened webhook with a verified signature

The Trackify API lets your own app create tracking pixels and tracked links, read every open and click, and get notified in real time by webhook. You send emails however you like — your app, your CRM, your SMTP — and Trackify does the tracking. This tutorial takes you from API key to working webhook with copy-paste examples.

The API is available on paid plans (Pro, Growth, Enterprise). Full reference: API documentation.

What you'll build: a tracker per campaign or customer, a pixel per recipient, a tracked call-to-action link, and an endpoint that receives email.opened and email.clicked events with signature verification.

Step 1: Create an API key

  1. Log in and go to Account → API Keys.
  2. Click Create key, give it a name (e.g. "CRM production") and copy it. It looks like tk_live_ followed by 48 characters.
  3. Store it as a secret (environment variable). It's shown only once.

Every request uses the key in the Authorization header (or X-API-Key). Base URL: https://api.trackify.email/v1.

curl https://api.trackify.email/v1/me \
  -H "Authorization: Bearer $TRACKIFY_KEY"

/me returns your account, plan, daily request limit and how many requests you've used today — a good first test.

Step 2: Create a tracker

A tracker groups the emails you want to report on together — one campaign, one customer, one sequence.

curl -X POST https://api.trackify.email/v1/trackers \
  -H "Authorization: Bearer $TRACKIFY_KEY" \
  -H "Content-Type: application/json" \
  -d '{"name": "Onboarding – week 1", "description": "Welcome sequence"}'

The response includes the tracker id. List trackers with GET /v1/trackers, rename or pause one with PATCH /v1/trackers/:id ({"active": false}), and remove it with DELETE.

Step 3: Get a tracking pixel for each recipient

Ask for the pixel with the recipient's address so opens are attributed to them:

curl "https://api.trackify.email/v1/trackers/TRACKER_ID/[email protected]" \
  -H "Authorization: Bearer $TRACKIFY_KEY"

You get the pixel url and ready-to-use html. Add the HTML at the end of the email body before sending. Since the pixel URL format is stable, you can also build it yourself for bulk sends:

https://tracker.trackify.email/o/TRACKER_ID.gif?e=<url-encoded recipient email>
curl -X POST https://api.trackify.email/v1/trackers/TRACKER_ID/links \
  -H "Authorization: Bearer $TRACKIFY_KEY" \
  -H "Content-Type: application/json" \
  -d '{"url": "https://yourapp.com/get-started", "label": "CTA button"}'

The response contains tracked_url (https://tracker.trackify.email/l/<code>) and tracked_url_template with an ?e={recipient_email} placeholder. Replace the placeholder per recipient to know who clicked. Creating the same URL twice returns the existing link instead of a duplicate.

Step 5: Read opens, clicks and stats

curl "https://api.trackify.email/v1/opens?tracker_id=TRACKER_ID&since=2026-11-01T00:00:00Z&limit=100" \
  -H "Authorization: Bearer $TRACKIFY_KEY"

Each event looks like this:

{
  "id": "…",
  "type": "open",
  "tracker_id": "…",
  "recipient": "[email protected]",
  "at": "2026-11-26T09:41:12Z",
  "location": { "country": "France", "country_code": "FR", "city": "Paris" },
  "device": { "type": "mobile", "os": "iOS", "browser": "Apple Mail" },
  "via_proxy": false
}
  • GET /v1/clicks works the same way and adds the clicked url.
  • Filter by tracker_id, email, since and until; page with limit and before.
  • GET /v1/stats?tracker_id=…&days=30 returns totals and a daily series for charts.

via_proxy: true means the open came through Apple Mail Privacy Protection or an image proxy such as Gmail's. Location is null in that case because it would be the proxy's, not the reader's. Why this matters: Apple MPP and the Gmail proxy explained.

Step 6: Receive opens and clicks in real time with webhooks

Polling works, but webhooks are better: Trackify calls your endpoint seconds after each event.

curl -X POST https://api.trackify.email/v1/webhooks \
  -H "Authorization: Bearer $TRACKIFY_KEY" \
  -H "Content-Type: application/json" \
  -d '{"url": "https://yourapp.com/hooks/trackify", "events": ["open", "click"], "tracker_id": "TRACKER_ID"}'

The response includes a secret starting with whsec_ — store it now, it's needed to verify requests. Leave out tracker_id to receive events from all your trackers.

Your endpoint receives JSON like:

{
  "id": "…",
  "type": "email.opened",
  "created_at": "2026-11-26T09:41:12Z",
  "tracker": { "id": "…", "name": "Onboarding – week 1" },
  "recipient": "[email protected]",
  "url": null,
  "location": { "country": "France", "city": "Paris" },
  "device": { "type": "mobile", "os": "iOS", "browser": "Apple Mail" },
  "via_proxy": false
}

Verify the signature (Node.js)

Each request has an X-Trackify-Signature header: t=<unix timestamp>,v1=<hex HMAC-SHA256 of "<t>.<raw body>" using your secret>.

import crypto from "node:crypto";
import express from "express";

const app = express();
app.post("/hooks/trackify", express.raw({ type: "application/json" }), (req, res) => {
  const header = req.get("X-Trackify-Signature") || "";
  const { t, v1 } = Object.fromEntries(header.split(",").map((p) => p.split("=")));
  const expected = crypto.createHmac("sha256", process.env.TRACKIFY_WEBHOOK_SECRET)
    .update(`${t}.${req.body.toString("utf8")}`).digest("hex");
  const fresh = Math.abs(Date.now() / 1000 - Number(t)) < 300;
  if (!fresh || !v1 || !crypto.timingSafeEqual(Buffer.from(v1), Buffer.from(expected))) {
    return res.status(401).end();
  }
  const event = JSON.parse(req.body);
  // e.g. mark the lead as engaged in your CRM
  console.log(event.type, event.recipient);
  res.status(200).end();
});
app.listen(3000);

Always verify against the raw body (not re-serialised JSON), reject old timestamps, and answer with a 2xx quickly — do slow work in a background job.

Limits and good practices

PlanAPI requests / dayAPI keys & webhooks
Pro1,0002
Growth10,0005
Enterprise100,00020
  • Prefer webhooks over polling to save requests.
  • Cache tracker IDs; build pixel URLs locally for large sends instead of calling /pixel per recipient.
  • Keep keys server-side only — never in browser or mobile app code.
  • Errors return JSON with a code and message (e.g. 401 unauthorized, 422 validation_error, 429 when the daily limit is reached).

FAQ

Is there a free email tracking API?

The API is included in Trackify's paid plans starting with Pro. The free plan includes the dashboard, the extension and tracked links, without API access.

Can I use the API with my own SMTP or email service?

Yes. Trackify only provides the tracking. Add the pixel and tracked links to emails sent from any system — your app, SendGrid, Amazon SES, your CRM or Trackify Sender.

How do I know which recipient opened the email?

Add the recipient's address to the pixel (?e=) and to tracked links. Each event then includes recipient.

Are webhooks retried if my server is down?

Make sure your endpoint is available and returns a 2xx quickly. As a safety net, use GET /v1/opens and /v1/clicks with since to catch up on any events you missed.


Ready to build? Start with Trackify Pro and create your first API key in under a minute, or read the full API reference.

More from the Trackify blog

Start tracking emails free