Skip to main content
GET
/
v1
/
contacts
/
export
Export Contacts
curl --request GET \
  --url https://api.example.com/v1/contacts/export

Request

Returns a CSV file of contacts matching the query. Use for analytics exports, backups, or migrating data out of LeadLex. The response is streamed with Content-Type: text/csv; charset=utf-8.

Query Parameters

limit
integer
default:"10000"
Maximum rows to return. Maximum 50,000 per request. For larger exports, paginate by created_after / created_before.
created_after
string
ISO 8601 lower bound on created_at.
created_before
string
ISO 8601 upper bound on created_at.
list_id
string
Filter by list membership.
tag
string
Filter to contacts carrying the given tag. Repeat to require multiple tags.
fields
string
Comma-separated list of fields to include. Defaults to the standard export set (id, full_name, email, phone, job_title, company_name, linkedin_url, tags, created_at).

Headers

Authorization: Bearer wbk_your_api_key_here
Accept: text/csv

Response

The body is a CSV document. Responses include X-RateLimit-Limit, X-RateLimit-Remaining, X-RateLimit-Reset, X-Request-ID, and Content-Disposition: attachment; filename="contacts-export.csv". The first row is always the header.
curl "https://data.leadlex.com/functions/v1/api-gateway/v1/contacts/export?limit=5000" \
  -H "Authorization: Bearer wbk_your_api_key_here" \
  -H "Accept: text/csv" \
  -o contacts.csv

Example Response

id,full_name,email,phone,job_title,company_name,linkedin_url,tags,created_at
123e4567-e89b-12d3-a456-426614174000,Jane Doe,jane@acme.com,+1-555-0100,General Counsel,Acme Corp,https://linkedin.com/in/janedoe,"lead,priority",2026-04-15T09:00:00Z
456e7890-a1b2-34c5-d678-901234567890,Bob Smith,bob@beta.com,+1-555-0200,CEO,Beta LLP,,"prospect",2026-04-16T14:30:00Z

Errors

StatusCodeDescription
400validation_errorlimit exceeds 50,000 or invalid filter value
401invalid_keyInvalid or expired API key
403insufficient_permissionsMissing read:contacts permission
429rate_limitedExport is rate-limited to 10 calls per hour per workspace