Metrics
Retrieve engagement analytics for your organisation, sequences, and templates.
The Metrics API provides engagement analytics across your organisation. Query aggregate statistics like sends, deliveries, opens, clicks, bounces, and complaints over configurable time periods.
Tenant-wide metrics
GET /api/metricsReturns aggregate metrics for your entire organisation.
Query parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
period | string | No | Aggregation period: hour, day, week, or month. Defaults to day. |
from | string | No | Start date in ISO 8601 format (e.g. 2025-09-01T00:00:00.000Z). |
to | string | No | End date in ISO 8601 format. Defaults to now. |
Response
{
"period": "day",
"from": "2025-09-01T00:00:00.000Z",
"to": "2025-09-15T23:59:59.999Z",
"totals": {
"sent": 12500,
"delivered": 12100,
"opened": 4800,
"clicked": 1200,
"bounced": 350,
"complained": 50
},
"timeseries": [
{
"timestamp": "2025-09-01T00:00:00.000Z",
"sent": 850,
"delivered": 830,
"opened": 320,
"clicked": 80,
"bounced": 18,
"complained": 2
},
{
"timestamp": "2025-09-02T00:00:00.000Z",
"sent": 920,
"delivered": 900,
"opened": 350,
"clicked": 95,
"bounced": 15,
"complained": 5
}
]
}Examples
curl "https://api.kraiter.com/api/metrics?period=day&from=2025-09-01T00:00:00.000Z&to=2025-09-15T23:59:59.999Z" \
-H "Authorization: Bearer YOUR_API_KEY"const metrics = await kraiter.metrics.get({
period: "day",
from: "2025-09-01T00:00:00.000Z",
to: "2025-09-15T23:59:59.999Z",
});
console.log(metrics.totals.delivered); // 12100
console.log(metrics.timeseries.length); // 15 data pointsSequence metrics
GET /api/metrics/sequences/:idReturns metrics for a specific sequence.
Path parameters
| Parameter | Type | Description |
|---|---|---|
id | string | The sequence ID. |
Query parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
period | string | No | Aggregation period: hour, day, week, or month. Defaults to day. |
from | string | No | Start date in ISO 8601 format. |
to | string | No | End date in ISO 8601 format. Defaults to now. |
Response
Same format as tenant-wide metrics, scoped to the specified sequence.
Errors
| Code | Description |
|---|---|
NOT_FOUND | No sequence with this ID exists. |
Examples
curl "https://api.kraiter.com/api/metrics/sequences/onboarding?period=week" \
-H "Authorization: Bearer YOUR_API_KEY"const metrics = await kraiter.metrics.sequence("onboarding", {
period: "week",
});Template metrics
GET /api/metrics/templates/:idReturns metrics for a specific template across all sends (both transactional and sequence-based).
Path parameters
| Parameter | Type | Description |
|---|---|---|
id | string | The template ID. |
Query parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
period | string | No | Aggregation period: hour, day, week, or month. Defaults to day. |
from | string | No | Start date in ISO 8601 format. |
to | string | No | End date in ISO 8601 format. Defaults to now. |
Response
Same format as tenant-wide metrics, scoped to the specified template.
Errors
| Code | Description |
|---|---|
NOT_FOUND | No template with this ID exists. |
Examples
curl "https://api.kraiter.com/api/metrics/templates/welcome-email?period=month&from=2025-06-01T00:00:00.000Z" \
-H "Authorization: Bearer YOUR_API_KEY"const metrics = await kraiter.metrics.template("welcome-email", {
period: "month",
from: "2025-06-01T00:00:00.000Z",
});Metric fields
All metrics responses include these fields in the totals object and each timeseries entry:
| Field | Description |
|---|---|
sent | Total emails sent (handed off to SES). |
delivered | Emails confirmed delivered to the recipient's mail server. |
opened | Unique opens (tracked via pixel). |
clicked | Unique clicks on tracked links. |
bounced | Hard and soft bounces combined. |
complained | Spam complaints received via feedback loops. |
Derived rates
The API returns raw counts. To calculate rates, divide by the relevant base:
| Rate | Formula |
|---|---|
| Delivery rate | delivered / sent |
| Open rate | opened / delivered |
| Click rate | clicked / delivered |
| Bounce rate | bounced / sent |
| Complaint rate | complained / delivered |
Aggregation periods
| Period | Description |
|---|---|
hour | One data point per hour. Best for real-time monitoring. |
day | One data point per day. Default. |
week | One data point per week (starting Monday). |
month | One data point per calendar month. |
Choose a period appropriate for your date range. Using hour with a 90-day range will return a large number of data points.