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

# Actualizar lead existente

> Actualiza un lead existente con la información proporcionada.
Solo se actualizan los campos enviados en la petición.



## OpenAPI

````yaml /api/openapi.json put /leads/{lead}
openapi: 3.1.0
info:
  title: Isprop API
  version: 1.0.0
  description: API para gestión de unidades inmobiliarias y leads de Isprop
servers:
  - url: https://{tenantDomain}/api/v1
    description: Dominio del tenant
    variables:
      tenantDomain:
        default: tenant.example.com
        description: Dominio asignado al tenant, sin protocolo ni ruta.
security:
  - http: []
tags:
  - name: Unit
  - name: Project
  - name: Product
  - name: Typology
  - name: Lead
  - name: Lead Channel
  - name: Attribute
paths:
  /leads/{lead}:
    put:
      tags:
        - Lead
      summary: Actualizar lead existente
      description: |-
        Actualiza un lead existente con la información proporcionada.
        Solo se actualizan los campos enviados en la petición.
      operationId: updateLead
      parameters:
        - name: lead
          in: path
          required: true
          description: The lead UUID
          schema:
            type: integer
      responses:
        '200':
          description: '`Lead`'
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    $ref: '#/components/schemas/Lead'
                required:
                  - data
        '401':
          $ref: '#/components/responses/AuthenticationException'
        '404':
          $ref: '#/components/responses/ModelNotFoundException'
        '422':
          $ref: '#/components/responses/ValidationException'
