Track email engagement including opens, clicks, replies, and attachments. Works with public webhooks (no authentication) for tracking pixels and Power Automate integrations.
---
https://app.datapublisher.io/api/track
---
Most tracking endpoints are PUBLIC (no authentication required) to allow email clients and Power Automate to call them. Admin/user-facing endpoints require JWT authentication.
---
The Email Tracking API provides:
Key Features:
---
Record when an email is opened via tracking pixel.
Endpoint: GET /open/:trackingId
Parameters:
trackingId (path, required): Unique tracking identifier
Response (200 OK):
image/gif
Example URL:
https://app.datapublisher.io/api/track/open/abc123-def456-ghi789
How It Works:

Notes:
---
Record when a link in an email is clicked.
Endpoint: GET /click/:trackingId
Parameters:
trackingId (path, required): Unique tracking identifier
redirect (query, required): Original URL to redirect to (URL-encoded)
Response (302 Found):
Example URL:
https://app.datapublisher.io/api/track/click/abc123?redirect=https%3A%2F%2Fexample.com%2Fproduct
How It Works:
https://example.com/product
https://app.datapublisher.io/api/track/click/TRACKING_ID?redirect=https%3A%2F%2Fexample.com%2Fproduct
Notes:
---
Mark an email as replied (called by Power Automate flow).
Endpoint: POST /reply/:trackingId
Parameters:
trackingId (path, required): Unique tracking identifier
Request Body:
{
"replyMessage": "Optional reply message content",
"attachmentCount": 2
}
Response (200 OK):
{
"success": true,
"message": "Reply tracked successfully"
}
Power Automate Integration:
Trigger: When new email arrives
Condition: Is reply to tracked email
Action: HTTP POST to /api/track/reply/{trackingId}
Body: {
"replyMessage": @{body('Get_email')},
"attachmentCount": @{length(attachments)}
}
---
Upload an attachment from an email reply (Power Automate webhook).
Endpoint: POST /reply-attachment/:trackingId
Headers:
Content-Type: multipart/form-data
Form Data:
file (file, required): Attachment file
Response (200 OK):
{
"success": true,
"attachmentId": "uuid",
"fileName": "document.pdf",
"fileSize": 125000,
"uploadedDateTime": "2026-02-12T10:30:00Z"
}
Error Responses:
400 Bad Request:
{
"success": false,
"message": "No file uploaded"
}
---
Record that an automated reminder was sent (Power Automate webhook).
Endpoint: POST /reminder-sent/:trackingId
Parameters:
trackingId (path, required): Unique tracking identifier
Response (200 OK):
{
"success": true,
"message": "Reminder marked as sent"
}
---
Retrieve tracking details for a specific email.
Endpoint: GET /status/:trackingId
Headers:
Authorization: Bearer
Response (200 OK):
{
"success": true,
"tracking": {
"trackingId": "abc123-def456-ghi789",
"campaignId": "campaign-uuid",
"recipientEmail": "customer@example.com",
"openCount": 3,
"clickCount": 1,
"replied": true,
"reminderSent": false,
"firstOpenAt": "2026-02-10T09:15:00Z",
"lastOpenAt": "2026-02-12T08:30:00Z",
"firstClickAt": "2026-02-10T09:20:00Z",
"repliedAt": "2026-02-11T14:00:00Z",
"sentAt": "2026-02-10T09:00:00Z"
},
"opens": [
{
"openedAt": "2026-02-10T09:15:00Z",
"ipAddress": "192.168.1.1",
"userAgent": "Mozilla/5.0..."
}
],
"clicks": [
{
"clickedAt": "2026-02-10T09:20:00Z",
"clickedUrl": "https://example.com/product",
"ipAddress": "192.168.1.1"
}
],
"replyAttachments": [
{
"fileName": "signed-contract.pdf",
"fileSize": 125000,
"uploadedAt": "2026-02-11T14:05:00Z"
}
]
}
---
Aggregate tracking statistics for an entire campaign.
Endpoint: GET /campaign/:campaignId
Headers:
Authorization: Bearer
Response (200 OK):
{
"success": true,
"campaign": {
"campaignId": "campaign-uuid",
"campaignName": "Welcome Campaign",
"sentCount": 150,
"openedCount": 98,
"clickedCount": 45,
"repliedCount": 12,
"openRate": 65.3,
"clickRate": 30.0,
"replyRate": 8.0,
"bounceCount": 2,
"unsubscribeCount": 1,
"averageTimeToOpen": "2 hours 15 minutes",
"averageTimeToClick": "2 hours 45 minutes"
},
"topLinks": [
{
"url": "https://example.com/product",
"clicks": 30
},
{
"url": "https://example.com/pricing",
"clicks": 15
}
],
"engagementTimeline": [
{
"date": "2026-02-10",
"opens": 45,
"clicks": 20,
"replies": 3
}
]
}
---
Download a file attached to an email reply.
Endpoint: GET /reply-attachment/:attachmentId
Headers:
Authorization: Bearer
Response (200 OK):
attachment; filename="original-name.pdf"
---
Hello {{FirstName}},
Welcome to our service!
View Product
---
Trigger: When a new email arrives (Office 365 Outlook)
Condition: Is reply (In-Reply-To header matches tracked email)
Action: HTTP POST
https://app.datapublisher.io/api/track/reply/{trackingId}
{
"replyMessage": "@{body('Get_email')}",
"attachmentCount": "@{length(attachments)}"
}
For Each Attachment:
https://app.datapublisher.io/api/track/reply-attachment/{trackingId}
---
---
---
| Status Code | Description |
|-------------|-------------|
| 400 | Missing redirect URL or file |
| 401 | Unauthorized - invalid JWT (authenticated endpoints only) |
| 404 | Tracking ID not found |
| 413 | Attachment too large (>25 MB) |
| 500 | Internal server error |
---
---