Skip to main content
Search...C
Leads

Get Leads

Returns a list of leads associated with your account. The leads are returned in reverse chronological order, with the most recently created leads appearing first.

Endpoint

GET/api/v1/leads

Query Parameters

NameTypeDescription
campaign_idstringFilter leads by campaign ID
statusstringFilter by lead status (new, contacted, qualified, converted)
limitintegerMaximum number of leads to return (default: 20, max: 100)
offsetintegerNumber of leads to skip for pagination
created_afterstringFilter leads created after this ISO 8601 timestamp
created_beforestringFilter leads created before this ISO 8601 timestamp

Response

Returns an object containing an array of lead objects and pagination metadata.

Response Schema
{
  "data": [
    {
      "id": "lead_abc123",
      "campaign_id": "camp_xyz789",
      "status": "new",
      "first_name": "John",
      "last_name": "Doe",
      "email": "john.doe@example.com",
      "phone": "+15551234567",
      "address": {
        "street": "123 Main St",
        "city": "Austin",
        "state": "TX",
        "zip": "78701"
      },
      "created_at": "2024-01-15T10:30:00Z",
      "updated_at": "2024-01-15T10:30:00Z"
    }
  ],
  "pagination": {
    "total": 150,
    "limit": 20,
    "offset": 0,
    "has_more": true
  }
}

Example

cURL
curl "https://api.adbuy.ai/api/v1/leads?limit=10&status=new" \
  -H "Authorization: Bearer YOUR_API_KEY"
Response
{
  "data": [
    {
      "id": "lead_abc123",
      "campaign_id": "camp_xyz789",
      "status": "new",
      "first_name": "John",
      "last_name": "Doe",
      "email": "john.doe@example.com",
      "phone": "+15551234567",
      "address": {
        "street": "123 Main St",
        "city": "Austin",
        "state": "TX",
        "zip": "78701"
      },
      "created_at": "2024-01-15T10:30:00Z",
      "updated_at": "2024-01-15T10:30:00Z"
    }
  ],
  "pagination": {
    "total": 150,
    "limit": 10,
    "offset": 0,
    "has_more": true
  }
}