Skip to main content

Get the Click-to-WhatsApp Ads Report

Agent Skill

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.

info

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 every daily list 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​

ParameterInRequiredDescription
daysqueryNoHow many days back to report, today included: 7, 15 or 30. Defaults to 15
from_numberqueryNoOne 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)
Sending the + in a query string

A + 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 --location --request GET 'https://api.p.2chat.io/open/waba/ads-report?days=15' \
--header 'X-User-API-Key: your_api_key_here'

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"
}
FieldDescription
successtrue when the request was successful
fromFirst day of the period, YYYY-MM-DD, in your account's timezone
toLast day of the period: today, in your account's timezone
daysEvery day of the period, oldest first. totals.daily and each ad's daily follow this order
totals.conversationsConversations started from any ad in the period
totals.adsHow many ads started at least one conversation in the period
totals.dailyConversations started per day, all ads together, aligned with days
adsOne entry per ad, the ad with the most conversations first. Ties go to the one with the most recent last_received_at
ads[].ad_idMeta's ID for the ad, the same one Meta Ads Manager shows
ads[].headlineThe ad's headline, as Meta sent it on the ad's latest entry. Can be null
ads[].source_urlThe ad's link, as Meta sent it on the ad's latest entry
ads[].media_typeThe ad's media (e.g. image, video), as Meta sent it on the ad's latest entry
ads[].channel_uuidsThe WAN… UUIDs of your WABA numbers the ad's conversations came in through, including numbers you have deleted since
ads[].phone_numbersThe phone numbers of those WABA numbers. Deleted numbers are left out, so this list can be shorter than channel_uuids
ads[].conversationsConversations started from this ad in the period
ads[].last_received_atWhen a person last wrote from this ad, among the conversations counted, in UTC (YYYY-MM-DD HH:MM:SS)
ads[].dailyConversations started from this ad per day, aligned with days
timezoneThe 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"
}
HTTPWhen
400days is not 7, 15 or 30, or from_number is not a valid number in international format
403Your plan doesn't include the ads report
404from_number is not one of the WABA numbers of your account
422days is not a whole number