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

# Update Followup Settings

> Update the followup settings for an action



## OpenAPI

````yaml /api-reference/conversation-ai/openapi.json patch /conversation-ai/agents/{agentId}/followup-settings
openapi: 3.0.0
info:
  title: Conversation AI API
  description: Documentation for AI Employees API
  version: '1.0'
  contact: {}
servers:
  - url: https://services.leadconnectorhq.com
security: []
tags:
  - name: AI-Employees
    description: Documentation for AI Employees API
  - name: Actions
    description: Documentation for AI Employees API
  - name: Agents
    description: Documentation for AI Employees API
  - name: Generations
    description: Documentation for AI Employees API
paths:
  /conversation-ai/agents/{agentId}/followup-settings:
    patch:
      tags:
        - Actions
      summary: Update Followup Settings
      description: Update the followup settings for an action
      operationId: update-followup-settings
      parameters:
        - name: Version
          in: header
          description: API Version
          required: true
          schema:
            type: string
            enum:
              - '2021-04-15'
        - name: agentId
          required: true
          in: path
          schema:
            type: string
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/UpdateFollowupSettingsDTO'
      responses:
        '200':
          description: Success
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/updateActionResponseDTO'
        '400':
          description: Bad Request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/BadRequestDTO'
        '401':
          description: Unauthorized
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/UnauthorizedDTO'
        '422':
          description: Unprocessable Entity
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/UnprocessableDTO'
      security:
        - bearer:
            - conversation-ai.write
