get
https://partner.gupshup.io/partner/bizgate/app//template-analytics/metrics
Returns time-series delivery, read, and click counts for one or more templates on an app across the requested date range and granularity.
Request parameters
Path parameters
| Key | Description | Values | Data Type | Required/Optional |
|---|---|---|---|---|
| appId | Identifier of the WhatsApp app the call acts on. | 6f414190-d45c-4671-bca1-fb6c3018cb13 | String | Required |
Query parameters
| Key | Description | Values | Data Type | Required/Optional |
|---|---|---|---|---|
| start | Start of the reporting window, as a Unix timestamp in seconds. | 1720203204 | String | Optional |
| end | End of the reporting window, as a Unix timestamp in seconds. | 1721088316 | String | Optional |
| granularity | Bucket size for the returned metrics. | DAILY | String | Optional |
| metric_types | Comma-separated metric types to return. | SENT,DELIVERED | String | Optional |
| template_ids | Comma-separated template identifiers to report on. | — | String | Required |
| limit | Maximum number of records to return in one page. | 20 | Integer | Optional |
| product_type | Product the metrics are reported for. | CLOUD_API | String | Optional |
| use_waba_timezone | Whether the window is interpreted in the WABA's timezone. | true | Boolean | Optional |
Sample cURL — Get template analytics.
curl --request GET \
--url 'https://partner.gupshup.io/partner/bizgate/app/6f414190-d45c-4671-bca1-fb6c3018cb13/template-analytics/metrics?start=1720203204&end=1721088316&granularity=DAILY&metric_types=SENT,DELIVERED&template_ids=<template_ids>&limit=20&product_type=CLOUD_API&use_waba_timezone=true' \
--header 'Authorization: Bearer <UT>' \
--header 'Accept: application/json'Sample success response (200)
{
"status": "success",
"data": {
"data": [
{
"granularity": "DAILY",
"product_type": "cloud_api",
"data_points": [
{
"template_id": "1421988012088524",
"start": 1718064000,
"end": 1718150400,
"sent": 1,
"delivered": 1,
"read": 1,
"cost": [
{
"type": "amount_spent",
"value": 0.01
},
{
"type": "cost_per_delivered",
"value": 0.01
}
]
},
{
"template_id": "2632273056924580",
"start": 1718064000,
"end": 1718150400,
"sent": 1,
"delivered": 1,
"read": 1,
"clicked": [
{
"type": "quick_reply_button",
"button_content": "Contact Support",
"count": 108
},
{
"type": "unique_url_button",
"button_content": "Tell me more",
"count": 16
}
],
"cost": [
{
"type": "amount_spent",
"value": 0.03
},
{
"type": "cost_per_delivered",
"value": 0.03
},
{
"type": "cost_per_url_button_click",
"value": 0.03
}
]
}
]
}
],
"paging": {
"cursors": {
"before": "MAZDZD",
"after": "MjQZD"
}
}
}
}Recent Requests
Log in to see full request history
| Time | Status | User Agent | |
|---|---|---|---|
Retrieving recent requests… | |||
Loading…