See how each version did
GET/v1/templates/{id}/stats
For each version sent in the last days days (1 to 90, default 30): sent, delivered, bounced, complained, and unique opens and clicks when tracking is on for the sending domain. Use it to compare the versions of a split test.
Required scope: templates:manage
Parameters
| Name | In | Description |
|---|---|---|
idrequired | path | The template id. |
daysoptional | query | Look back this many days, 1 to 90. Default 30. |
Example
curl -X GET 'https://api.sendsend.email/v1/templates/ID/stats' \
-H "Authorization: Bearer $SENDSEND_API_KEY"Response 200
{
"object": "template_stats",
"template_id": "welcome",
"days": 30,
"split": null,
"versions": [
{
"version": 2,
"sent": 480,
"delivered": 471,
"bounced": 9,
"complained": 0,
"opened": 301,
"clicked": 88,
"delivery_rate": 0.98,
"open_rate": 0.64,
"click_rate": 0.19
}
]
}Errors
| Status | Code | When |
|---|---|---|
| 404 | not_found | No such resource in this project. |
| 401 | unauthorized | The API key is missing, invalid or revoked. |
| 403 | forbidden | The key does not have the scope this endpoint needs. |
Every error has the same shape. See Errors.