Skip to main content
Search...C
Insertion API

List Leads

Returns leads for the authenticated account in reverse chronological order. Supports cursor-based pagination via the created_at timestamp returned in nextCursor. Cross-account lookups are impossible — every result is scoped to the API key's account.

Endpoint

GET/api/v1/insertion/leads

Authentication

Same as Create Lead. GET requires the leads:read scope on the API key.

Query Parameters

NameTypeDescription
limitintegerPage size. Default 25, max 100.
cursorstringISO 8601 timestamp from a previous response's nextCursor. Returns leads created strictly before this timestamp.
campaign_idintegerFilter to a single campaign.
external_lead_idstringFilter to a single partner-supplied lead id. Useful for partner-side reconciliation.

Response

Response Schema
{
  "ok": true,
  "leads": [
    {
      "id": "uuid",
      "account_id": "uuid",
      "campaign_id": 123,
      "external_lead_id": "uuid-from-partner",
      "phone": "+15551234567",
      "email": "lead@example.com",
      "first_name": "Jane",
      "last_name": "Doe",
      "source": "...",
      "source_form_url": "...",
      "tcpa_consent": true,
      "tcpa_consent_text": "...",
      "tcpa_consent_timestamp": "2024-01-15T10:30:00Z",
      "custom_fields": { },
      "created_at": "2024-01-15T10:30:00Z",
      "updated_at": "2024-01-15T10:30:00Z"
    }
  ],
  "nextCursor": "2024-01-15T10:30:00Z"
}

Pagination

When nextCursor is non-null, more results exist. Pass it back as the cursor query param to fetch the next page. When the response returns nextCursor: null, you have reached the last page.

Example

cURL (Bearer)
curl "https://api.adbuy.ai/api/v1/insertion/leads?limit=50&campaign_id=123" \
  -H "Authorization: Bearer sk_live_..."
Paginated follow-up
curl "https://api.adbuy.ai/api/v1/insertion/leads?limit=50&cursor=2024-01-15T10:30:00Z" \
  -H "Authorization: Bearer sk_live_..."