Get template analytics
POST
/v1/channels/{channelID}/analytics/templatesAuthorization
bearerAuthbearerAuthrequiredor
apiKeyAuthapiKeyAuthrequiredPath parameters
channelIDstringrequiredChannel ID
Request body
requiredapplication/jsonendinteger<int64>requiredEnd timestamp (Unix epoch)
metric_typesstring[] | nullMetric types to retrieve
startinteger<int64>requiredStart timestamp (Unix epoch)
template_idsstring[] | nullrequiredTemplate IDs (1-10)
min items 1 · max items 10
Responses
200OK
dataTemplateAnalyticsDataItem[] | nullShow propertiesHide properties
Array of
TemplateAnalyticsDataItemdata_pointsTemplateAnalyticsPointItem[] | nullShow propertiesHide properties
Array of
TemplateAnalyticsPointItemclickedTemplateClickedItem[] | nullShow propertiesHide properties
Array of
TemplateClickedItembutton_contentstringcountinteger<int64>typestringcostTemplateCostMetricItem[] | nullShow propertiesHide properties
Array of
TemplateCostMetricItemtypestringvaluenumber<double>deliveredinteger<int64>endinteger<int64>readinteger<int64>repliedinteger<int64>sentinteger<int64>startinteger<int64>template_idstringgranularitystringproduct_typestring400Bad Request
errorErrorBodyrequiredShow propertiesHide properties
codestringrequireddetailsErrorDetail[] | nullShow propertiesHide properties
Array of
ErrorDetailcodestringfieldstringlocationstringmessagestringrequiredmessagestringrequiredrequest_idstring401Unauthorized
errorErrorBodyrequiredShow propertiesHide properties
codestringrequireddetailsErrorDetail[] | nullShow propertiesHide properties
Array of
ErrorDetailcodestringfieldstringlocationstringmessagestringrequiredmessagestringrequiredrequest_idstring403Forbidden
errorErrorBodyrequiredShow propertiesHide properties
codestringrequireddetailsErrorDetail[] | nullShow propertiesHide properties
Array of
ErrorDetailcodestringfieldstringlocationstringmessagestringrequiredmessagestringrequiredrequest_idstring404Not Found
errorErrorBodyrequiredShow propertiesHide properties
codestringrequireddetailsErrorDetail[] | nullShow propertiesHide properties
Array of
ErrorDetailcodestringfieldstringlocationstringmessagestringrequiredmessagestringrequiredrequest_idstring422Unprocessable Entity
errorErrorBodyrequiredShow propertiesHide properties
codestringrequireddetailsErrorDetail[] | nullShow propertiesHide properties
Array of
ErrorDetailcodestringfieldstringlocationstringmessagestringrequiredmessagestringrequiredrequest_idstring500Internal Server Error
errorErrorBodyrequiredShow propertiesHide properties
codestringrequireddetailsErrorDetail[] | nullShow propertiesHide properties
Array of
ErrorDetailcodestringfieldstringlocationstringmessagestringrequiredmessagestringrequiredrequest_idstringRequest
curl -X POST "/v1/channels/string/analytics/templates" \
-H "Content-Type: application/json" \
-d '{
"end": 0,
"metric_types": [
"string"
],
"start": 0,
"template_ids": [
"string"
]
}'const response = await fetch("/v1/channels/string/analytics/templates", {
method: "POST",
headers: {
"Content-Type": "application/json"
},
body: JSON.stringify({
"end": 0,
"metric_types": [
"string"
],
"start": 0,
"template_ids": [
"string"
]
})
});import requests
response = requests.post(
"/v1/channels/string/analytics/templates",
headers={
"Content-Type": "application/json"
},
json={
"end": 0,
"metric_types": [
"string"
],
"start": 0,
"template_ids": [
"string"
]
},
)Response
{
"data": [
{
"data_points": [
{
"clicked": [
{
"button_content": "string",
"count": 0,
"type": "string"
}
],
"cost": [
{
"type": "string",
"value": 0
}
],
"delivered": 0,
"end": 0,
"read": 0,
"replied": 0,
"sent": 0,
"start": 0,
"template_id": "string"
}
],
"granularity": "string",
"product_type": "string"
}
]
}{
"error": {
"code": "string",
"details": [
{
"code": "string",
"field": "string",
"location": "string",
"message": "string"
}
],
"message": "string",
"request_id": "string"
}
}{
"error": {
"code": "string",
"details": [
{
"code": "string",
"field": "string",
"location": "string",
"message": "string"
}
],
"message": "string",
"request_id": "string"
}
}{
"error": {
"code": "string",
"details": [
{
"code": "string",
"field": "string",
"location": "string",
"message": "string"
}
],
"message": "string",
"request_id": "string"
}
}{
"error": {
"code": "string",
"details": [
{
"code": "string",
"field": "string",
"location": "string",
"message": "string"
}
],
"message": "string",
"request_id": "string"
}
}{
"error": {
"code": "string",
"details": [
{
"code": "string",
"field": "string",
"location": "string",
"message": "string"
}
],
"message": "string",
"request_id": "string"
}
}{
"error": {
"code": "string",
"details": [
{
"code": "string",
"field": "string",
"location": "string",
"message": "string"
}
],
"message": "string",
"request_id": "string"
}
}