curl -g 'https://graph.facebook.com/<API_VERSION>/<WHATSAPP_BUSINESS_ACCOUNT_ID>?fields=<FIELD>.<FILTERS>' \ -H 'Authorization: Bearer <ACCESS_TOKEN>'
| Placeholder | Description | Example Value |
|---|---|---|
<FIELD> | Required. Metric. Value can be one of: | analytics |
<FILTERS> | Required. Metric filtering parameter. Append additional filtering parameters using dots. For possible values, see: | .start(1543543200).end(1544148000).granularity(DAY) |
analytics field provides the number and type of messages sent and delivered by the phone numbers associated with a specific WABA — for conversation metrics, see Conversation Analytics. When calling /<WHATSAPP_BUSINESS_ACCOUNT_ID>?fields=analytics.{filtering-parameters}, you can attach the following parameters.| Name | Description |
|---|---|
starttype: UNIX Timestamp | Required. The start date for the date range for which you are retrieving analytics. |
endtype: UNIX Timestamp | Required. The end date for the date range for which you are retrieving analytics. |
granularitytype: String | Required. The granularity at which you would like to retrieve the analytics. Supported Options:
|
phone_numberstype: Array | Optional. An array of phone numbers for which you would like to retrieve analytics. If not provided, all phone numbers added to your WABA are included. |
product_typestype: Array | Optional. The types of messages (notification messages and/or customer support messages) for which you want to retrieve notifications. If not provided, analytics will be returned for all messages together. Supported values:
|
country_codestype: Array | Optional. The countries for which you would like to retrieve analytics. Provide an array with 2 letter country codes for the countries you would like to include. If not provided, analytics will be returned for all countries you have communicated with. |
start, end, granularity.curl -i -X GET "https://graph.facebook.com/v25.0/102290129340398
?fields=analytics
.start(1543543200)
.end(1544148000)
.granularity(DAY)
&access_token=BLI8lkj..."
analytics object with the data you have requested:{ "analytics": { "phone_numbers": [ "16505550111", "16505550112", "16505550113" ], "country_codes": [ "US", "BR" ], "granularity": "DAY", "data_points": [ { "start": 1543543200, "end": 1543629600, "sent": 196093, "delivered": 179715 }, { "start": 1543629600, "end": 1543716000, "sent": 147649, "delivered": 139032 }, { "start": 1543716000, "end": 1543802400, "sent": 61988, "delivered": 58830 }, { "start": 1543802400, "end": 1543888800, "sent": 132465, "delivered": 124392 } # more data points ] }, "id": "102290129340398" }
conversation_analytics field provides cost and conversation information for a specific WABA. When calling /<WHATSAPP_BUSINESS_ACCOUNT_ID>?fields=conversation_analytics.{filtering-parameters}, you can attach the following parameters.| Name | Description (Click the arrow in the left column for supported options.) |
|---|---|
starttype: UNIX Timestamp | Required. The start date for the date range for which you are retrieving analytics. |
endtype: UNIX Timestamp | Required. The end date for the date range for which you are retrieving analytics. |
granularitytype: String | Required. The granularity at which you would like to retrieve the analytics. Supported Options:
|
phone_numberstype: Array | Optional. An array of phone numbers for which you would like to retrieve analytics. If not provided, all phone numbers added to your WABA are included. |
metric_types | Optional. List of metrics you would like to receive. If you send an empty list, we return results for all metric types. Supported Options: {#supported}
Exception: COST will not be returned for WABAs that share a Solution Partner’s credit line. If your WABA shares a Solution Partner’s credit line, reach out to your Solution Partner to understand your charges. If you a querying a WABA that shares a Solution Partner’s credit line:
If you query a time period that includes dates on or after July 1, 2023, (for example, May 1, 2023 through August 1, 2023), the response will include the above exception. This does not apply if querying the conversation_analytics endpoint. |
conversation_categories | Optional. List of conversation categories. If you send an empty list, we return results for all conversation categories. Supported Options:
|
conversation_types | Optional. List of conversation types. If you send an empty list, we return results for all conversation types. Supported Options:
|
conversation_directions | Optional. List of conversation directions. If you send an empty list, we return results for all conversation directions. Supported Options:
|
dimensions | Optional. List of breakdowns you would like to apply to your metrics. If you send an empty list, we return results without any breakdowns. Supported Options:
|
start: Start of your time range. In this case, the beginning of the month you want metrics for.end: End of your time range. In this case, the end of the month you want metrics for.granularity: How granular you want your data points to be. In the example below, we use MONTHLY, so each datapoint will represent a month’s worth of data.phone_numbers: Send an empty array and we return information for all phone numbers associated with the WABA.dimensions: Set it to all available breakdowns: "CONVERSATION_CATEGORY", "CONVERSATION_TYPE", "COUNTRY", and "PHONE".country_codes, metric_types, conversation_types and conversation_categories. If you don’t send us anything for those fields, we return all available options. Once you set up the URL, make a GET request:curl -i -X GET
"https://graph.facebook.com/v25.0/102290129340398
?fields=conversation_analytics
.start(1685602800).end(1688194800)
.granularity(MONTHLY)
.phone_numbers([])
.dimensions(["CONVERSATION_CATEGORY","CONVERSATION_TYPE","COUNTRY","PHONE"])
&access_token=BLI8lkj..."
conversation_analytics object with the data you have requested. In the following example, the WABA contains only one phone number.{ "conversation_analytics": { "data": [ { "data_points": [ { "start": 1685602800, "end": 1688194800, "conversation": 1558, "phone_number": "15550458206", "country": "US", "conversation_type": "REGULAR", "conversation_direction": "UNKNOWN", "conversation_category": "AUTHENTICATION", "cost": 15.58 }, { "start": 1685602800, "end": 1688194800, "conversation": 2636, "phone_number": "15550458206", "country": "US", "conversation_type": "REGULAR", "conversation_category": "MARKETING", "cost": 26.36 }, { "start": 1685602800, "end": 1688194800, "conversation": 2238, "phone_number": "15550458206", "country": "US", "conversation_type": "REGULAR", "conversation_category": "SERVICE", "cost": 22.38 }, { "start": 1685602800, "end": 1688194800, "conversation": 1782, "phone_number": "15550458206", "country": "US", "conversation_type": "REGULAR", "conversation_category": "UTILITY", "cost": 17.82 }, { "start": 1685602800, "end": 1688194800, "conversation": 1568, "phone_number": "15550458206", "country": "US", "conversation_type": "FREE_TIER", "conversation_category": "AUTHENTICATION", "cost": 15.68 }, { "start": 1685602800, "end": 1688194800, "conversation": 2716, "phone_number": "15550458206", "country": "US", "conversation_type": "FREE_TIER", "conversation_category": "MARKETING", "cost": 27.16 }, { "start": 1685602800, "end": 1688194800, "conversation": 2180, "phone_number": "15550458206", "country": "US", "conversation_type": "FREE_TIER", "conversation_category": "SERVICE", "cost": 21.8 }, { "start": 1685602800, "end": 1688194800, "conversation": 1465, "phone_number": "15550458206", "country": "US", "conversation_type": "FREE_TIER", "conversation_category": "UTILITY", "cost": 14.65 }, { "start": 1685602800, "end": 1688194800, "conversation": 1433, "phone_number": "15550458206", "country": "US", "conversation_type": "FREE_ENTRY_POINT", "conversation_category": "SERVICE", "cost": 14.33 } ] } ] }, "id": "102290129340398" }
start: Start of your time range.end: End of your time range.granularity: How granular you want your data points to be. In the example below, we use HALF_HOUR, so each datapoint represents half an hour’s worth of data.phone_numbers: The phone number you need information for.dimensions: Set it to all available breakdowns: CONVERSATION_CATEGORY, CONVERSATION_TYPE, COUNTRY, and PHONE.country_codes, metric_types, conversation_types, or conversation_categories. If you don’t send us anything for those fields, we return all available options. Once you set up the URL, make a GET request:curl -i -X GET \
"https://graph.facebook.com/v25.0/102290129340398
?fields=conversation_analytics
.start(1685602800)
.end(1685689200)
.granularity(HALF_HOUR)
.phone_numbers(["19195552584"])
.dimensions(["CONVERSATION_CATEGORY","CONVERSATION_TYPE","COUNTRY,PHONE"])
&access_token=BLI8lkj..."
conversation_analytics object with the data you have requested:{ "conversation_analytics": { "data": [ { "data_points": [ { "start": 1685602800, "end": 1685604600, "conversation": 4, "phone_number": "19195552584", "country": "US", "conversation_type": "REGULAR", "conversation_direction": "UNKNOWN", "conversation_category": "SERVICE", "cost": 0.0232 }, { "start": 1685602800, "end": 1685604600, "conversation": 4, "phone_number": "19195552584", "country": "US", "conversation_type": "REGULAR", "conversation_direction": "UNKNOWN", "conversation_category": "MARKETING", "cost": 0.0232 }, # ... more data points ] } ] }, "id": "102290129340398" }
start: Start of your time range.end: End of your time range.granularity: How granular you want your data points to be. In the example below, we use MONTHLY, so each datapoint represents half a month’s worth of data.phone_numbers: Send an empty array and we’ll return information for all phone numbers associated with the WABA.dimensions: Set it to CONVERSATION_TYPE.country_codes, metric_types, conversation_types, conversation_directions, or conversation_categories. If you don’t send us anything for those fields, we return all available options. Once you set up the URL, make a GET request:curl -i -X GET "https://graph.facebook.com/v25.0/102290129340398
?fields=conversation_analytics
.start(1643702400).end(1646121600)
.granularity(MONTHLY)
.phone_numbers([])
.dimensions([CONVERSATION_TYPE])
&access_token=BLI8lkj..."
conversation_analytics object with the data you have requested:{ "data": [ { "data_points": [ { "start": 1643702400, "end": 1646121600, "conversation": 8500, "conversation_type": "REGULAR", "cost": 88.1010 }, { "start": 1643702400, "end": 1646121600, "conversation": 1000, "conversation_type": "FREE_TIER", "cost": 0.0000 } { "start": 1643702400, "end": 1646121600, "conversation": 250, "conversation_type": "FREE_ENTRY_POINT", "cost": 0.0000 } ] } ] }
curl -i -X GET "https://graph.facebook.com/v25.0/102290129340398
?fields=conversation_analytics
.start(1685527200)
.end(1685613600)
.granularity(HALF_HOUR)
.conversation_categories(["MARKETING","AUTHENTICATION"])
.dimensions(["CONVERSATION_CATEGORY"])
&access_token=BLI8lkj..."
{ "conversation_analytics": { "data": [ { "data_points": [ { "start": 1685529000, "end": 1685530800, "conversation": 2, "conversation_category": "AUTHENTICATION", "cost": 0.0128 }, { "start": 1685527200, "end": 1685529000, "conversation": 3, "conversation_category": "MARKETING", "cost": 0.0432 } ] } ] }, "id": "102290129340398" }
curl -i -X GET \
"https://graph.facebook.com/v25.0/102290129340398
?fields=conversation_analytics
.start(1685527200)
.end(1685613600)
.granularity(HALF_HOUR)
.conversation_categories(["MARKETING","AUTHENTICATION"])
.dimensions(["CONVERSATION_CATEGORY","CONVERSATION_TYPE"])
&access_token=BLI8lkj..."
{ "conversation_analytics": { "data": [ { "data_points": [ { "start": 1685527200, "end": 1685529000, "conversation": 3, "conversation_type": "REGULAR", "conversation_category": "MARKETING", "cost": 0.0432 }, { "start": 1685529000, "end": 1685530800, "conversation": 2, "conversation_type": "REGULAR", "conversation_category": "AUTHENTICATION", "cost": 0.0128 } ] } ] }, "id": "102290129340398" }
pricing_analytics field allows you to get pricing breakdowns for any messages delivered within a specified date range.GET /<WHATSAPP_BUSINESS_ACCOUNT_ID> ?fields=pricing_analytics .start(<START>) .end(<END>) .granularity(<GRANULARITY>) .phone_numbers(<PHONE_NUMBERS>) .country_codes(<COUNTRY_CODES>) .metric_types(<METRIC_TYPES>) .pricing_types(<PRICING_TYPES>) .pricing_categories(<PRICING_CATEGORIES>) .dimensions(<DIMENSIONS>)
| Filter | Description | Example Value |
|---|---|---|
<COUNTRY_CODES>Array of strings | Optional. The countries for which you would like to retrieve analytics. Provide an array with 2 letter country codes for the countries you would like to include. If not provided, analytics will be returned for all countries you have communicated with. | [
US,
BR
] |
<DIMENSIONS>Array of strings | Optional. List of breakdowns you would like to apply to your metrics. If you send an empty list, we return results without any breakdowns. Values can be:
| [
PRICING_CATEGORY,
PRICING_TYPE,
COUNTRY
] |
<END>UNIX timestamp | Required. UNIX timestamp indicating the end date for the date range you are retrieving analytics for. | 1728581152 |
<GRANULARITY>String | Required. The granularity at which you would like to retrieve the analytics. Value can be one of:
| DAILY |
<METRIC_TYPES>Array of strings | Optional. Array of metrics you would like to receive. If you send an empty array, we return results for all metric types. Values can be:
Note that COST will not be returned for WABAs that share a Solution Partner’s credit line. If your WABA shares a Solution Partner’s credit line, reach out to your Solution Partner to understand your charges. | [COST, VOLUME] |
<PHONE_NUMBERS>Array of strings | Optional. An array of phone numbers for which you would like to retrieve analytics. If not provided, data for all business phone numbers associated with your WABA are included. | [
15550783881,
15550783882,
15550783883
] |
<PRICING_CATEGORIES>Array of strings | Optional. Array of pricing categories. If you send an empty array, we return results for all pricing categories. Values can be:
| [
AUTHENTICATION,
MARKETING,
UTILITY
] |
<PRICING_TYPES>Array of strings | Optional. Array of pricing types. If you send an empty array, we return results for all pricing types. Values can be:
| [
REGULAR,
FREE_CUSTOMER_SERVICE
] |
<START>UNIX timestamp | Required. UNIX timestamp indicating the start date for the date range you are retrieving analytics for. | 1726014453 |
<WABA_ID>String | Required. WhatsApp Business Account ID. | 102290129340398 |
TIER, PRICING_CATEGORY, and COUNTRY parameters in the dimensions array to get volume tier information. Data points representing messages affected by volume tier pricing will have a tier property in the response.{ "start": <START_TIMESTAMP>, "end": <END_TIMESTAMP>, "phone_number": "<BUSINESS_PHONE_NUMBER>", "country": "<COUNTRY_CODE>", "tier": "<LOWER>:<UPPER>", "pricing_type": "<PRICING_TYPE>", "pricing_category": "<PRICING_CATEGORY>", "volume": <VOLUME>, "cost": <COST> }
tier property value represents a concatenation of the lower and upper bounds for the tier specific to the market–category pair (country and pricing_category) that that data point represents.<LOWER> – An integer representing the lower bound of the tier (inclusive).<UPPER> – An integer representing the upper bound of the tier (inclusive), or the string MAX.tier, country, and pricing_category values. The tier value’s <UPPER> integer (the integer after the colon) tells you your current tier for the country and pricing_category (for example, (India and utility, respectively).country and pricing_category, subtract the volume integer from the tier value’s <UPPER> integer.0:MAX.tier property will be omitted for data points that represent free messages, since free messages don’t contribute to tiering counts.curl 'https://graph.facebook.com/v25.0/161311403722088?fields=pricing_analytics.start(1748761200).end(1749687703).granularity(DAILY).dimensions(PRICING_CATEGORY,PRICING_TYPE,TIER,COUNTRY).country_codes(US,IN)' \
-H 'Authorization: Bearer EAAJB'
{ "pricing_analytics": { "data": [ { "data_points": [ { "start": 1749193200, "end": 1749279600, "country": "IN", "pricing_type": "FREE_CUSTOMER_SERVICE", "pricing_category": "SERVICE", "volume": 2, "cost": 0 }, { "start": 1749106800, "end": 1749193200, "country": "IN", "tier": "0:750000", "pricing_type": "REGULAR", "pricing_category": "AUTHENTICATION_INTERNATIONAL", "volume": 2, "cost": 4.6 }, { "start": 1749106800, "end": 1749193200, "country": "IN", "pricing_type": "FREE_CUSTOMER_SERVICE", "pricing_category": "SERVICE", "volume": 2, "cost": 0 }, { "start": 1748934000, "end": 1749020400, "country": "US", "tier": "0:MAX", "pricing_type": "REGULAR", "pricing_category": "MARKETING", "volume": 1, "cost": 10 }, { "start": 1748847600, "end": 1748934000, "country": "US", "pricing_type": "FREE_CUSTOMER_SERVICE", "pricing_category": "SERVICE", "volume": 1, "cost": 0 }, { "start": 1748847600, "end": 1748934000, "country": "US", "pricing_type": "FREE_ENTRY_POINT", "pricing_category": "SERVICE", "volume": 6, "cost": 0 }, { "start": 1748847600, "end": 1748934000, "country": "US", "tier": "0:2", "pricing_type": "REGULAR", "pricing_category": "AUTHENTICATION", "volume": 1, "cost": 10 }, { "start": 1748847600, "end": 1748934000, "country": "IN", "tier": "0:750000", "pricing_type": "REGULAR", "pricing_category": "AUTHENTICATION_INTERNATIONAL", "volume": 1, "cost": 2.3 }, { "start": 1748761200, "end": 1748847600, "country": "US", "pricing_type": "FREE_CUSTOMER_SERVICE", "pricing_category": "SERVICE", "volume": 2, "cost": 0 }, { "start": 1748761200, "end": 1748847600, "country": "US", "tier": "0:2", "pricing_type": "REGULAR", "pricing_category": "AUTHENTICATION", "volume": 1, "cost": 10 }, { "start": 1748761200, "end": 1748847600, "country": "US", "pricing_type": "FREE_CUSTOMER_SERVICE", "pricing_category": "UTILITY", "volume": 1, "cost": 0 }, { "start": 1748761200, "end": 1748847600, "country": "US", "tier": "0:2", "pricing_type": "REGULAR", "pricing_category": "UTILITY", "volume": 1, "cost": 10 }, { "start": 1748761200, "end": 1748847600, "country": "US", "tier": "0:MAX", "pricing_type": "REGULAR", "pricing_category": "MARKETING", "volume": 4, "cost": 40 }, { "start": 1748761200, "end": 1748847600, "country": "US", "tier": "0:MAX", "pricing_type": "REGULAR", "pricing_category": "MARKETING_LITE", "volume": 1, "cost": 10 } ] } ] } }
use_waba_timezone param with a value of true.{ "data": [ { "waba_timezone": "America/Los_Angeles", "granularity": "DAILY", "product_type": "cloud_api", "data_points": [ ... ] } }
MARKETING or UTILITY.POST /<WHATSAPP_BUSINESS_ACCOUNT_ID>?is_enabled_for_insights=true
{ "id": 102290129340398 }
| Name | Description | Example Value |
|---|---|---|
startUNIX Timestamp or date string | Required. The start time for the date range you are retrieving analytics for. Can be represented as either a unix timestamp integer or a date string in the format YYYY-MM-DD.
As template analytics are being provided with a daily granularity in the UTC timezone, a start unix timestamp that does not correspond to 0:00 UTC will be adjusted back to the current day’s 00:00 UTC. If use_waba_timezone param has a value of true, this value must be a date string in the format YYYY-MM-DD. | 1543536000 |
endUNIX Timestamp or date string | Required. The end time for the date range you are retrieving analytics for. Can be represented as either a unix timestamp integer or a date string in the format YYYY-MM-DD. As template analytics are being provided with a daily granularity in the UTC timezone, an end unix timestamp that does not correspond to 0:00 UTC will be adjusted back to the current day’s 00:00 UTC. If use_waba_timezone param has a value of true, this value must be a date string in the format YYYY-MM-DD. | 1543708800 |
granularityEnum | Required. The granularity at which you would like to retrieve the analytics. Value must be DAILY. | DAILY |
template_idsArray of IDs | Required. An array of template IDs for which you would like to retrieve analytics for. Maximum 10. | [1924084211297547,954638012257287,969725530748535] |
metric_typesArray of enums | Optional. The types of metrics which you want to retrieve. If omitted or an empty array, analytics for all metric types will be returned. Possible values:
Note that COST will not be returned for WABAs that share a Solution Partner’s credit line. If your WABA shares a Solution Partner’s credit line, reach out to your Solution Partner to understand your charges. | [SENT,DELIVERED,READ] |
product_typeEnum | Optional. The product type of the metrics you want to retrieve. If omitted, only analytics for Cloud API will be returned. Possible values:
| MARKETING_MESSAGES_API_FOR_WHATSAPP |
<USE_WABA_TIMEZONE>Boolean | Optional. Whether to show metrics in the WABA’s configured timezone. If false or omitted, metrics will be shown in UTC. If true, params start and end must be in the format YYYY-MM-DD. | true |
curl -g 'https://graph.facebook.com/v25.0/109259195336416/template_analytics?start=1718064000&end=1718122745&granularity=daily&metric_types=cost%2Cclicked%2Cdelivered%2Cread%2Csent&template_ids=[1421988012088524%2C2632273056924580]' \
-H 'Authorization: Bearer EAAJB...'
{ "data": [ { "granularity": "DAILY", "product_type": "cloud_api", // Only available to businesses in the Marketing Messages API for WhatsApp alpha "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" } } }
amount_spent — Total amount spent on conversations opened within the start and end timeframe as a result of sending the template. See Opening Conversations.cost_per_delivered — The amount_spent value divided by the number of times the template was delivered within the start and end timeframe.cost_per_url_button_click — The amount_spent value divided by the number of times the template’s URL button was clicked, within the start and end timeframe. Quick reply button clicks are not included. Object omitted if the template does not have a URL button.MARKETING or UTILITY.url_button — The total number of clicks on the url button.unique_url_button — Unique clicks track the number of distinct WhatsApp accounts that have clicked on a button. This metric helps you understand how many individual users are engaging with your CTAs, while eliminating duplicate clicks from the same recipient and providing an accurate measurement of engagement.cta_url_link_tracking_opted_out field to true. Once disabled, the API will no longer return the clicked property in template analytics or display button engagement/clicks in the WhatsApp Manager when viewing the template’s insights.POST /<TEMPLATE_ID> ?cta_url_link_tracking_opted_out=<OPT_OUT> &category=<TEMPLATE_CATEGORY>
| Placeholder | Description | Example Value |
|---|---|---|
<WHATSAPP_TEMPLATE_ID>Template ID | Required. Template ID. | 245435364965041 |
<OPT_OUT>Boolean | Required. Indicates if template button click tracking is disabled. Set to true to disable button click tracking on the template, or false to enable.This value is set to false upon template creation. | true |
<TEMPLATE_CATEGORY>String | Required. Template’s current category. If you set the template category to a value other than its current category, the template status will be set to PENDING and the template must undergo template review to be approved. | marketing |
curl -X POST 'https://graph.facebook.com/v25.0/245435364965041?cta_url_link_tracking_opted_out=true&category=marketing' \
-H 'Authorization: Bearer EAAJB...'
{ "success": true }
template_group_analytics field allows you to get the number of times templates within a template group have been sent, delivered, and read, and the number of times their URL buttons or Quick Reply buttons have been clicked.{ "data": [ { "waba_timezone": "America/Los_Angeles", "granularity": "DAILY", "product_type": "cloud_api", "data_points": [ ... ] } }
marketing or utility.
WABAs owned by or shared with Meta Business Accounts in the European Union, United Kingdom, or Japan, or that have a business phone number with a country calling code from any of those countries or regions, are not supported.POST /<WHATSAPP_BUSINESS_ACCOUNT_ID>?is_enabled_for_insights=trueGET /<WHATSAPP_BUSINESS_ACCOUNT_ID>/template_group_analytics ?granularity=daily &start=<START_TIME> &end=<END_TIME> &metric_types=<METRIC_TYPES> &template_group_ids=[<TEMPLATE_GROUP_IDS>]
| Placeholder | Description | Example value |
|---|---|---|
<WABA_ID>String | Required. WhatsApp Business Account ID. | 102290129340398 |
<START_TIME>UNIX Timestamp or date string | Required. The start time for the date range you are retrieving analytics for. Can be represented as either a unix timestamp integer or a date string in the format YYYY-MM-DD. As template group analytics are being provided with a daily granularity in the UTC timezone, a start unix timestamp that does not correspond to 0:00 UTC will be adjusted back to the current day’s 00:00 UTC. If use_waba_timezone param has a value of true, this value must be a date string in the format YYYY-MM-DD. | 1738465116 |
<END_TIME>UNIX Timestamp or date string | Required. The end time for the date range you are retrieving analytics for. Can be represented as either a unix timestamp integer or a date string in the format YYYY-MM-DD. As template group analytics are being provided with a daily granularity in the UTC timezone, an end unix timestamp that does not correspond to 0:00 UTC will be adjusted back to the current day’s 00:00 UTC. If use_waba_timezone param has a value of true, this value must be a date string in the format YYYY-MM-DD. | 1739559516 |
<METRIC_TYPES>Array of strings | Optional. Array of metrics you would like to receive. If you send an empty array, the API returns results for all metric types. Values can be:
Note that COST is not accessible to business customers who are billed through a Solution Partner.See Cost and click metrics to learn more about cost and click metrics. | |
<TEMPLATE_GROUP_IDS> | Required. An array of template group IDs for which you wish to get template group metrics. Maximum 10 IDs. | 102290129340398 |
<USE_WABA_TIMEZONE>`Boolean | Optional. Whether to show metrics in the WABA’s configured timezone. If false or omitted, metrics will be shown in UTC. If true, params start and end must be in the format YYYY-MM-DD. | true |
curl -g 'https://graph.facebook.com/v25.0/102290129340398/template_group_analytics?granularity=daily&start=1738465116&end=1739559516&metric_types=sent,delivered,read&template_group_ids=[1044106240855852]' \
-H 'Authorization: Bearer EAAJB...'
...) for brevity.{ "data": [ { "granularity": "DAILY", "data_points": [ { "template_group_id": "1044106240855852", "start": 1739491200, "end": 1739577600, "sent": 1460, "delivered": 1460, "read": 1399 }, { "template_group_id": "1044106240855852", "start": 1739404800, "end": 1739491200, "sent": 673, "delivered": 673, "read": 645 } ... ] } ], "paging": { "cursors": { "before": "MAZDZD", "after": "MjQZD" } } }
amount_spent — Total amount spent on conversations opened within the start and end timeframe as a result of sending the template. See Opening Conversations.cost_per_delivered — The amount_spent value divided by the number of times the template was delivered within the start and end timeframe.cost_per_url_button_click — The amount_spent value divided by the number of times the template’s URL button was clicked, within the start and end timeframe. Quick reply button clicks are not included. Object omitted if the template does not have a URL button.marketing or utility.url_button — The total number of clicks on the url button.unique_url_button — Unique clicks track the number of distinct WhatsApp accounts that have clicked on a button. This metric helps you understand how many individual users are engaging with your CTAs, while eliminating duplicate clicks from the same recipient and providing an accurate measurement of engagement.call_analytics field provides the number and type of calls made and received by the phone numbers associated with a specific WABA. When calling /<WHATSAPP_BUSINESS_ACCOUNT_ID>?fields=call_analytics.{filtering-parameters}, you can attach the following parameters.| Name | Description | Example value |
|---|---|---|
starttype: UNIX Timestamp | Required. The start date for the date range for which you are retrieving analytics. | 1728581152 |
endtype: UNIX Timestamp | Required. The end date for the date range for which you are retrieving analytics. | 1728581152 |
granularitytype: String | Required. The granularity at which you would like to retrieve the analytics. Supported Options:
| DAILY |
phone_numberstype: Array | Optional. An array of phone numbers for which you would like to retrieve analytics. If not provided, all phone numbers added to your WABA are included. | [15550783881,15550783882] |
country_codestype: Array | Optional. The countries for which you would like to retrieve analytics. Provide an array with 2 letter country codes for the countries you would like to include. If not provided, analytics will be returned for all countries you have communicated with. | [US,BR] |
directionsArray of enums | Optional. The call direction for which you would like to retrieve the analytics. Supported Options:
| USER_INITIATED |
dimensionsArray of enums | Optional. List of breakdowns you would like to apply to your metrics. If you send an empty list, we return results without any breakdowns. Supported Options:
| direction |
metric_typesArray of enums | Optional. Array of metrics you would like to receive. If you send an empty array, the API returns results for all metric types. Supported Options:
| AVERAGE_DURATION |
start, end, granularity, directions.curl -i -X GET "https://graph.facebook.com/v25.0/102290129340398
?fields=call_analytics
.start(1759302000)
.end(1767168000)
.granularity(DAILY)
.directions(USER_INITIATED)
&access_token=BLI8lkj..."
call_analytics object with the data you have requested:{ "call_analytics": { "granularity": "DAILY", "directions": "USER_INITIATED", "data_points": [ { "start": 1765958400, "end": 1766044800, "cost": 0.47795, "count": 35, "average_duration": 106 }, { "start": 1760943600, "end": 1761030000, "cost": 0, "count": 20, "average_duration": 103 }, { "start": 1760857200, "end": 1760943600, "cost": 0, "count": 24, "average_duration": 103 }, # more data points ] }, "id": "102290129340398" }
GET /<WHATSAPP_BUSINESS_ACCOUNT_ID>/group_analytics ?granularity=daily &start=<START_TIME> &end=<END_TIME> &metric_types=[<METRIC_TYPES>] &group_ids=[<GROUP_IDS>]
| Placeholder | Description | Example value |
|---|---|---|
<START_TIME>UNIX Timestamp | Required. The start time for the date range you are retrieving analytics for. Must be no more than 90 days from the current date. | 1685548801 |
<END_TIME>UNIX Timestamp | Required. The end time for the date range you are retrieving analytics for. | 1685721600 |
<GROUP_IDS>Array of strings | Required. An array of group IDs for which you wish to get group metrics. Currently only supports 1 ID. | ["GROUP_ID"] |
<GRANULARITY>String | Optional. The granularity at which you would like to retrieve the analytics. Values can be:
Default: DAILY. | DAILY |
<METRIC_TYPES>Array of strings | Required. Array of metrics you would like to receive. Values can be:
| ["SENT","READ","PARTICIPANTS_JOINED"] |
curl -g 'https://graph.facebook.com/v25.0/102290129340398/group_analytics?start=1764662400&end=1764921600&granularity=DAILY&group_ids=['GROUP_ID']&metric_types=['SENT','DELIVERED', 'READ','PARTICIPANTS_JOINED','PARTICIPANTS_LEFT']' \
-H 'Authorization: Bearer EAAJB...'
...) for brevity.{ "data": [ { "granularity": "DAILY", "data_points": [ { "group_id": "GROUP_ID", "start": 1685548801, "end": 1685635200, "sent": 100, "delivered": 250, "read": 200, "joined": 3, "left": 1 }, { "group_id": "GROUP_ID", "start": 1685635201, "end": 1685721600, "sent": 80, "delivered": 200, "read": 150, "joined": 1, "left": 0 } ... ] } ], "paging": { "cursors": { "before": "MAZDZD", "after": "MjQZD" } } }