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

# Modifier un prospect

> Met à jour partiellement un prospect.



## OpenAPI

````yaml openapi.json PATCH /v1/leads/{lead}
openapi: 3.1.0
info:
  title: Setteo API
  summary: API REST Setteo
  description: >-
    API REST pour gérer les tags, prospects, scénarios et conversations de votre
    espace de travail Setteo.
  version: 1.0.0
  license:
    name: Proprietary
    identifier: LicenseRef-Proprietary
servers:
  - url: https://api.setteo.io
    description: Production
security:
  - bearerAuth: []
tags:
  - name: Tags
    description: Gestion des étiquettes.
  - name: Scenarios
    description: Gestion des scénarios automatisés.
  - name: Scenario Prospects
    description: Inscription et suivi des prospects dans les scénarios.
  - name: Prospects
    description: Gestion des contacts et prospects.
  - name: Prospects Tags
    description: Gestion des étiquettes associées aux prospects.
  - name: Conversations
    description: Consultation des conversations et messages.
paths:
  /v1/leads/{lead}:
    patch:
      tags:
        - Prospects
      summary: Modifier un prospect
      description: Met à jour partiellement un prospect.
      operationId: patchLead
      parameters:
        - name: lead
          in: path
          required: true
          schema:
            type: integer
            example: 1
          description: Identifiant du prospect.
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/LeadUpdateRequest'
      responses:
        '200':
          description: Prospect mis à jour.
          content:
            application/json:
              schema:
                type: object
                required:
                  - data
                properties:
                  data:
                    $ref: '#/components/schemas/Lead'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '403':
          $ref: '#/components/responses/Forbidden'
        '404':
          $ref: '#/components/responses/NotFound'
        '422':
          $ref: '#/components/responses/ValidationError'
        '429':
          $ref: '#/components/responses/RateLimited'
        '500':
          $ref: '#/components/responses/ServerError'
      security:
        - bearerAuth: []
components:
  schemas:
    LeadUpdateRequest:
      type: object
      properties:
        ext_id:
          type:
            - string
            - 'null'
          maxLength: 255
          example: crm_123
        first_name:
          type:
            - string
            - 'null'
          maxLength: 255
          example: Jean
        last_name:
          type:
            - string
            - 'null'
          maxLength: 255
          example: Dupont
        username:
          type:
            - string
            - 'null'
          maxLength: 255
          example: jdupont
        image:
          type:
            - string
            - 'null'
          example: https://example.com/avatar.jpg
        email:
          type:
            - string
            - 'null'
          format: email
          maxLength: 255
          example: jean.dupont@example.com
        phone:
          type:
            - string
            - 'null'
          maxLength: 255
          example: '+33612345678'
        source:
          type:
            - string
            - 'null'
          enum:
            - webhook
            - instagram
            - whatsapp
            - import
            - api
            - iclosed
            - calendly
            - null
          example: api
        warmth:
          type:
            - string
            - 'null'
          enum:
            - cold
            - warm
            - hot
            - null
          example: warm
        pipeline_stage:
          type:
            - string
            - 'null'
          enum:
            - new
            - contacted
            - engaged
            - qualified
            - call_booked
            - won
            - lost
            - null
          example: qualified
        data:
          type:
            - object
            - 'null'
          additionalProperties: true
          example:
            company: Acme Corp
        variables:
          type:
            - object
            - 'null'
          additionalProperties: true
          example:
            plan: pro
        enrolled_at:
          type:
            - string
            - 'null'
          format: date-time
          example: '2026-07-08T12:00:00Z'
        whatsapp_phone_number_id:
          type:
            - integer
            - 'null'
          example: 12
        tag_ids:
          type: array
          items:
            type: integer
          example:
            - 1
            - 2
        attach_tag_ids:
          type: array
          items:
            type: integer
          example:
            - 3
        detach_tag_ids:
          type: array
          items:
            type: integer
          example:
            - 2
    Lead:
      type: object
      required:
        - id
        - ext_id
        - first_name
        - last_name
        - username
        - image
        - email
        - phone
        - source
        - warmth
        - pipeline_stage
        - variables
        - whatsapp_phone_number_id
        - created_at
        - updated_at
      properties:
        id:
          type: integer
          example: 123
        ext_id:
          type:
            - string
            - 'null'
          maxLength: 255
          example: crm_123
        first_name:
          type:
            - string
            - 'null'
          maxLength: 255
          example: Jean
        last_name:
          type:
            - string
            - 'null'
          maxLength: 255
          example: Dupont
        username:
          type:
            - string
            - 'null'
          maxLength: 255
          example: jdupont
        image:
          type:
            - string
            - 'null'
          example: https://example.com/avatar.jpg
        email:
          type:
            - string
            - 'null'
          format: email
          maxLength: 255
          example: jean.dupont@example.com
        phone:
          type:
            - string
            - 'null'
          maxLength: 255
          example: '+33612345678'
        source:
          type:
            - string
            - 'null'
          enum:
            - webhook
            - instagram
            - whatsapp
            - import
            - api
            - iclosed
            - calendly
            - null
          example: api
        warmth:
          type:
            - string
            - 'null'
          enum:
            - cold
            - warm
            - hot
            - null
          example: warm
        pipeline_stage:
          type:
            - string
            - 'null'
          enum:
            - new
            - contacted
            - engaged
            - qualified
            - call_booked
            - won
            - lost
            - null
          example: qualified
        variables:
          type:
            - object
            - 'null'
          additionalProperties: true
          example:
            plan: pro
        whatsapp_phone_number_id:
          type:
            - integer
            - 'null'
          example: 12
        tags:
          type: array
          items:
            $ref: '#/components/schemas/Tag'
        created_at:
          type:
            - string
            - 'null'
          format: date-time
          example: '2026-07-08T12:00:00Z'
        updated_at:
          type:
            - string
            - 'null'
          format: date-time
          example: '2026-07-08T12:00:00Z'
    Tag:
      type: object
      required:
        - id
        - label
        - description
        - pipeline_stage
        - created_at
        - updated_at
      properties:
        id:
          type: integer
          example: 1
        label:
          type: string
          example: Prospect chaud
        description:
          type:
            - string
            - 'null'
          example: Prospect prêt à réserver un appel.
        pipeline_stage:
          type:
            - string
            - 'null'
          enum:
            - new
            - contacted
            - engaged
            - qualified
            - call_booked
            - won
            - lost
            - null
          example: qualified
        created_at:
          type:
            - string
            - 'null'
          format: date-time
          example: '2026-07-08T12:00:00Z'
        updated_at:
          type:
            - string
            - 'null'
          format: date-time
          example: '2026-07-08T12:00:00Z'
    ErrorResponse:
      type: object
      required:
        - message
      properties:
        message:
          type: string
          example: Unauthenticated.
    ValidationError:
      type: object
      required:
        - message
        - errors
      properties:
        message:
          type: string
          example: The given data was invalid.
        errors:
          type: object
          additionalProperties:
            type: array
            items:
              type: string
          example:
            phone:
              - The phone has already been taken.
  responses:
    Unauthorized:
      description: Token manquant ou invalide.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorResponse'
    Forbidden:
      description: Accès refusé.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorResponse'
    NotFound:
      description: Ressource introuvable.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorResponse'
    ValidationError:
      description: Erreur de validation.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ValidationError'
    RateLimited:
      description: Limite de taux dépassée.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorResponse'
    ServerError:
      description: Erreur serveur interne.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorResponse'
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      bearerFormat: API token
      description: Token API généré depuis votre espace de travail Setteo.

````