Resumen de referencias de anuncios (CTWA)
Agrupa el tráfico Click-to-WhatsApp del número vinculado por anuncio/publicación, ordenado por cantidad de conversaciones de forma descendente. conversations cuenta conversaciones DISTINTAS y messages cuenta mensajes: dos mensajes en la misma conversación son 1 conversación y 2 mensajes.
lastSourceUrl y lastHeadline vienen del mensaje más reciente de ese anuncio: el texto se puede editar, y el útil es el último que envió Meta.
La lista tiene un tope de 200 anuncios; cuando se supera, truncated es true y un notice lo indica. Acota la ventana con startDate/endDate.
referral.sourceId es el id del anuncio (o publicación) de Meta y sigue siendo la clave de agrupación incluso cuando los nombres de abajo están presentes: una campaña se puede renombrar en Meta en cualquier momento.
Privacidad (PII): los CONTEOS siguen siendo correctos en un número RELAY_ONLY (vienen de la identidad del anuncio, que no es un dato personal); solo lastSourceUrl y lastHeadline vuelven null, con piiNotice: "PII_RELAY_ONLY".
Actúa sobre un número. Usa una clave de número (ps_number_), o una clave de workspace / clave de cuenta (ps_account_ + x-workspace-id) / token OAuth con el encabezado x-whatsapp-number-id; sin él, una credencial de todo el workspace recibe 403 TENANT_SCOPE_NOT_ALLOWED. Los tokens OAuth y las claves de cuenta necesitan chat:read (OWNER, ADMIN, AGENT; el rol ANALYST recibe 403 PERMISSION_DENIED).
El objeto referral también trae los nombres RESUELTOS del anuncio (adName, adsetId, adsetName, campaignId, campaignName) más namesResolvedAt.
⚠️ Esos seis vuelven null salvo que el anunciante haya compartido esa cuenta publicitaria con el portafolio comercial de Pilot Status como socio. Un nombre null es un estado SOPORTADO, no un error: la conversación se sigue contando y sourceId se sigue devolviendo.
Ningún endpoint resuelve un nombre bajo demanda: la resolución ocurre de forma asíncrona, fuera del camino de la solicitud, así que consultar nunca dispara una llamada a la Marketing API y un null puede convertirse en un nombre minutos después sin que hagas nada. namesResolvedAt es lo que lo hace observable: null significa “todavía no resuelto”, mientras que una marca de tiempo con nombres null significa “preguntamos y Meta no devolvió nada” (anuncio eliminado o acceso no compartido).
curl --request GET \
--url https://pilotstatus.com.br/v1/referrals/summary \
--header 'x-api-key: <api-key>'import requests
url = "https://pilotstatus.com.br/v1/referrals/summary"
headers = {"x-api-key": "<api-key>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {'x-api-key': '<api-key>'}};
fetch('https://pilotstatus.com.br/v1/referrals/summary', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://pilotstatus.com.br/v1/referrals/summary",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"x-api-key: <api-key>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://pilotstatus.com.br/v1/referrals/summary"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("x-api-key", "<api-key>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://pilotstatus.com.br/v1/referrals/summary")
.header("x-api-key", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://pilotstatus.com.br/v1/referrals/summary")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["x-api-key"] = '<api-key>'
response = http.request(request)
puts response.read_body{
"ads": [
{
"sourceId": "120249828053880703",
"sourceType": "ad",
"conversations": 12,
"messages": 31,
"firstAt": "2026-07-28T10:00:00.000Z",
"lastAt": "2026-08-16T12:00:00.000Z",
"lastSourceUrl": "https://www.instagram.com/p/DcJhrlpA3Pl/",
"lastHeadline": "SALE MM DESIGN",
"adName": "Ads 01 - Vídeo dos 70%",
"adsetId": "120249828053990703",
"adsetName": "[IG] [LL1% IG + VÍDEOS] - 35 a 50",
"campaignId": "120249677595590703",
"campaignName": "[CD-01] [WHATSAPP] - MM Design - Sale 70%",
"namesResolvedAt": "2026-08-17T21:04:00.000Z"
},
{
"sourceId": "120249828075420703",
"sourceType": "ad",
"conversations": 4,
"messages": 9,
"firstAt": "2026-08-02T09:00:00.000Z",
"lastAt": "2026-08-15T18:30:00.000Z",
"lastSourceUrl": "https://www.instagram.com/p/DcAbcdEfGh/",
"lastHeadline": "MM DESIGN — Outlet",
"adName": null,
"adsetId": null,
"adsetName": null,
"campaignId": null,
"campaignName": null,
"namesResolvedAt": null
}
],
"total": 2,
"limit": 200,
"truncated": false
}Parámetros de consulta
Respuesta
Resumen de referencias de anuncios
¿Esta página le ayudó?
curl --request GET \
--url https://pilotstatus.com.br/v1/referrals/summary \
--header 'x-api-key: <api-key>'import requests
url = "https://pilotstatus.com.br/v1/referrals/summary"
headers = {"x-api-key": "<api-key>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {'x-api-key': '<api-key>'}};
fetch('https://pilotstatus.com.br/v1/referrals/summary', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://pilotstatus.com.br/v1/referrals/summary",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"x-api-key: <api-key>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://pilotstatus.com.br/v1/referrals/summary"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("x-api-key", "<api-key>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://pilotstatus.com.br/v1/referrals/summary")
.header("x-api-key", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://pilotstatus.com.br/v1/referrals/summary")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["x-api-key"] = '<api-key>'
response = http.request(request)
puts response.read_body{
"ads": [
{
"sourceId": "120249828053880703",
"sourceType": "ad",
"conversations": 12,
"messages": 31,
"firstAt": "2026-07-28T10:00:00.000Z",
"lastAt": "2026-08-16T12:00:00.000Z",
"lastSourceUrl": "https://www.instagram.com/p/DcJhrlpA3Pl/",
"lastHeadline": "SALE MM DESIGN",
"adName": "Ads 01 - Vídeo dos 70%",
"adsetId": "120249828053990703",
"adsetName": "[IG] [LL1% IG + VÍDEOS] - 35 a 50",
"campaignId": "120249677595590703",
"campaignName": "[CD-01] [WHATSAPP] - MM Design - Sale 70%",
"namesResolvedAt": "2026-08-17T21:04:00.000Z"
},
{
"sourceId": "120249828075420703",
"sourceType": "ad",
"conversations": 4,
"messages": 9,
"firstAt": "2026-08-02T09:00:00.000Z",
"lastAt": "2026-08-15T18:30:00.000Z",
"lastSourceUrl": "https://www.instagram.com/p/DcAbcdEfGh/",
"lastHeadline": "MM DESIGN — Outlet",
"adName": null,
"adsetId": null,
"adsetName": null,
"campaignId": null,
"campaignName": null,
"namesResolvedAt": null
}
],
"total": 2,
"limit": 200,
"truncated": false
}