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

# Listar leads

> Retorna leads da organização ativa, paginados via cursor. Filtros opcionais por pipeline, stage, owner, tag.



## OpenAPI

````yaml /openapi.json get /leads
openapi: 3.1.0
info:
  title: Apollo Space API
  description: >-
    API HTTP do Apollo Space — pré-visualização. Os endpoints aqui descritos são
    o design pretendido; alguns podem mudar antes da estabilização pública. Pra
    acesso antecipado, fale com support@apollospace.ai.
  version: 0.1.0-preview
  contact:
    email: support@apollospace.ai
servers:
  - url: https://api.apollospace.ai/v1
    description: Produção
security:
  - bearerAuth: []
tags:
  - name: Leads
    description: Operações no CRM — listar, criar, atualizar leads.
  - name: Faturamento
    description: Saldo, planos, histórico da carteira de Stars.
paths:
  /leads:
    get:
      tags:
        - Leads
      summary: Listar leads
      description: >-
        Retorna leads da organização ativa, paginados via cursor. Filtros
        opcionais por pipeline, stage, owner, tag.
      operationId: listLeads
      parameters:
        - name: X-Organization-Id
          in: header
          required: true
          schema:
            type: string
            format: uuid
          description: UUID da organização ativa
        - name: cursor
          in: query
          schema:
            type: string
          description: Cursor opaco da página seguinte
        - name: pipeline_id
          in: query
          schema:
            type: string
            format: uuid
        - name: stage
          in: query
          schema:
            type: string
        - name: limit
          in: query
          schema:
            type: integer
            default: 50
            maximum: 200
      responses:
        '200':
          description: Lista paginada
          content:
            application/json:
              schema:
                type: object
                properties:
                  items:
                    type: array
                    items:
                      $ref: '#/components/schemas/Lead'
                  next_cursor:
                    type: string
                    nullable: true
        '401':
          $ref: '#/components/responses/Unauthorized'
        '403':
          $ref: '#/components/responses/Forbidden'
components:
  schemas:
    Lead:
      type: object
      properties:
        id:
          type: string
          format: uuid
        contact_name:
          type: string
        company_name:
          type: string
          nullable: true
        email:
          type: string
          format: email
          nullable: true
        phone:
          type: string
          nullable: true
        pipeline_id:
          type: string
          format: uuid
        stage:
          type: string
        owner_id:
          type: string
          format: uuid
          nullable: true
        tags:
          type: array
          items:
            type: string
        value_cents:
          type: integer
          nullable: true
        created_at:
          type: string
          format: date-time
        updated_at:
          type: string
          format: date-time
    Error:
      type: object
      properties:
        error:
          type: object
          properties:
            code:
              type: string
              description: Identificador estável da família de erro
            message:
              type: string
              description: Descrição legível (não estável entre versões)
            request_id:
              type: string
              description: Cole no chamado ao suporte
  responses:
    Unauthorized:
      description: Token ausente ou expirado
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
    Forbidden:
      description: Autenticado mas sem permissão para o recurso
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      bearerFormat: JWT
      description: Cognito id_token obtido após login

````