Get the Click-to-WhatsApp Ads Report
Automate this endpoint with an AI agent using the 2chat-whatsapp-waba skill:
npx skills add 2ChatCo/agent-skills -s 2chat-whatsapp-waba
This endpoint reports the conversations started from each of your Meta Click-to-WhatsApp ads on your WhatsApp Business API numbers over the last 7, 15 or 30 days, with a count for every day of the period. The ad that started the most conversations comes first.
Requires a WhatsApp Business API (WABA) channel connected to your 2Chat account. See How to connect WABA to 2Chat. WhatsApp Web numbers are not covered.
How conversations are countedβ
- A conversation counts once, on the day the person first wrote to you from the ad. Coming back later from the same ad doesn't count again.
- Days are counted in your account's timezone, which the response returns as
timezone. The period ends today and includes it. - Only ads are counted. Facebook and Instagram posts that open a WhatsApp chat are left out.
- Days without conversations are reported as
0, so everydailylist has one value per day of the period.
Endpointβ
GET https://api.p.2chat.io/open/waba/ads-report
Authenticationβ
Include your API key in the X-User-API-Key header. Learn more about authentication.
Parametersβ
| Parameter | In | Required | Description |
|---|---|---|---|
days | query | No | How many days back to report, today included: 7, 15 or 30. Defaults to 15 |
from_number | query | No | One of your WABA numbers in E.164 format, to narrow the report to the ads that came in through it. The leading + is optional (e.g. 12025550100) |
+ in a query stringA + in a URL query string is read as a space. Leave it out (from_number=12025550100) or encode it as %2B (from_number=%2B12025550100).
Period and numberβ
- Last 15 days, all your WABA numbers:
https://api.p.2chat.io/open/waba/ads-report - Last 30 days:
https://api.p.2chat.io/open/waba/ads-report?days=30 - Last 7 days on one number:
https://api.p.2chat.io/open/waba/ads-report?days=7&from_number=12025550100
Each successful call uses 1 API credit. Learn more about billing.
Invocationβ
- cURL
- Python
- JavaScript
- PHP
curl --location --request GET 'https://api.p.2chat.io/open/waba/ads-report?days=15' \
--header 'X-User-API-Key: your_api_key_here'
import requests
url = "https://api.p.2chat.io/open/waba/ads-report"
headers = {
"X-User-API-Key": "your_api_key_here"
}
response = requests.get(url, params={"days": 15}, headers=headers)
print(response.json())
const axios = require('axios');
const response = await axios.get('https://api.p.2chat.io/open/waba/ads-report', {
params: { days: 15 },
headers: {
'X-User-API-Key': 'your_api_key_here'
}
});
console.log(response.data);
<?php
$curl = curl_init();
curl_setopt_array($curl, array(
CURLOPT_URL => 'https://api.p.2chat.io/open/waba/ads-report?days=15',
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => '',
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 0,
CURLOPT_FOLLOWLOCATION => true,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => 'GET',
CURLOPT_HTTPHEADER => array(
'X-User-API-Key: your_api_key_here'
),
));
$response = curl_exec($curl);
curl_close($curl);
echo $response;
Responseβ
Success (HTTP 200 OK)β
{
"success": true,
"from": "2026-09-30",
"to": "2026-10-14",
"days": [
"2026-09-30", "2026-10-01", "2026-10-02", "2026-10-03", "2026-10-04",
"2026-10-05", "2026-10-06", "2026-10-07", "2026-10-08", "2026-10-09",
"2026-10-10", "2026-10-11", "2026-10-12", "2026-10-13", "2026-10-14"
],
"totals": {
"conversations": 112,
"ads": 4,
"daily": [5, 9, 7, 10, 8, 9, 10, 7, 10, 8, 8, 5, 7, 5, 4]
},
"ads": [
{
"ad_id": "120226305854810726",
"headline": "Spring Sale",
"source_url": "https://fb.me/spring-sale",
"media_type": "image",
"channel_uuids": ["WAN1a2b3c4d-0000-4000-8000-000000000001"],
"conversations": 61,
"last_received_at": "2026-10-13 21:50:00",
"daily": [3, 5, 4, 6, 3, 4, 5, 4, 6, 3, 5, 4, 5, 4, 0],
"phone_numbers": ["+12025550100"]
},
{
"ad_id": "120226305854810741",
"headline": "Free Shipping Week",
"source_url": "https://fb.me/free-shipping",
"media_type": "video",
"channel_uuids": [
"WAN1a2b3c4d-0000-4000-8000-000000000001",
"WAN1a2b3c4d-0000-4000-8000-000000000002"
],
"conversations": 29,
"last_received_at": "2026-10-14 16:12:45",
"daily": [1, 2, 2, 1, 3, 2, 2, 1, 2, 3, 2, 1, 2, 1, 4],
"phone_numbers": ["+12025550100", "+12025550101"]
},
{
"ad_id": "120226305854810759",
"headline": null,
"source_url": "https://fb.me/new-arrivals",
"media_type": "video",
"channel_uuids": ["WAN1a2b3c4d-0000-4000-8000-000000000002"],
"conversations": 14,
"last_received_at": "2026-10-11 02:30:10",
"daily": [1, 1, 1, 2, 1, 1, 2, 1, 1, 2, 1, 0, 0, 0, 0],
"phone_numbers": ["+12025550101"]
},
{
"ad_id": "120226305854810763",
"headline": "Book a Demo",
"source_url": "https://fb.me/book-a-demo",
"media_type": "image",
"channel_uuids": ["WAN1a2b3c4d-0000-4000-8000-000000000003"],
"conversations": 8,
"last_received_at": "2026-10-08 18:05:33",
"daily": [0, 1, 0, 1, 1, 2, 1, 1, 1, 0, 0, 0, 0, 0, 0],
"phone_numbers": []
}
],
"timezone": "America/Mexico_City"
}
| Field | Description |
|---|---|
success | true when the request was successful |
from | First day of the period, YYYY-MM-DD, in your account's timezone |
to | Last day of the period: today, in your account's timezone |
days | Every day of the period, oldest first. totals.daily and each ad's daily follow this order |
totals.conversations | Conversations started from any ad in the period |
totals.ads | How many ads started at least one conversation in the period |
totals.daily | Conversations started per day, all ads together, aligned with days |
ads | One entry per ad, the ad with the most conversations first. Ties go to the one with the most recent last_received_at |
ads[].ad_id | Meta's ID for the ad, the same one Meta Ads Manager shows |
ads[].headline | The ad's headline, as Meta sent it on the ad's latest entry. Can be null |
ads[].source_url | The ad's link, as Meta sent it on the ad's latest entry |
ads[].media_type | The ad's media (e.g. image, video), as Meta sent it on the ad's latest entry |
ads[].channel_uuids | The WAN⦠UUIDs of your WABA numbers the ad's conversations came in through, including numbers you have deleted since |
ads[].phone_numbers | The phone numbers of those WABA numbers. Deleted numbers are left out, so this list can be shorter than channel_uuids |
ads[].conversations | Conversations started from this ad in the period |
ads[].last_received_at | When a person last wrote from this ad, among the conversations counted, in UTC (YYYY-MM-DD HH:MM:SS) |
ads[].daily | Conversations started from this ad per day, aligned with days |
timezone | The timezone the days are counted in: your account's timezone, or UTC when it has none set |
Errorβ
{
"error": true,
"error_message": "`days` must be one of 7, 15, 30"
}
| HTTP | When |
|---|---|
400 | days is not 7, 15 or 30, or from_number is not a valid number in international format |
403 | Your plan doesn't include the ads report |
404 | from_number is not one of the WABA numbers of your account |
422 | days is not a whole number |