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

# List Leads

> Get all leads with filtering and pagination

## Endpoint

<Card>
  <strong>GET</strong> `/backend/leads`
</Card>

## Query Parameters

<ParamField query="limit" type="integer" default="20">
  Number of leads to return (max: 100)
</ParamField>

<ParamField query="offset" type="integer" default="0">
  Number of leads to skip
</ParamField>

<ParamField query="search" type="string">
  Search by name, email, or phone
</ParamField>

<ParamField query="status_id" type="string">
  Filter by status
</ParamField>

<ParamField query="tag_ids" type="string">
  Filter by tags (comma-separated)
</ParamField>

## Request Example

<CodeGroup>
  ```bash cURL theme={null}
  curl -X GET "https://api.leavo.ai/backend/leads?limit=50&search=john" \
    -H "Authorization: Bearer your_api_key_here"
  ```

  ```javascript JavaScript theme={null}
  const response = await fetch('https://api.leavo.ai/backend/leads?limit=50&search=john', {
    headers: {
      'Authorization': 'Bearer your_api_key_here'
    }
  });

  const data = await response.json();
  ```
</CodeGroup>

## Response

```json theme={null}
{
  "success": true,
  "data": [
    {
      "id": "uuid",
      "name": "John Smith",
      "email": "john@example.com",
      "phone": "+15551234567",
      "company": "XYZ Company",
      "status": {
        "id": "uuid",
        "name": "New",
        "color": "#10B981"
      },
      "tags": [
        {
          "id": "uuid",
          "name": "VIP",
          "color": "#F59E0B"
        }
      ],
      "created_at": "2024-01-15T10:30:00Z",
      "updated_at": "2024-01-15T10:30:00Z"
    }
  ],
  "pagination": {
    "total": 150,
    "limit": 50,
    "offset": 0,
    "has_more": true
  }
}
```
