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

# Switch lead's customer profile

> Switches the customer profile of a lead



## OpenAPI

````yaml post /leads/{leadId}/switchCustomerProfile
openapi: 3.0.1
info:
  title: AttentPublicAPI
  version: '2024-05-17T21:09:13Z'
servers:
  - url: https://api.attent.app/v1
security: []
paths:
  /leads/{leadId}/switchCustomerProfile:
    post:
      description: Switches the customer profile of a lead
      parameters:
        - name: leadId
          in: path
          required: true
          schema:
            type: string
          description: The ID of the lead to switch the customer profile for.
      requestBody:
        description: The new customer profile to switch the lead to.
        content:
          application/json:
            schema:
              type: object
              properties:
                profile:
                  type: string
                  description: The name of the new customer profile to switch the lead to.
                sendMessage:
                  type: boolean
                  description: Whether to send a message to the lead.
                messageDelayHours:
                  type: integer
                  description: >-
                    The number of hours to wait before sending the message.
                    Takes precedence over messageDelayMins.
                messageDelayMins:
                  type: integer
                  description: >-
                    The number of minutes to wait before sending the message.
                    Used as an alternative to messageDelayHours.
                clearMemory:
                  type: boolean
                  description: >-
                    Whether to clear the AI's memory of the existing
                    conversation with the lead. Defaults to `false`.
              required:
                - profile
      responses:
        '200':
          description: Customer profile of lead switched successfully.
          content:
            application/json:
              schema:
                type: object
                properties:
                  message:
                    type: string
                  sendMessage:
                    type: boolean
                  messageDelayHours:
                    type: integer
                  messageDelayMins:
                    type: integer
                example:
                  message: Switched profile successfully.
                  sendMessage: true
                  messageDelayHours: 0
                  messageDelayMins: 30
      security:
        - api_key: []
components:
  securitySchemes:
    api_key:
      type: apiKey
      name: x-api-key
      in: header

````