Pular para o conteúdo principal
GET
/
backend
/
leads
curl -X GET "https://api.leavo.ai/backend/leads?limit=10" \
  -H "Authorization: Bearer sua_chave_aqui"
[
  {
    "id": "550e8400-e29b-41d4-a716-446655440000",
    "tenant_id": "660e8400-e29b-41d4-a716-446655440000",
    "name": "João Silva",
    "email": "[email protected]",
    "phone": "+5511999999999",
    "company": "Empresa XYZ",
    "status_id": "770e8400-e29b-41d4-a716-446655440000",
    "status": {
      "id": "770e8400-e29b-41d4-a716-446655440000",
      "name": "Novo",
      "description": "Lead novo",
      "color": "#007bff",
      "default": true
    },
    "tags": [
      {
        "id": "880e8400-e29b-41d4-a716-446655440000",
        "name": "VIP",
        "color": "#ffc107"
      }
    ],
    "session_id": "990e8400-e29b-41d4-a716-446655440000",
    "session_status": "active",
    "created_at": "2024-01-01T00:00:00Z",
    "updated_at": "2024-01-15T10:30:00Z"
  }
]

Request

limit
integer
padrão:"50"
Número máximo de leads a retornar
offset
integer
padrão:"0"
Número de leads a pular (para paginação)
Buscar por nome, email ou telefone
status_id
string
Filtrar por ID do status

Response

array
Lead[]
Lista de leads
curl -X GET "https://api.leavo.ai/backend/leads?limit=10" \
  -H "Authorization: Bearer sua_chave_aqui"
[
  {
    "id": "550e8400-e29b-41d4-a716-446655440000",
    "tenant_id": "660e8400-e29b-41d4-a716-446655440000",
    "name": "João Silva",
    "email": "[email protected]",
    "phone": "+5511999999999",
    "company": "Empresa XYZ",
    "status_id": "770e8400-e29b-41d4-a716-446655440000",
    "status": {
      "id": "770e8400-e29b-41d4-a716-446655440000",
      "name": "Novo",
      "description": "Lead novo",
      "color": "#007bff",
      "default": true
    },
    "tags": [
      {
        "id": "880e8400-e29b-41d4-a716-446655440000",
        "name": "VIP",
        "color": "#ffc107"
      }
    ],
    "session_id": "990e8400-e29b-41d4-a716-446655440000",
    "session_status": "active",
    "created_at": "2024-01-01T00:00:00Z",
    "updated_at": "2024-01-15T10:30:00Z"
  }
]