Emails
Report the transactional emails your back end sends (order confirmations, password resets, invoices…) through your own SMTP server or sending service. They then appear on the Email Marketing page of the app.
Requests are authenticated with a project's secret key: see Server API.
Report email events
POST https://tracker.sublimanalytics.com/api/v2/server/emails
Authorization: Bearer sk_...
Content-Type: application/json
curl https://tracker.sublimanalytics.com/api/v2/server/emails \
-H "Authorization: Bearer $SUBLIM_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"events": [
{
"id": "<a1b2c3@mail.example.com>",
"event": "sent",
"template": "order-confirmation",
"subject": "Your order #1042",
"recipient": "jane@example.com",
"timestamp": "2026-10-17T09:30:00Z",
"provider": "smtp"
}
]
}'
The body holds an events array of 1 to 500 items. One item is one thing that happened to one message: it was sent, delivered, opened…
Fields
| Field | Type | Description |
|---|---|---|
id | string | Required. Up to 255 characters. The message's ID: its SMTP Message-ID, or your own ID. The same id with the same event is stored once, so retrying is safe. |
event | string | Required. sent, delivered, opened, clicked, bounced, spam or unsubscribed. |
template | string | Up to 100 characters. A readable key for the type of email, such as order-confirmation. Groups the messages in the Templates table. |
subject | string | Up to 255 characters. The email's subject. |
recipient | string | The recipient's email address. Hashed (SHA-256 of the lower-cased address) before storage: Sublim never stores it in clear and only uses it for counting. |
timestamp | string | RFC 3339 date and time, such as 2026-10-17T09:30:00Z. Defaults to the time the request is received. Accepted from 7 days in the past to 5 minutes in the future. |
provider | string | [a-z0-9_-], 1 to 30 characters. A free label for your sending service: smtp, ses, postfix… Defaults to api. |
Pick stable template keys
Use the same template for every email of a kind, whatever its language or content: order-confirmation, not Your order #1042. That is what the Templates table is grouped by.
Response
| Status | Body | Meaning |
|---|---|---|
202 | {"accepted": 2, "rejected": []} | Every item was accepted. |
202 | {"accepted": 1, "rejected": [{"index": 1, "error": "…"}]} | Partial success: invalid items were skipped, the valid ones kept. |
400 | {"accepted": 0, "rejected": [{"index": 0, "error": "…"}]} | No item was accepted. |
index is the item's position in events, starting at 0. Fix the rejected items and send only those again: the accepted ones are already stored.
Other errors (401, 413, 429, 500) are listed in Errors.
How events show up in the app
| Metric on the Email Marketing page | Computed from |
|---|---|
| Delivered | Messages reported sent or delivered, minus those reported bounced. |
| Opens, clicks | opened and clicked events, only if you send them. |
- If your SMTP server only tells you it accepted the message, send
sent. If you later learn it was delivered, sendingdeliveredtoo doesn't count it twice. - An SMTP server doesn't know about opens and clicks. Send
openedandclickedonly if something on your side tracks them. - Links tagged with
utm_medium=emailalready show up as Email traffic in Sublim's acquisition reports, with or without this API.
Delete email events
DELETE https://tracker.sublimanalytics.com/api/v2/server/emails
Authorization: Bearer sk_...
Content-Type: application/json
curl -X DELETE https://tracker.sublimanalytics.com/api/v2/server/emails \
-H "Authorization: Bearer $SUBLIM_API_KEY" \
-H "Content-Type: application/json" \
-d '{"ids": ["<a1b2c3@mail.example.com>", "<d4e5f6@mail.example.com>"]}'
The body holds an ids array of 1 to 1,000 message IDs. Every event of those messages that was sent through the API is removed. Data synced from Brevo, Mailjet or another connected tool is never touched.
| Status | Body | Meaning |
|---|---|---|
202 | {"requested": 2} | Removal scheduled for that many IDs. |
Removal is asynchronous: it takes effect within about a minute. DELETE requests are limited to 60 per minute per project.