components:
  schemas:
    UpdateFollowupSettingsDTO:
      type: object
      properties:
        actionIds:
          example:
            - edxcfghbnjkimd
          type: array
          items:
            type: string
        followupSettings:
          $ref: '#/components/schemas/FollowupSettings'
      required:
        - actionIds
        - followupSettings
    updateActionResponseDTO:
      type: object
      properties:
        data:
          description: Updated action details
          allOf:
            - $ref: '#/components/schemas/ActionDataDTO'
        success:
          type: boolean
          example: true
          description: Success status of the request
      required:
        - data
        - success
    BadRequestDTO:
      type: object
      properties:
        statusCode:
          type: number
          example: 400
        message:
          type: string
          example: Bad Request
    UnauthorizedDTO:
      type: object
      properties:
        statusCode:
          type: number
          example: 401
        message:
          type: string
          example: 'Invalid token: access token is invalid'
        error:
          type: string
          example: Unauthorized
    UnprocessableDTO:
      type: object
      properties:
        statusCode:
          type: number
          example: 422
        message:
          example:
            - Unprocessable Entity
          type: array
          items:
            type: string
        error:
          type: string
          example: Unprocessable Entity
    FollowupSettings:
      type: object
      properties:
        dynamicChannelSwitching:
          type: boolean
          example: true
          default: true
          description: Whether to dynamically switch channels for followups
        followUpHours:
          type: boolean
          example: true
          description: Whether to respect working hours for followups
        workingHours:
          description: Working hours configuration for followups
          type: array
          items:
            $ref: '#/components/schemas/WorkingHours'
        timezoneToUse:
          type: string
          enum:
            - contact
            - business
          description: Timezone to use for followups, contact or location
      required:
        - dynamicChannelSwitching
    ActionDataDTO:
      type: object
      properties:
        id:
          type: string
          example: actionId123
          description: Unique identifier for the action
        name:
          type: string
          example: Trigger Workflow
          description: Name of the action
        type:
          type: string
          enum:
            - triggerWorkflow
            - updateContactField
            - appointmentBooking
            - stopBot
            - humanHandOver
            - advancedFollowup
            - transferBot
          example: triggerWorkflow
          description: Type of the action
        agentId:
          type: string
          example: agentId123
          description: Agent ID where the action belongs
        details:
          description: >-
            Action-specific details. The structure depends on the action type.
            For TRIGGER_WORKFLOW use triggerWorkflowDto, for
            UPDATE_CONTACT_FIELD use updateContactFieldDto, for
            APPOINTMENT_BOOKING use appointmentBookingDto, for STOP_BOT use
            stopBotDto, for HUMAN_HAND_OVER use humanHandOverDto, for
            ADVANCED_FOLLOWUP use advancedFollowupDto, and for TRANSFER_BOT use
            transferBotDto.
          oneOf:
            - $ref: '#/components/schemas/triggerWorkflowDto'
            - $ref: '#/components/schemas/updateContactFieldDto'
            - $ref: '#/components/schemas/appointmentBookingDto'
            - $ref: '#/components/schemas/stopBotDto'
            - $ref: '#/components/schemas/humanHandOverDto'
            - $ref: '#/components/schemas/advancedFollowupDto'
            - $ref: '#/components/schemas/transferBotDto'
      required:
        - id
        - name
        - type
        - details
    WorkingHours:
      type: object
      properties:
        dayOfTheWeek:
          type: number
          example: 1
          description: Day of the week (0=Sunday, 1=Monday, etc.)
        intervals:
          description: Time intervals for this day
          type: array
          items:
            $ref: '#/components/schemas/Interval'
      required:
        - dayOfTheWeek
    triggerWorkflowDto:
      type: object
      properties:
        workflowIds:
          example:
            - workflow123
            - workflow456
          description: Array of workflow IDs to trigger
          type: array
          items:
            type: string
        triggerCondition:
          type: string
          example: When user requests appointment
          description: Condition that triggers the workflow
        triggerMessage:
          type: string
          example: Workflow triggered successfully
          description: Optional message to send when triggering the workflow
      required:
        - workflowIds
        - triggerCondition
    updateContactFieldDto:
      type: object
      properties:
        contactFieldId:
          type: string
          example: '123'
          description: ID of the contact field in Contacts Table
        description:
          type: string
          example: Business Name
          description: Description of the contact field in Contacts Table
        contactUpdateExamples:
          example:
            - Example 1
          default: []
          description: >-
            Contact update examples in Contacts Table. Not required when using
            standard fields, Monetory or Date Custom fields.
          type: array
          items:
            type: string
      required:
        - contactFieldId
        - description
    appointmentBookingDto:
      type: object
      properties:
        actionId:
          type: string
          example: action123
          description: Optional action ID reference
        calendarId:
          type: string
          example: calendar123
          description: Calendar ID for appointment booking
        onlySendLink:
          type: boolean
          example: false
          description: If true, only sends the appointment link without booking
        triggerWorkflow:
          type: boolean
          example: true
          description: >-
            Whether to trigger a workflow after booking (cannot be true when
            onlySendLink is true)
        workflowIds:
          example:
            - workflow123
          description: >-
            Workflow IDs to trigger after booking (required when triggerWorkflow
            is true)
          type: array
          items:
            type: string
        sleepAfterBooking:
          type: boolean
          example: true
          description: >-
            Whether to put the agent to sleep after booking (cannot be true when
            onlySendLink is true)
        sleepTimeUnit:
          type: string
          enum:
            - days
            - hours
            - minutes
          example: hours
          description: Unit for sleep time (required when sleepAfterBooking is true)
        sleepTime:
          type: number
          example: 24
          description: Sleep duration (required when sleepAfterBooking is true)
        transferBot:
          type: boolean
          example: false
          description: >-
            Whether to transfer to another agent after booking (cannot be true
            when onlySendLink is true)
        transferAgent:
          type: string
          example: employee456
          description: Agent ID to transfer to (required when transferBot is true)
        rescheduleEnabled:
          type: boolean
          default: false
          example: true
          description: >-
            Whether to allow appointment rescheduling (cannot be true when
            onlySendLink is true)
        cancelEnabled:
          type: boolean
          default: false
          example: true
          description: >-
            Whether to allow appointment cancellation (cannot be true when
            onlySendLink is true)
      required:
        - calendarId
        - onlySendLink
        - triggerWorkflow
        - sleepAfterBooking
        - transferBot
        - rescheduleEnabled
        - cancelEnabled
    stopBotDto:
      type: object
      properties:
        stopBotDetectionType:
          type: string
          enum:
            - Goodbye
            - Custom
          example: Custom
          description: Type of stop bot detection - Goodbye or Custom
        stopBotTriggerCondition:
          type: string
          example: >-
            When the user says they no longer need assistance or want to end the
            conversation
          description: Condition that triggers stopping the bot
        reactivateEnabled:
          type: boolean
          example: true
          description: Whether the bot can be reactivated after being stopped
        sleepTimeUnit:
          type: string
          enum:
            - days
            - hours
            - minutes
          example: hours
          description: >-
            Time unit for reactivation delay (required when reactivateEnabled is
            true)
        sleepTime:
          type: number
          example: 24
          description: >-
            Time duration before reactivation (required when reactivateEnabled
            is true)
        enabled:
          type: boolean
          example: true
          description: Whether this action is enabled for the agent
        stopBotExamples:
          example:
            - goodbye
            - thank you
            - no more questions
          description: Example phrases that trigger stop bot action (minimum 2 required)
          type: array
          items:
            type: string
        finalMessage:
          type: string
          example: Thank you for contacting us. Have a great day!
          description: Final message sent when stopping the bot
        tags:
          example:
            - resolved
            - no-response
          description: Tags to apply when stopping the bot
          type: array
          items:
            type: string
      required:
        - stopBotDetectionType
        - stopBotTriggerCondition
        - reactivateEnabled
        - enabled
        - stopBotExamples
        - finalMessage
    humanHandOverDto:
      type: object
      properties:
        enabled:
          type: boolean
          example: true
          description: Whether human handover action is enabled
        triggerCondition:
          type: string
          example: >-
            When the user requests to speak with a human agent or expresses
            frustration
          description: Condition that triggers human handover
        assignToUserId:
          type: string
          example: user123
          description: ID of the user to assign the conversation to
        skipAssignToUser:
          type: boolean
          example: false
          description: Whether to skip assigning to a specific user
        createTask:
          type: boolean
          example: true
          description: Whether to create a task when handing over
        reactivateEnabled:
          type: boolean
          example: true
          description: Whether the agent can be reactivated after handover
        sleepTimeUnit:
          type: string
          enum:
            - days
            - hours
            - minutes
          example: hours
          description: >-
            Time unit for reactivation delay (required when reactivateEnabled is
            true)
        sleepTime:
          type: number
          example: 24
          description: >-
            Time duration before reactivation (required when reactivateEnabled
            is true)
        finalMessage:
          type: string
          example: I am transferring you to a human agent who will assist you shortly.
          description: Final message sent when handing over to human
        tags:
          example:
            - escalated
            - human-requested
          description: Tags to apply during handover
          type: array
          items:
            type: string
        handoverType:
          type: string
          enum:
            - contactRequest
            - lackOfInformation
            - failedToResolveIssue
            - custom
          example: contactRequest
          description: Type of human handover detection
      required:
        - enabled
        - triggerCondition
        - reactivateEnabled
        - finalMessage
        - handoverType
    advancedFollowupDto:
      type: object
      properties:
        enabled:
          type: boolean
          example: true
          description: Whether advanced followup is enabled
        scenarioId:
          type: string
          example: contactIsBusy
          enum:
            - contactStoppedReplying
            - contactIsBusy
            - contactRequested
          description: ID of the followup scenario
        followupSequence:
          description: Sequence of followup actions to perform
          type: array
          items:
            $ref: '#/components/schemas/FollowupSequence'
        followupSettings:
          description: Additional settings for followup behavior
          allOf:
            - $ref: '#/components/schemas/FollowupSettings'
      required:
        - enabled
        - scenarioId
        - followupSequence
    transferBotDto:
      type: object
      properties:
        transferBotType:
          type: string
          enum:
            - Default
            - Custom
          example: Custom
          description: Type of transfer - Default or Custom
        transferToBot:
          type: string
          example: employee789
          description: ID of the bot/agent to transfer to
        enabled:
          type: boolean
          example: true
          description: Whether this transfer action is enabled
        transferBotTriggerCondition:
          type: string
          example: When the user asks to speak with sales or needs pricing information
          description: Condition that triggers the transfer (required for Custom type)
        transferBotExamples:
          example:
            - talk to sales
            - pricing information
            - speak to specialist
          description: >-
            Example phrases that trigger transfer (required for Custom type,
            minimum 2)
          type: array
          items:
            type: string
      required:
        - transferBotType
        - transferToBot
        - enabled
    Interval:
      type: object
      properties:
        startHour:
          type: number
          example: 9
          description: Start hour (24-hour format)
        startMinute:
          type: number
          example: 0
          description: Start minute
        endHour:
          type: number
          example: 17
          description: End hour (24-hour format)
        endMinute:
          type: number
          example: 30
          description: End minute
      required:
        - startHour
        - startMinute
        - endHour
        - endMinute
    FollowupSequence:
      type: object
      properties:
        id:
          type: number
          example: 1
          description: Unique identifier for this followup step
        followupTimeUnit:
          type: string
          enum:
            - days
            - hours
            - minutes
          example: hours
          description: Time unit for followup delay
        followupTime:
          type: number
          example: 2
          description: >-
            Time duration before followup (max: 60 minutes, 24 hours, or 180
            days depending on unit)
        aiEnabledMessage:
          type: boolean
          example: true
          default: true
          description: Whether to use AI to generate the followup message
        triggerWorkflow:
          type: boolean
          example: false
          default: false
          description: Whether to trigger a workflow during this followup
        customMessage:
          type: string
          example: >-
            Hi! Just following up on our previous conversation. Do you have any
            questions?
          description: Custom message to send (when aiEnabledMessage is false)
        workflowId:
          type: string
          example: workflow789
          description: Workflow ID to trigger (when triggerWorkflow is true)
        contactRequested:
          type: boolean
          example: false
          description: Whether contact was requested in this followup
      required:
        - id
        - followupTimeUnit
        - followupTime
  securitySchemes:
    bearer:
      type: http
      scheme: bearer
      bearerFormat: JWT
      description: Access Token or Private Integration Token

````