> ## 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. Any pending scheduled follow-up for the lead (automated follow-up steps, dynamic AI-scheduled follow-ups, etc.) is always canceled as part of the switch. Manually scheduled messages (created via "Schedule Message" in the dashboard) are preserved. If `sendMessage` is `true`, a new follow-up message for the new profile is scheduled in its place (see `sendMessage` below); if `sendMessage` is `false` (the default), no replacement follow-up is scheduled — the lead simply has no pending follow-up until the new profile's own follow-up config or your own logic schedules one.



## 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. Any pending scheduled follow-up
        for the lead (automated follow-up steps, dynamic AI-scheduled
        follow-ups, etc.) is always canceled as part of the switch. Manually
        scheduled messages (created via "Schedule Message" in the dashboard) are
        preserved. If `sendMessage` is `true`, a new follow-up message for the
        new profile is scheduled in its place (see `sendMessage` below); if
        `sendMessage` is `false` (the default), no replacement follow-up is
        scheduled — the lead simply has no pending follow-up until the new
        profile's own follow-up config or your own logic schedules one.
      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 the new profile's first message to the lead
                    after switching. Defaults to `false`. When `false`, the
                    existing pending follow-up (if any) is canceled and **no new
                    follow-up is scheduled** — the switch does not automatically
                    initiate contact under the new profile. When `true`, the
                    first message is scheduled after the delay in
                    `messageDelayHours` / `messageDelayMins` below; if both are
                    omitted (or `0`), the message is sent immediately, subject
                    only to outreach-hours/holiday adjustment.
                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

````