> ## Documentation Index
> Fetch the complete documentation index at: https://www.orwel.io/docs/llms.txt
> Use this file to discover all available pages before exploring further.

# List Leads

> Retrieve a paginated list of leads for your workspace

> [!NOTE]
>
> Requires an [API key](https://www.orwel.io/docs/authentication.md) (`orwel_sk_`) with the `leads:read` scope.

Each lead is one person in your workspace. `id` is unique and never changes, so an external system can upsert by it. When the same person converts again, Orwel adds a conversion to the same lead instead of creating a new one; read each of them with [List Conversions](https://www.orwel.io/docs/api-reference/conversions/list.md).

## Query Parameters

**limit** `integer` (default: 50)

Maximum number of results to return (max: 100)

**offset** `integer` (default: 0)

Number of results to skip for pagination

**source** `string`

Filter leads by source (e.g., "website", "referral")

**code** `string`

Filter leads by code

**created\_after** `string`

Filter leads created after this date (ISO 8601 format)

**created\_before** `string`

Filter leads created before this date (ISO 8601 format)

## Response

**data** `array`

Array of lead objects

**Lead Object**

**id** `string`

Unique identifier for the lead

**visitor\_id** `string`

Associated visitor ID

**workspace\_id** `string`

Workspace ID (always your workspace)

**code** `string`

Lead code or identifier

**source** `string`

Source of the lead

**created\_at** `string`

ISO 8601 timestamp of creation

**updated\_at** `string`

ISO 8601 timestamp of last update

**properties** `object`

Custom properties (JSONB)

**location** `object`

Location data (JSONB)

**identity\_id** `string`

Associated identity ID

**session\_id** `string`

Associated session ID

**summary** `object`

Lead summary data (JSONB)

**company\_id** `string`

Associated company ID

**pagination** `object`

Pagination information

**Pagination Object**

**limit** `integer`

Number of results per page

**offset** `integer`

Current offset

**total** `integer`

Total number of leads matching the query

```bash cURL theme={null}
curl -X GET "https://api.orwel.io/api/v1/leads?limit=10&source=website" \
  -H "Authorization: Bearer orwel_sk_YOUR_KEY"
```

```javascript JavaScript theme={null}
const response = await fetch(
  'https://api.orwel.io/api/v1/leads?limit=10&source=website',
  {
    headers: {
      'Authorization': 'Bearer orwel_sk_YOUR_KEY'
    }
  }
);

const data = await response.json();
console.log(data);
```

```python Python theme={null}
import requests

headers = {
    'Authorization': 'Bearer orwel_sk_YOUR_KEY'
}

params = {
    'limit': 10,
    'source': 'website'
}

response = requests.get(
    'https://api.orwel.io/api/v1/leads',
    headers=headers,
    params=params
)

data = response.json()
print(data)
```

```json Response theme={null}
{
  "data": [
    {
      "id": "550e8400-e29b-41d4-a716-446655440000",
      "visitor_id": "660e8400-e29b-41d4-a716-446655440001",
      "workspace_id": "770e8400-e29b-41d4-a716-446655440002",
      "code": "lead_001",
      "source": "website",
      "created_at": "2025-01-15T10:30:00Z",
      "updated_at": "2025-01-15T10:30:00Z",
      "properties": {
        "industry": "technology",
        "company_size": "50-100"
      },
      "location": {
        "city": "San Francisco",
        "country": "USA"
      },
      "identity_id": "880e8400-e29b-41d4-a716-446655440003",
      "session_id": "990e8400-e29b-41d4-a716-446655440004",
      "summary": {
        "score": 85,
        "status": "qualified"
      },
      "company_id": "aa0e8400-e29b-41d4-a716-446655440005"
    }
  ],
  "pagination": {
    "limit": 10,
    "offset": 0,
    "total": 150
  }
}
```


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.