Tracking · Email API

Track your API emails

Add a few fields to the send you already make. You get opens, clicks, a one-click unsubscribe and every recipient saved as a contact — nothing to create first.

POST mail.sendcorex.com/v3.0/send

The fields

All optional. Add them next to to, from, subject and body — use only the ones you need.

trackstring

The name these emails are grouped under in Analytics.

  • Created on the first send — nothing to set up before.
  • Same name, same track: case and extra spaces don't matter ("Welcome Email" = "welcome email").
  • Up to 100 characters. Use one per kind of email, like "Welcome" or "Invoice".
"track": "Weekly Newsletter"
track_opensboolean

Count who opened the email.

  • Adds an invisible pixel to the HTML.
  • Automatic opens (Apple Mail privacy, security scanners) are counted apart — they never inflate your open rate.
  • Without track, the open is still saved on the contact, just not grouped in Analytics.
"track_opens": true
track_clicksboolean

Count who clicked each link.

  • Links in the body pass through Sendcorex and redirect instantly to your page.
  • You see the top links and which contacts clicked them.
"track_clicks": true
unsubscribeboolean

Use the Sendcorex unsubscribe link.

  • Put [unsubscribe] in the body (or [unsubscribe_url], [unsub_url], [opt_out_url]). Each recipient gets a personal link.
  • Also adds the List-Unsubscribe and one-click headers Gmail and Yahoo ask for. A List-Unsubscribe you send yourself is ignored.
  • Whoever unsubscribes stops getting emails from your whole account: campaigns, API and SMTP.
  • true without the placeholder returns MISSING_UNSUBSCRIBE_PLACEHOLDER and nothing is sent.
"unsubscribe": true
contact_liststring

The contact list where recipients are saved.

  • Created if it doesn't exist yet. Without it, recipients go to "API Contacts".
  • Recipients are saved only when you use track, track_opens, track_clicks, unsubscribe or contact_list. A plain send saves nothing.
  • Someone already in your contacts is updated, never duplicated.
"contact_list": "Newsletter"

Example

A newsletter with everything on.

curl -X POST https://mail.sendcorex.com/v3.0/send \
  -H "Authorization: Bearer $SENDCOREX_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
  "to": "subscriber@example.com",
  "from": "news@yourdomain.com",
  "sender_name": "The Weekly",
  "subject": "Issue #42",
  "body": "<p>This week in tech...</p><a href=\"[unsubscribe]\">Unsubscribe</a>",
  "track": "Weekly Newsletter",
  "track_opens": true,
  "track_clicks": true,
  "unsubscribe": true,
  "contact_list": "Newsletter"
}'

Where you see the results

Nothing to configure. The first email with a track already shows up in your dashboard.

Analytics

How many opened and clicked

Every track is a row in the Sends table, next to your campaigns. Open it for the full report: activity by hour, best time to send, providers, devices, countries and top links.

Open Analytics

Contacts

Every recipient, saved

Recipients are saved in the contact list you choose (or "API Contacts"). Each contact keeps its history: received, opened, clicked, bounced, unsubscribed.

Open Contacts

People

Who opened, who clicked

In Analytics, open your track and press "Who opened", "Who clicked" or "Unsubscribed". Your contacts open already filtered — export, tag or add them to a list.

See who opened

Response

The usual send response, plus what tracking did.

200 OK
{
  "success": true,
  "code": "EMAIL_QUEUED_SUCCESS",
  "id": "3f2a1b4c-8e9d-4f7a-b2c3-1a2b3c4d5e6f",
  "recipients": 1,
  "track": "Weekly Newsletter",
  "track_id": "6ad757c8aaf59feb",
  "contact_list": "Newsletter"
}
track

The track name used, after trimming spaces. Absent when the email has no track.

track_id

Stable ID of the track: the same name always gives the same ID.

contact_list

The list the recipients were saved to. Absent when nothing is saved.

warnings

What we adjusted without failing the send: legacy [[Name]] found, track limit reached.

CodeHTTPWhen
MISSING_UNSUBSCRIBE_PLACEHOLDER400unsubscribe is true but the body has no [unsubscribe]. Nothing is sent.
UNSUBSCRIBE_UNAVAILABLE503Unsubscribe is temporarily down. Nothing is sent — try again in a moment.

Good to know

Any spelling works

sender_name, senderName and SENDER-NAME are the same field: case, _ and - don't matter. Yes/no fields accept true, 1 or "true".

500 tracks per account

Past the limit the email still goes out, just without a track, and the response says so in warnings.

Many recipients

With up to 50 addresses in to, each one gets its own tracking and its own unsubscribe link.

Scheduled emails

scheduled_at works with every field on this page — tracking starts when the email goes out.

Legacy

The old [[Name]] tag

Emails that still carry the tag keep working. New integrations should use the fields above.

Anywhere in the body
<p>Welcome aboard!</p>
<p>[[CRM Welcome List]]</p>

What it does

The tag is removed from the email. "CRM Welcome List" becomes the track and the contact list, with opens and clicks on and unsubscribe off.

Mixing both

If you also send the new fields, they win: the tag only fills what you left out.

Deprecated

Accounts still using the tag get an email, at most once a week, asking to switch. It keeps working until then.

Old reference codes

A code like [[7CK-JDL-Y1L]] is now read as a track with that name. The old tracking endpoints were removed — everything lives in Analytics.