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

# Criar Lead

> Cria um novo lead. Se já existir um lead com o mesmo telefone, retorna o existente sem duplicar.



## OpenAPI

````yaml POST /leads
openapi: 3.1.0
info:
  title: Cordialy API
  description: >-
    API pública para integração com a plataforma Cordialy de atendimento via
    WhatsApp com IA.
  version: 1.0.0
  contact:
    email: suporte@cordialy.ai
servers:
  - url: https://api.cordialy.ai/integrations/v1
    description: Produção
security:
  - ApiKeyAuth: []
paths:
  /leads:
    post:
      tags:
        - Leads
      summary: Criar lead
      description: >-
        Cria um novo lead. Se já existir um lead com o mesmo telefone, retorna o
        existente sem duplicar.
      operationId: createLead
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              required:
                - customer_phone
              properties:
                customer_phone:
                  type: string
                  description: Número no formato E.164
                  example: '5511999998888'
                name:
                  type: string
                  example: João Silva
                status:
                  type: string
                  enum:
                    - pending
                    - in_progress
                    - converted
                    - lost
                  default: pending
      responses:
        '201':
          description: Lead criado com sucesso
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Lead'
        '400':
          description: Dados inválidos
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Erro'
components:
  schemas:
    Lead:
      type: object
      properties:
        id:
          type: string
          format: uuid
          description: Identificador único do lead
        store_id:
          type: string
          format: uuid
          description: ID da loja
        name:
          type: string
          nullable: true
          description: Nome do lead
        customer_phone:
          type: string
          description: 'Telefone no formato E.164 (ex: 5511999998888)'
        status:
          type: string
          enum:
            - pending
            - in_progress
            - converted
            - lost
          description: Status atual do lead
        seller_id:
          type: string
          format: uuid
          nullable: true
          description: Vendedor responsável
        interaction_count:
          type: integer
          description: Número de interações realizadas
        ai_paused_until:
          type: string
          format: date-time
          nullable: true
          description: IA pausada até esta data/hora
        created_at:
          type: string
          format: date-time
        updated_at:
          type: string
          format: date-time
    Erro:
      type: object
      properties:
        error:
          type: string
        message:
          type: string
  securitySchemes:
    ApiKeyAuth:
      type: apiKey
      in: header
      name: X-API-Key
      description: Chave de API gerada na plataforma em Integrações → API Keys

````