Ad leads
People who arrived from a click-to-WhatsApp ad or a Meta lead form.
List ad leads #
GET/api/v1/leads
Newest first, each with its contact.
Query parameters
pageinteger- Which page, starting at 1. A page past the end is an empty list.
limitinteger- How many per page: 1 to 100. 50 when left out.
Returns HTTP 200
okboolean- Always true on success.
leadslist of Lead- The leads on this page.
pageinteger- The page you asked for.
pagesinteger- How many pages there are at this limit.
totalinteger- How many items match in all.
limitinteger- Items per page.
has_moreboolean- True while there is a next page.
Errors
- 401
unauthorized - The Authorization header is missing, or the key is wrong or deleted.
- 429
rate_limited - More than 120 requests in a minute with this key. Wait for the seconds in Retry-After.
Plus the errors any request can get.
curl "https://chatilo.me/api/v1/leads" \
-H "Authorization: Bearer YOUR_API_KEY"<?php
$apiKey = 'YOUR_API_KEY';
$ch = curl_init('https://chatilo.me/api/v1/leads');
curl_setopt_array($ch, [
CURLOPT_RETURNTRANSFER => true,
CURLOPT_HTTPHEADER => ['Authorization: Bearer ' . $apiKey],
]);
$result = json_decode((string) curl_exec($ch), true);
$status = curl_getinfo($ch, CURLINFO_RESPONSE_CODE);
if ($status >= 400) {
throw new RuntimeException($result['error']['code'] . ': ' . $result['error']['message']);
}
print_r($result);const apiKey = 'YOUR_API_KEY';
const response = await fetch("https://chatilo.me/api/v1/leads", {
headers: {
Authorization: `Bearer ${apiKey}`,
},
});
const result = await response.json();
if (!response.ok) {
throw new Error(`${result.error.code}: ${result.error.message}`);
}
console.log(result);import requests
api_key = "YOUR_API_KEY"
response = requests.get(
"https://chatilo.me/api/v1/leads",
headers={"Authorization": f"Bearer {api_key}"},
timeout=30,
)
result = response.json()
if not response.ok:
raise RuntimeError(f"{result['error']['code']}: {result['error']['message']}")
print(result){
"ok": true,
"leads": [
{
"id": 5001,
"contact_id": 1001,
"conversation_id": 2001,
"source_type": "ad",
"ad_id": "120210000000000001",
"headline": "Festive dresses, 20% off",
"body": "Tap to chat with us on WhatsApp.",
"source_url": "https://fb.me/example",
"created_at": "2026-01-31T09:30:00Z",
"contact": {
"id": 1001,
"name": "Grace Miller",
"phone": "919876543210",
"email": "[email protected]",
"source": "api",
"opted_in": true,
"tags": [
"VIP"
],
"created_at": "2026-01-31T09:30:00Z",
"attributes": {
"city": "Denver"
},
"notes": "",
"opted_out_at": null,
"last_seen_at": "2026-01-31T09:30:00Z",
"updated_at": "2026-01-31T09:30:00Z"
}
}
],
"page": 1,
"pages": 1,
"total": 1,
"limit": 50,
"has_more": false
}