Skip to content

Export

Export all leads (or a filtered subset) to CSV, JSON, or XLSX. Unlike the List endpoint, export returns all matching records in a single response — no pagination, no cursor. Use this for data backups, bulk processing, or feeding external tools.

GET /leads/export
ParameterTypeDescription
formatstringcsv, json, or xlsx (required)
filterstringSame filter expressions as List Leads (repeatable)
sort_bystringSort field
sort_orderstringASC or DESC
Terminal window
# Export all leads as CSV
curl -o leads.csv \
"https://api.klozeo.com/api/v1/leads/export?format=csv" \
-H "X-API-Key: sk_live_your_key"
# Export Paris leads with rating ≥ 4, sorted by rating descending
curl -o leads.xlsx \
"https://api.klozeo.com/api/v1/leads/export?format=xlsx&filter=and.eq.city.Paris&filter=and.gte.rating.4&sort_by=rating&sort_order=DESC" \
-H "X-API-Key: sk_live_your_key"
FormatContent-TypeNotes
csvtext/csvUTF-8 encoded, comma-separated
jsonapplication/jsonArray of full lead objects
xlsxapplication/vnd.openxmlformats-officedocument.spreadsheetml.sheetExcel-compatible