List Leads
GET
/api/v1/leadsReturns visitor leads captured through the bot's lead collection flow — typically name, email, phone, and custom fields.
Required scope: read
Query parameters
limitintegerquerydefault: 50Number of leads to return. Min 1, max 200.
offsetintegerquerydefault: 0Zero-based offset for pagination.
Response
leadsarrayArray of lead objects.
totalintegerTotal leads for this bot across all pages.
limitintegerLimit used in this request.
offsetintegerOffset used in this request.
Example
curl "https://api.personaliai.com/api/v1/leads?limit=20" \
-H "Authorization: Bearer chatty_sk_your_key"import httpx
client = httpx.Client(base_url="https://api.personaliai.com",
headers={"Authorization": "Bearer chatty_sk_your_key"})
all_leads, offset = [], 0
while True:
data = client.get("/api/v1/leads", params={"limit": 100, "offset": offset}).json()
all_leads.extend(data["leads"])
if len(all_leads) >= data["total"]: break
offset += 100200 OK:
{
"leads": [
{
"id": "ld_001abc",
"bot_id": "a1b2c3d4-...",
"session_id": "visitor-xyz-789",
"name": "Sarah Chen",
"email": "sarah@example.com",
"phone": "+1-555-0123",
"extra": { "company": "Acme Corp" },
"created_at": "2026-07-06T14:23:11Z"
}
],
"total": 247,
"limit": 20,
"offset": 0
}