components:
  schemas:
    Lead:
      type: object
      properties:
        id:
          type: string
        profile:
          $ref: '#/components/schemas/Profile'
          description: Profile data with address
        campaign:
          type: string
        source:
          type: string
        status:
          type: string
        status_label:
          type: string
        notes:
          type: string
        score:
          type: string
        last_contacted_at:
          type: string
        converted_at:
          type: string
        lost_reason:
          type: string
        created_at:
          type: string
        updated_at:
          type: string
        temperature:
          type: string
          description: ── Calificación comercial (CRM) ────────────────────────────
        temperature_label:
          type: string
        probability:
          type: string
        expected_revenue:
          type: string
        currency:
          type: string
        estimated_close_date:
          type: string
        next_contact_at:
          type: string
        tags:
          type: string
        requirements:
          anyOf:
            - $ref: '#/components/schemas/OpportunityRequirement'
            - type: 'null'
        pipeline:
          type:
            - object
            - 'null'
          description: |-
            Etapa del pipeline: solo lectura. La resuelve LeadObserver a partir
            del `status`; escribirla desde la API saltearía los guardrails de
            OpportunityStageService.
          properties:
            id:
              type: string
            name:
              type: string
          required:
            - id
            - name
        pipeline_stage:
          type:
            - object
            - 'null'
          properties:
            id:
              type: string
            name:
              type: string
            category:
              type: string
            probability:
              type: string
          required:
            - id
            - name
            - category
            - probability
        project:
          anyOf:
            - $ref: '#/components/schemas/ProjectSummary'
            - type: 'null'
        product:
          anyOf:
            - $ref: '#/components/schemas/ProductSummary'
            - type: 'null'
        unit:
          type:
            - object
            - 'null'
          properties:
            id:
              type: string
            sku:
              type: string
            name:
              type: string
            status:
              type: string
            price:
              type: string
            currency_type:
              type: string
          required:
            - id
            - sku
            - name
            - status
            - price
            - currency_type
        lead_channel:
          type: object
          properties:
            id:
              type: string
            name:
              type: string
            key:
              type: string
          required:
            - id
            - name
            - key
        agent:
          anyOf:
            - $ref: '#/components/schemas/Agent'
            - type: 'null'
      required:
        - id
        - campaign
        - source
        - status
        - status_label
        - notes
        - score
        - last_contacted_at
        - converted_at
        - lost_reason
        - created_at
        - updated_at
        - temperature
        - temperature_label
        - probability
        - expected_revenue
        - currency
        - estimated_close_date
        - next_contact_at
      title: Lead
    Profile:
      type: object
      properties:
        first_name:
          type: string
        last_name:
          type: string
        full_name:
          type: string
        email:
          type: string
        phone:
          type: string
        identification_number:
          type: string
        cuit:
          type: string
        razon_social:
          type: string
        business_position:
          type: string
        description:
          type: string
        preferred_contact_channel:
          type: string
          description: ── Preferencias de contacto (CRM) ──────────────────────────
        preferred_contact_time:
          type: string
        timezone:
          type: string
        marketing_consent:
          type: string
        marketing_consent_at:
          type: string
        address:
          $ref: '#/components/schemas/Address'
          description: Address relationship
      required:
        - first_name
        - last_name
        - full_name
        - email
        - phone
        - identification_number
        - cuit
        - razon_social
        - business_position
        - description
        - preferred_contact_channel
        - preferred_contact_time
        - timezone
        - marketing_consent
        - marketing_consent_at
      title: Profile
    OpportunityRequirement:
      type: object
      properties:
        budget_min:
          type: string
        budget_max:
          type: string
        currency:
          type: string
        bedrooms_min:
          type: string
        bedrooms_max:
          type: string
        surface_min:
          type: string
        surface_max:
          type: string
        purchase_horizon:
          type: string
        financing_required:
          type: string
        property_types:
          type: string
        preferred_zones:
          type: string
        attribute_filters:
          type: string
        notes:
          type: string
      required:
        - budget_min
        - budget_max
        - currency
        - bedrooms_min
        - bedrooms_max
        - surface_min
        - surface_max
        - purchase_horizon
        - financing_required
        - property_types
        - preferred_zones
        - attribute_filters
        - notes
      title: OpportunityRequirement
    ProjectSummary:
      type: object
      properties:
        id:
          type: string
        slug:
          type: string
        name:
          type: string
        description:
          type: string
        tagline:
          type: string
        store_active:
          type: string
        logos:
          type:
            - array
            - 'null'
          items: {}
        address:
          anyOf:
            - $ref: '#/components/schemas/AddressSummary'
            - type: 'null'
        product_types:
          type:
            - array
            - 'null'
          description: >-
            Tipos de producto distintos entre los products del proyecto (ej:
            ["lotes"] o ["departamentos","cocheras","oficinas"])
          items: {}
        lots_map:
          type:
            - array
            - 'null'
          description: >-
            Config del overlay de tiles para la vista de mapa de lotes (null si
            el emprendimiento no tiene uno definido).
          items: {}
        has_lots_map:
          type: boolean
          description: >-
            Conveniencia para mostrar el toggle Lista/Mapa sin inspeccionar
            `lots_map`.
        published_at:
          type: string
        created_at:
          type: string
        updated_at:
          type: string
      required:
        - id
        - slug
        - name
        - description
        - tagline
        - store_active
        - logos
        - product_types
        - lots_map
        - has_lots_map
        - published_at
        - created_at
        - updated_at
      title: ProjectSummary
    ProductSummary:
      type: object
      properties:
        id:
          type: string
        slug:
          type: string
        name:
          type: string
        description:
          type: string
        product_type:
          type: string
        product_type_label:
          type: string
        type_labels:
          type: object
          properties:
            sector:
              anyOf:
                - type: string
                - type: string
                  enum:
                    - Sector
            unit:
              anyOf:
                - type: string
                - type: string
                  enum:
                    - Unidad
          required:
            - sector
            - unit
        thumbnail_url:
          type:
            - string
            - 'null'
        store_active:
          type: string
        logos:
          type:
            - array
            - 'null'
          description: >-
            Override: null cuando el producto no tiene logo propio (el front cae
            al del project).
          items: {}
        project:
          $ref: '#/components/schemas/ProjectSummary'
        address:
          anyOf:
            - $ref: '#/components/schemas/AddressSummary'
            - type: 'null'
        published_at:
          type: string
        created_at:
          type: string
        updated_at:
          type: string
      required:
        - id
        - slug
        - name
        - description
        - product_type
        - product_type_label
        - type_labels
        - thumbnail_url
        - store_active
        - logos
        - published_at
        - created_at
        - updated_at
      title: ProductSummary
    Agent:
      type: object
      properties:
        id:
          type: string
        first_name:
          type: string
        last_name:
          type: string
        full_name:
          type: string
        email:
          type: string
        phone:
          type: string
        media:
          type: object
          properties:
            avatar:
              anyOf:
                - $ref: '#/components/schemas/MediaImage'
                - type: 'null'
          required:
            - avatar
      required:
        - id
        - first_name
        - last_name
        - full_name
        - email
        - phone
        - media
      title: Agent
    Address:
      type: object
      properties:
        country:
          type: string
        state:
          type: string
        city:
          type: string
        neighborhood:
          type: string
        district:
          type: string
        postal_code:
          type: string
        address_line_1:
          type: string
        address_line_2:
          type: string
        phone:
          type: string
        latitude:
          type: string
        longitude:
          type: string
      required:
        - country
        - state
        - city
        - neighborhood
        - district
        - postal_code
        - address_line_1
        - address_line_2
        - phone
        - latitude
        - longitude
      title: Address
    AddressSummary:
      type: object
      properties:
        country:
          type: string
        state:
          type: string
        city:
          type: string
        neighborhood:
          type: string
      required:
        - country
        - state
        - city
        - neighborhood
      title: AddressSummary
    MediaImage:
      type: object
      properties:
        id:
          type: string
        name:
          type: string
        file_name:
          type: string
        mime_type:
          type: string
        size:
          type: string
        order:
          type: string
        urls:
          type: string
      required:
        - id
        - name
        - file_name
        - mime_type
        - size
        - order
        - urls
      title: MediaImage
  responses:
    AuthenticationException:
      description: Unauthenticated
      content:
        application/json:
          schema:
            type: object
            properties:
              message:
                type: string
                description: Error overview.
            required:
              - message
    ModelNotFoundException:
      description: Not found
      content:
        application/json:
          schema:
            type: object
            properties:
              message:
                type: string
                description: Error overview.
            required:
              - message
    ValidationException:
      description: Validation error
      content:
        application/json:
          schema:
            type: object
            properties:
              message:
                type: string
                description: Errors overview.
              errors:
                type: object
                description: A detailed description of each field that failed validation.
                additionalProperties:
                  type: array
                  items:
                    type: string
            required:
              - message
              - errors
  securitySchemes:
    http:
      type: http
      scheme: bearer
      bearerFormat: sanctum

````

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