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

# Update agent workflow

> Update an agent workflow



## OpenAPI

````yaml patch /api/v1/workflow/{id}
openapi: 3.0.0
info:
  version: 1.0.0
  title: Feather AI API
servers:
  - url: https://prod.featherhq.com
    description: Production environment
security: []
paths:
  /api/v1/workflow/{id}:
    patch:
      tags:
        - Workflows
      summary: Update agent workflow
      description: Update an agent workflow
      parameters:
        - schema:
            type: string
            format: uuid
          required: true
          name: id
          in: path
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                name:
                  type: string
                  minLength: 1
                  maxLength: 255
                  description: Workflow name
                description:
                  type: string
                  description: Workflow description
                active:
                  type: boolean
                  default: true
                  description: Whether the workflow is active
                startHour:
                  type: integer
                  minimum: 0
                  maximum: 23
                  default: 9
                  description: Start hour (0-23) for backward compatibility
                endHour:
                  type: integer
                  minimum: 0
                  maximum: 23
                  default: 17
                  description: End hour (0-23) for backward compatibility
                timezone:
                  type: string
                  default: America/Los_Angeles
                  description: Timezone for workflow execution and schedule interpretation
                workflowSchedule:
                  $ref: '#/components/schemas/WorkflowSchedule'
                tcpaSchedule:
                  $ref: '#/components/schemas/TcpaSchedule'
                definition:
                  type: object
                  properties:
                    steps:
                      type: array
                      items:
                        type: object
                        properties:
                          id:
                            type: string
                            format: uuid
                          type:
                            type: string
                            enum:
                              - CALL
                              - TEXT
                            description: Type of workflow step
                          order:
                            type: integer
                            minimum: 1
                            description: Order of execution (1-indexed)
                          delayInSecs:
                            type: integer
                            minimum: 0
                            default: 0
                            description: Delay in seconds before executing this step
                          finishOn:
                            type: array
                            items:
                              type: string
                              enum:
                                - COULD_NOT_CONNECT
                                - NO_ANSWER
                                - LEFT_VOICEMAIL
                                - VOICEMAIL_DETECTED
                                - SILENCE_TIMEOUT
                                - BAD_NUMBER
                                - NOT_INTERESTED
                                - WARM_TRANSFER
                                - WARM_TRANSFER_FAILED
                                - CALENDLY
                                - DNC
                                - ENDED
                                - FRAUD
                                - LINE_BUSY
                                - TEXT_CONSENT
                                - CALL_AGAIN
                            default: []
                            description: Call end reasons that should finish the workflow
                          agentId:
                            type: string
                            format: uuid
                            description: Agent to use for this step
                          leaveVoicemail:
                            type: boolean
                            default: false
                            description: Whether to leave voicemail for call steps
                          initialMessage:
                            type: string
                            maxLength: 1600
                            description: >-
                              SMS message body for TEXT steps. Supports
                              {{variableName}} interpolation.
                          count:
                            type: integer
                            minimum: 1
                            default: 1
                            description: >-
                              Number of times to repeat this step before moving
                              to next
                        required:
                          - type
                          - order
                          - agentId
                      minItems: 1
                      description: Workflow steps
                    isInfinite:
                      type: boolean
                      default: false
                      description: >-
                        If true, workflow loops indefinitely using last step
                        config when defined steps are exhausted
                  required:
                    - steps
                  description: Workflow definition
                maxDialsPerTick:
                  type: integer
                  nullable: true
                  minimum: 1
                  description: >-
                    Per-workflow max dials per scheduler tick. null = uncapped
                    (uses shared org budget).
      responses:
        '200':
          description: Agent workflow updated successfully
          content:
            application/json:
              schema:
                type: object
                properties:
                  id:
                    type: string
                    format: uuid
                    description: Workflow ID
                  name:
                    type: string
                    description: Workflow name
                  description:
                    type: string
                    nullable: true
                    description: Workflow description
                  organizationId:
                    type: string
                    format: uuid
                    description: Organization ID
                  userId:
                    type: string
                    format: uuid
                    description: User ID who created the workflow
                  active:
                    type: boolean
                    description: Whether the workflow is active
                  startHour:
                    type: integer
                    description: Start hour (0-23) for backward compatibility
                  endHour:
                    type: integer
                    description: End hour (0-23) for backward compatibility
                  timezone:
                    type: string
                    description: >-
                      Timezone for workflow execution and schedule
                      interpretation
                  workflowSchedule:
                    type: object
                    nullable: true
                    properties:
                      monday:
                        type: object
                        properties:
                          enabled:
                            type: boolean
                            default: true
                            description: Whether this day is enabled
                          timeRanges:
                            type: array
                            items:
                              type: object
                              properties:
                                startHour:
                                  type: integer
                                  minimum: 0
                                  maximum: 23
                                  description: Start hour (0-23)
                                  example: 9
                                startMinute:
                                  type: integer
                                  minimum: 0
                                  maximum: 59
                                  description: Start minute (0-59)
                                  example: 0
                                endHour:
                                  type: integer
                                  minimum: 0
                                  maximum: 23
                                  description: End hour (0-23)
                                  example: 17
                                endMinute:
                                  type: integer
                                  minimum: 0
                                  maximum: 59
                                  description: End minute (0-59)
                                  example: 0
                              required:
                                - startHour
                                - startMinute
                                - endHour
                                - endMinute
                              description: >-
                                Time range for a day using separate hour/minute
                                numbers
                              example:
                                startHour: 9
                                startMinute: 0
                                endHour: 17
                                endMinute: 0
                            minItems: 0
                            default: []
                            description: Time ranges when calls are allowed on this day
                        description: Schedule configuration for a specific day
                      tuesday:
                        type: object
                        properties:
                          enabled:
                            type: boolean
                            default: true
                            description: Whether this day is enabled
                          timeRanges:
                            type: array
                            items:
                              type: object
                              properties:
                                startHour:
                                  type: integer
                                  minimum: 0
                                  maximum: 23
                                  description: Start hour (0-23)
                                  example: 9
                                startMinute:
                                  type: integer
                                  minimum: 0
                                  maximum: 59
                                  description: Start minute (0-59)
                                  example: 0
                                endHour:
                                  type: integer
                                  minimum: 0
                                  maximum: 23
                                  description: End hour (0-23)
                                  example: 17
                                endMinute:
                                  type: integer
                                  minimum: 0
                                  maximum: 59
                                  description: End minute (0-59)
                                  example: 0
                              required:
                                - startHour
                                - startMinute
                                - endHour
                                - endMinute
                              description: >-
                                Time range for a day using separate hour/minute
                                numbers
                              example:
                                startHour: 9
                                startMinute: 0
                                endHour: 17
                                endMinute: 0
                            minItems: 0
                            default: []
                            description: Time ranges when calls are allowed on this day
                        description: Schedule configuration for a specific day
                      wednesday:
                        type: object
                        properties:
                          enabled:
                            type: boolean
                            default: true
                            description: Whether this day is enabled
                          timeRanges:
                            type: array
                            items:
                              type: object
                              properties:
                                startHour:
                                  type: integer
                                  minimum: 0
                                  maximum: 23
                                  description: Start hour (0-23)
                                  example: 9
                                startMinute:
                                  type: integer
                                  minimum: 0
                                  maximum: 59
                                  description: Start minute (0-59)
                                  example: 0
                                endHour:
                                  type: integer
                                  minimum: 0
                                  maximum: 23
                                  description: End hour (0-23)
                                  example: 17
                                endMinute:
                                  type: integer
                                  minimum: 0
                                  maximum: 59
                                  description: End minute (0-59)
                                  example: 0
                              required:
                                - startHour
                                - startMinute
                                - endHour
                                - endMinute
                              description: >-
                                Time range for a day using separate hour/minute
                                numbers
                              example:
                                startHour: 9
                                startMinute: 0
                                endHour: 17
                                endMinute: 0
                            minItems: 0
                            default: []
                            description: Time ranges when calls are allowed on this day
                        description: Schedule configuration for a specific day
                      thursday:
                        type: object
                        properties:
                          enabled:
                            type: boolean
                            default: true
                            description: Whether this day is enabled
                          timeRanges:
                            type: array
                            items:
                              type: object
                              properties:
                                startHour:
                                  type: integer
                                  minimum: 0
                                  maximum: 23
                                  description: Start hour (0-23)
                                  example: 9
                                startMinute:
                                  type: integer
                                  minimum: 0
                                  maximum: 59
                                  description: Start minute (0-59)
                                  example: 0
                                endHour:
                                  type: integer
                                  minimum: 0
                                  maximum: 23
                                  description: End hour (0-23)
                                  example: 17
                                endMinute:
                                  type: integer
                                  minimum: 0
                                  maximum: 59
                                  description: End minute (0-59)
                                  example: 0
                              required:
                                - startHour
                                - startMinute
                                - endHour
                                - endMinute
                              description: >-
                                Time range for a day using separate hour/minute
                                numbers
                              example:
                                startHour: 9
                                startMinute: 0
                                endHour: 17
                                endMinute: 0
                            minItems: 0
                            default: []
                            description: Time ranges when calls are allowed on this day
                        description: Schedule configuration for a specific day
                      friday:
                        type: object
                        properties:
                          enabled:
                            type: boolean
                            default: true
                            description: Whether this day is enabled
                          timeRanges:
                            type: array
                            items:
                              type: object
                              properties:
                                startHour:
                                  type: integer
                                  minimum: 0
                                  maximum: 23
                                  description: Start hour (0-23)
                                  example: 9
                                startMinute:
                                  type: integer
                                  minimum: 0
                                  maximum: 59
                                  description: Start minute (0-59)
                                  example: 0
                                endHour:
                                  type: integer
                                  minimum: 0
                                  maximum: 23
                                  description: End hour (0-23)
                                  example: 17
                                endMinute:
                                  type: integer
                                  minimum: 0
                                  maximum: 59
                                  description: End minute (0-59)
                                  example: 0
                              required:
                                - startHour
                                - startMinute
                                - endHour
                                - endMinute
                              description: >-
                                Time range for a day using separate hour/minute
                                numbers
                              example:
                                startHour: 9
                                startMinute: 0
                                endHour: 17
                                endMinute: 0
                            minItems: 0
                            default: []
                            description: Time ranges when calls are allowed on this day
                        description: Schedule configuration for a specific day
                      saturday:
                        type: object
                        properties:
                          enabled:
                            type: boolean
                            default: true
                            description: Whether this day is enabled
                          timeRanges:
                            type: array
                            items:
                              type: object
                              properties:
                                startHour:
                                  type: integer
                                  minimum: 0
                                  maximum: 23
                                  description: Start hour (0-23)
                                  example: 9
                                startMinute:
                                  type: integer
                                  minimum: 0
                                  maximum: 59
                                  description: Start minute (0-59)
                                  example: 0
                                endHour:
                                  type: integer
                                  minimum: 0
                                  maximum: 23
                                  description: End hour (0-23)
                                  example: 17
                                endMinute:
                                  type: integer
                                  minimum: 0
                                  maximum: 59
                                  description: End minute (0-59)
                                  example: 0
                              required:
                                - startHour
                                - startMinute
                                - endHour
                                - endMinute
                              description: >-
                                Time range for a day using separate hour/minute
                                numbers
                              example:
                                startHour: 9
                                startMinute: 0
                                endHour: 17
                                endMinute: 0
                            minItems: 0
                            default: []
                            description: Time ranges when calls are allowed on this day
                        description: Schedule configuration for a specific day
                      sunday:
                        type: object
                        properties:
                          enabled:
                            type: boolean
                            default: true
                            description: Whether this day is enabled
                          timeRanges:
                            type: array
                            items:
                              type: object
                              properties:
                                startHour:
                                  type: integer
                                  minimum: 0
                                  maximum: 23
                                  description: Start hour (0-23)
                                  example: 9
                                startMinute:
                                  type: integer
                                  minimum: 0
                                  maximum: 59
                                  description: Start minute (0-59)
                                  example: 0
                                endHour:
                                  type: integer
                                  minimum: 0
                                  maximum: 23
                                  description: End hour (0-23)
                                  example: 17
                                endMinute:
                                  type: integer
                                  minimum: 0
                                  maximum: 59
                                  description: End minute (0-59)
                                  example: 0
                              required:
                                - startHour
                                - startMinute
                                - endHour
                                - endMinute
                              description: >-
                                Time range for a day using separate hour/minute
                                numbers
                              example:
                                startHour: 9
                                startMinute: 0
                                endHour: 17
                                endMinute: 0
                            minItems: 0
                            default: []
                            description: Time ranges when calls are allowed on this day
                        description: Schedule configuration for a specific day
                      globalTimeRanges:
                        type: array
                        items:
                          type: object
                          properties:
                            startHour:
                              type: integer
                              minimum: 0
                              maximum: 23
                              description: Start hour (0-23)
                              example: 9
                            startMinute:
                              type: integer
                              minimum: 0
                              maximum: 59
                              description: Start minute (0-59)
                              example: 0
                            endHour:
                              type: integer
                              minimum: 0
                              maximum: 23
                              description: End hour (0-23)
                              example: 17
                            endMinute:
                              type: integer
                              minimum: 0
                              maximum: 59
                              description: End minute (0-59)
                              example: 0
                          required:
                            - startHour
                            - startMinute
                            - endHour
                            - endMinute
                          description: >-
                            Time range for a day using separate hour/minute
                            numbers
                          example:
                            startHour: 9
                            startMinute: 0
                            endHour: 17
                            endMinute: 0
                        description: >-
                          Global time ranges that apply to all enabled days if
                          day-specific ranges are not set
                      exceptions:
                        type: array
                        items:
                          type: object
                          properties:
                            date:
                              type: string
                              pattern: ^\d{4}-\d{2}-\d{2}$
                              description: Date in YYYY-MM-DD format
                              example: '2024-12-25'
                            enabled:
                              type: boolean
                              description: Whether calls are allowed on this date
                            timeRanges:
                              type: array
                              items:
                                type: object
                                properties:
                                  startHour:
                                    type: integer
                                    minimum: 0
                                    maximum: 23
                                    description: Start hour (0-23)
                                    example: 9
                                  startMinute:
                                    type: integer
                                    minimum: 0
                                    maximum: 59
                                    description: Start minute (0-59)
                                    example: 0
                                  endHour:
                                    type: integer
                                    minimum: 0
                                    maximum: 23
                                    description: End hour (0-23)
                                    example: 17
                                  endMinute:
                                    type: integer
                                    minimum: 0
                                    maximum: 59
                                    description: End minute (0-59)
                                    example: 0
                                required:
                                  - startHour
                                  - startMinute
                                  - endHour
                                  - endMinute
                                description: >-
                                  Time range for a day using separate
                                  hour/minute numbers
                                example:
                                  startHour: 9
                                  startMinute: 0
                                  endHour: 17
                                  endMinute: 0
                              description: Custom time ranges for this exception date
                            reason:
                              type: string
                              description: Reason for the exception (e.g., "Christmas Day")
                          required:
                            - date
                            - enabled
                        default: []
                        description: Exception dates (holidays, special events, etc.)
                    description: Workflow schedule - operates in workflow timezone
                    example:
                      monday:
                        enabled: true
                        timeRanges:
                          - startHour: 9
                            startMinute: 0
                            endHour: 17
                            endMinute: 0
                      tuesday:
                        enabled: true
                        timeRanges:
                          - startHour: 9
                            startMinute: 0
                            endHour: 17
                            endMinute: 0
                      wednesday:
                        enabled: true
                        timeRanges:
                          - startHour: 9
                            startMinute: 0
                            endHour: 17
                            endMinute: 0
                      thursday:
                        enabled: true
                        timeRanges:
                          - startHour: 9
                            startMinute: 0
                            endHour: 17
                            endMinute: 0
                      friday:
                        enabled: true
                        timeRanges:
                          - startHour: 9
                            startMinute: 0
                            endHour: 17
                            endMinute: 0
                      saturday:
                        enabled: false
                        timeRanges: []
                      sunday:
                        enabled: false
                        timeRanges: []
                  tcpaSchedule:
                    type: object
                    nullable: true
                    properties:
                      monday:
                        type: object
                        properties:
                          enabled:
                            type: boolean
                            default: true
                            description: Whether this day is enabled
                          timeRanges:
                            type: array
                            items:
                              type: object
                              properties:
                                startHour:
                                  type: integer
                                  minimum: 0
                                  maximum: 23
                                  description: Start hour (0-23)
                                  example: 9
                                startMinute:
                                  type: integer
                                  minimum: 0
                                  maximum: 59
                                  description: Start minute (0-59)
                                  example: 0
                                endHour:
                                  type: integer
                                  minimum: 0
                                  maximum: 23
                                  description: End hour (0-23)
                                  example: 17
                                endMinute:
                                  type: integer
                                  minimum: 0
                                  maximum: 59
                                  description: End minute (0-59)
                                  example: 0
                              required:
                                - startHour
                                - startMinute
                                - endHour
                                - endMinute
                              description: >-
                                Time range for a day using separate hour/minute
                                numbers
                              example:
                                startHour: 9
                                startMinute: 0
                                endHour: 17
                                endMinute: 0
                            minItems: 0
                            default: []
                            description: Time ranges when calls are allowed on this day
                        description: Schedule configuration for a specific day
                      tuesday:
                        type: object
                        properties:
                          enabled:
                            type: boolean
                            default: true
                            description: Whether this day is enabled
                          timeRanges:
                            type: array
                            items:
                              type: object
                              properties:
                                startHour:
                                  type: integer
                                  minimum: 0
                                  maximum: 23
                                  description: Start hour (0-23)
                                  example: 9
                                startMinute:
                                  type: integer
                                  minimum: 0
                                  maximum: 59
                                  description: Start minute (0-59)
                                  example: 0
                                endHour:
                                  type: integer
                                  minimum: 0
                                  maximum: 23
                                  description: End hour (0-23)
                                  example: 17
                                endMinute:
                                  type: integer
                                  minimum: 0
                                  maximum: 59
                                  description: End minute (0-59)
                                  example: 0
                              required:
                                - startHour
                                - startMinute
                                - endHour
                                - endMinute
                              description: >-
                                Time range for a day using separate hour/minute
                                numbers
                              example:
                                startHour: 9
                                startMinute: 0
                                endHour: 17
                                endMinute: 0
                            minItems: 0
                            default: []
                            description: Time ranges when calls are allowed on this day
                        description: Schedule configuration for a specific day
                      wednesday:
                        type: object
                        properties:
                          enabled:
                            type: boolean
                            default: true
                            description: Whether this day is enabled
                          timeRanges:
                            type: array
                            items:
                              type: object
                              properties:
                                startHour:
                                  type: integer
                                  minimum: 0
                                  maximum: 23
                                  description: Start hour (0-23)
                                  example: 9
                                startMinute:
                                  type: integer
                                  minimum: 0
                                  maximum: 59
                                  description: Start minute (0-59)
                                  example: 0
                                endHour:
                                  type: integer
                                  minimum: 0
                                  maximum: 23
                                  description: End hour (0-23)
                                  example: 17
                                endMinute:
                                  type: integer
                                  minimum: 0
                                  maximum: 59
                                  description: End minute (0-59)
                                  example: 0
                              required:
                                - startHour
                                - startMinute
                                - endHour
                                - endMinute
                              description: >-
                                Time range for a day using separate hour/minute
                                numbers
                              example:
                                startHour: 9
                                startMinute: 0
                                endHour: 17
                                endMinute: 0
                            minItems: 0
                            default: []
                            description: Time ranges when calls are allowed on this day
                        description: Schedule configuration for a specific day
                      thursday:
                        type: object
                        properties:
                          enabled:
                            type: boolean
                            default: true
                            description: Whether this day is enabled
                          timeRanges:
                            type: array
                            items:
                              type: object
                              properties:
                                startHour:
                                  type: integer
                                  minimum: 0
                                  maximum: 23
                                  description: Start hour (0-23)
                                  example: 9
                                startMinute:
                                  type: integer
                                  minimum: 0
                                  maximum: 59
                                  description: Start minute (0-59)
                                  example: 0
                                endHour:
                                  type: integer
                                  minimum: 0
                                  maximum: 23
                                  description: End hour (0-23)
                                  example: 17
                                endMinute:
                                  type: integer
                                  minimum: 0
                                  maximum: 59
                                  description: End minute (0-59)
                                  example: 0
                              required:
                                - startHour
                                - startMinute
                                - endHour
                                - endMinute
                              description: >-
                                Time range for a day using separate hour/minute
                                numbers
                              example:
                                startHour: 9
                                startMinute: 0
                                endHour: 17
                                endMinute: 0
                            minItems: 0
                            default: []
                            description: Time ranges when calls are allowed on this day
                        description: Schedule configuration for a specific day
                      friday:
                        type: object
                        properties:
                          enabled:
                            type: boolean
                            default: true
                            description: Whether this day is enabled
                          timeRanges:
                            type: array
                            items:
                              type: object
                              properties:
                                startHour:
                                  type: integer
                                  minimum: 0
                                  maximum: 23
                                  description: Start hour (0-23)
                                  example: 9
                                startMinute:
                                  type: integer
                                  minimum: 0
                                  maximum: 59
                                  description: Start minute (0-59)
                                  example: 0
                                endHour:
                                  type: integer
                                  minimum: 0
                                  maximum: 23
                                  description: End hour (0-23)
                                  example: 17
                                endMinute:
                                  type: integer
                                  minimum: 0
                                  maximum: 59
                                  description: End minute (0-59)
                                  example: 0
                              required:
                                - startHour
                                - startMinute
                                - endHour
                                - endMinute
                              description: >-
                                Time range for a day using separate hour/minute
                                numbers
                              example:
                                startHour: 9
                                startMinute: 0
                                endHour: 17
                                endMinute: 0
                            minItems: 0
                            default: []
                            description: Time ranges when calls are allowed on this day
                        description: Schedule configuration for a specific day
                      saturday:
                        type: object
                        properties:
                          enabled:
                            type: boolean
                            default: true
                            description: Whether this day is enabled
                          timeRanges:
                            type: array
                            items:
                              type: object
                              properties:
                                startHour:
                                  type: integer
                                  minimum: 0
                                  maximum: 23
                                  description: Start hour (0-23)
                                  example: 9
                                startMinute:
                                  type: integer
                                  minimum: 0
                                  maximum: 59
                                  description: Start minute (0-59)
                                  example: 0
                                endHour:
                                  type: integer
                                  minimum: 0
                                  maximum: 23
                                  description: End hour (0-23)
                                  example: 17
                                endMinute:
                                  type: integer
                                  minimum: 0
                                  maximum: 59
                                  description: End minute (0-59)
                                  example: 0
                              required:
                                - startHour
                                - startMinute
                                - endHour
                                - endMinute
                              description: >-
                                Time range for a day using separate hour/minute
                                numbers
                              example:
                                startHour: 9
                                startMinute: 0
                                endHour: 17
                                endMinute: 0
                            minItems: 0
                            default: []
                            description: Time ranges when calls are allowed on this day
                        description: Schedule configuration for a specific day
                      sunday:
                        type: object
                        properties:
                          enabled:
                            type: boolean
                            default: true
                            description: Whether this day is enabled
                          timeRanges:
                            type: array
                            items:
                              type: object
                              properties:
                                startHour:
                                  type: integer
                                  minimum: 0
                                  maximum: 23
                                  description: Start hour (0-23)
                                  example: 9
                                startMinute:
                                  type: integer
                                  minimum: 0
                                  maximum: 59
                                  description: Start minute (0-59)
                                  example: 0
                                endHour:
                                  type: integer
                                  minimum: 0
                                  maximum: 23
                                  description: End hour (0-23)
                                  example: 17
                                endMinute:
                                  type: integer
                                  minimum: 0
                                  maximum: 59
                                  description: End minute (0-59)
                                  example: 0
                              required:
                                - startHour
                                - startMinute
                                - endHour
                                - endMinute
                              description: >-
                                Time range for a day using separate hour/minute
                                numbers
                              example:
                                startHour: 9
                                startMinute: 0
                                endHour: 17
                                endMinute: 0
                            minItems: 0
                            default: []
                            description: Time ranges when calls are allowed on this day
                        description: Schedule configuration for a specific day
                      globalTimeRanges:
                        type: array
                        items:
                          type: object
                          properties:
                            startHour:
                              type: integer
                              minimum: 0
                              maximum: 23
                              description: Start hour (0-23)
                              example: 9
                            startMinute:
                              type: integer
                              minimum: 0
                              maximum: 59
                              description: Start minute (0-59)
                              example: 0
                            endHour:
                              type: integer
                              minimum: 0
                              maximum: 23
                              description: End hour (0-23)
                              example: 17
                            endMinute:
                              type: integer
                              minimum: 0
                              maximum: 59
                              description: End minute (0-59)
                              example: 0
                          required:
                            - startHour
                            - startMinute
                            - endHour
                            - endMinute
                          description: >-
                            Time range for a day using separate hour/minute
                            numbers
                          example:
                            startHour: 9
                            startMinute: 0
                            endHour: 17
                            endMinute: 0
                        description: >-
                          Global time ranges that apply to all enabled days if
                          day-specific ranges are not set
                      stateOverrides:
                        type: object
                        additionalProperties:
                          type: object
                          properties:
                            monday:
                              type: object
                              properties:
                                enabled:
                                  type: boolean
                                  default: true
                                  description: Whether this day is enabled
                                timeRanges:
                                  type: array
                                  items:
                                    type: object
                                    properties:
                                      startHour:
                                        type: integer
                                        minimum: 0
                                        maximum: 23
                                        description: Start hour (0-23)
                                        example: 9
                                      startMinute:
                                        type: integer
                                        minimum: 0
                                        maximum: 59
                                        description: Start minute (0-59)
                                        example: 0
                                      endHour:
                                        type: integer
                                        minimum: 0
                                        maximum: 23
                                        description: End hour (0-23)
                                        example: 17
                                      endMinute:
                                        type: integer
                                        minimum: 0
                                        maximum: 59
                                        description: End minute (0-59)
                                        example: 0
                                    required:
                                      - startHour
                                      - startMinute
                                      - endHour
                                      - endMinute
                                    description: >-
                                      Time range for a day using separate
                                      hour/minute numbers
                                    example:
                                      startHour: 9
                                      startMinute: 0
                                      endHour: 17
                                      endMinute: 0
                                  minItems: 0
                                  default: []
                                  description: >-
                                    Time ranges when calls are allowed on this
                                    day
                              description: Schedule configuration for a specific day
                            tuesday:
                              type: object
                              properties:
                                enabled:
                                  type: boolean
                                  default: true
                                  description: Whether this day is enabled
                                timeRanges:
                                  type: array
                                  items:
                                    type: object
                                    properties:
                                      startHour:
                                        type: integer
                                        minimum: 0
                                        maximum: 23
                                        description: Start hour (0-23)
                                        example: 9
                                      startMinute:
                                        type: integer
                                        minimum: 0
                                        maximum: 59
                                        description: Start minute (0-59)
                                        example: 0
                                      endHour:
                                        type: integer
                                        minimum: 0
                                        maximum: 23
                                        description: End hour (0-23)
                                        example: 17
                                      endMinute:
                                        type: integer
                                        minimum: 0
                                        maximum: 59
                                        description: End minute (0-59)
                                        example: 0
                                    required:
                                      - startHour
                                      - startMinute
                                      - endHour
                                      - endMinute
                                    description: >-
                                      Time range for a day using separate
                                      hour/minute numbers
                                    example:
                                      startHour: 9
                                      startMinute: 0
                                      endHour: 17
                                      endMinute: 0
                                  minItems: 0
                                  default: []
                                  description: >-
                                    Time ranges when calls are allowed on this
                                    day
                              description: Schedule configuration for a specific day
                            wednesday:
                              type: object
                              properties:
                                enabled:
                                  type: boolean
                                  default: true
                                  description: Whether this day is enabled
                                timeRanges:
                                  type: array
                                  items:
                                    type: object
                                    properties:
                                      startHour:
                                        type: integer
                                        minimum: 0
                                        maximum: 23
                                        description: Start hour (0-23)
                                        example: 9
                                      startMinute:
                                        type: integer
                                        minimum: 0
                                        maximum: 59
                                        description: Start minute (0-59)
                                        example: 0
                                      endHour:
                                        type: integer
                                        minimum: 0
                                        maximum: 23
                                        description: End hour (0-23)
                                        example: 17
                                      endMinute:
                                        type: integer
                                        minimum: 0
                                        maximum: 59
                                        description: End minute (0-59)
                                        example: 0
                                    required:
                                      - startHour
                                      - startMinute
                                      - endHour
                                      - endMinute
                                    description: >-
                                      Time range for a day using separate
                                      hour/minute numbers
                                    example:
                                      startHour: 9
                                      startMinute: 0
                                      endHour: 17
                                      endMinute: 0
                                  minItems: 0
                                  default: []
                                  description: >-
                                    Time ranges when calls are allowed on this
                                    day
                              description: Schedule configuration for a specific day
                            thursday:
                              type: object
                              properties:
                                enabled:
                                  type: boolean
                                  default: true
                                  description: Whether this day is enabled
                                timeRanges:
                                  type: array
                                  items:
                                    type: object
                                    properties:
                                      startHour:
                                        type: integer
                                        minimum: 0
                                        maximum: 23
                                        description: Start hour (0-23)
                                        example: 9
                                      startMinute:
                                        type: integer
                                        minimum: 0
                                        maximum: 59
                                        description: Start minute (0-59)
                                        example: 0
                                      endHour:
                                        type: integer
                                        minimum: 0
                                        maximum: 23
                                        description: End hour (0-23)
                                        example: 17
                                      endMinute:
                                        type: integer
                                        minimum: 0
                                        maximum: 59
                                        description: End minute (0-59)
                                        example: 0
                                    required:
                                      - startHour
                                      - startMinute
                                      - endHour
                                      - endMinute
                                    description: >-
                                      Time range for a day using separate
                                      hour/minute numbers
                                    example:
                                      startHour: 9
                                      startMinute: 0
                                      endHour: 17
                                      endMinute: 0
                                  minItems: 0
                                  default: []
                                  description: >-
                                    Time ranges when calls are allowed on this
                                    day
                              description: Schedule configuration for a specific day
                            friday:
                              type: object
                              properties:
                                enabled:
                                  type: boolean
                                  default: true
                                  description: Whether this day is enabled
                                timeRanges:
                                  type: array
                                  items:
                                    type: object
                                    properties:
                                      startHour:
                                        type: integer
                                        minimum: 0
                                        maximum: 23
                                        description: Start hour (0-23)
                                        example: 9
                                      startMinute:
                                        type: integer
                                        minimum: 0
                                        maximum: 59
                                        description: Start minute (0-59)
                                        example: 0
                                      endHour:
                                        type: integer
                                        minimum: 0
                                        maximum: 23
                                        description: End hour (0-23)
                                        example: 17
                                      endMinute:
                                        type: integer
                                        minimum: 0
                                        maximum: 59
                                        description: End minute (0-59)
                                        example: 0
                                    required:
                                      - startHour
                                      - startMinute
                                      - endHour
                                      - endMinute
                                    description: >-
                                      Time range for a day using separate
                                      hour/minute numbers
                                    example:
                                      startHour: 9
                                      startMinute: 0
                                      endHour: 17
                                      endMinute: 0
                                  minItems: 0
                                  default: []
                                  description: >-
                                    Time ranges when calls are allowed on this
                                    day
                              description: Schedule configuration for a specific day
                            saturday:
                              type: object
                              properties:
                                enabled:
                                  type: boolean
                                  default: true
                                  description: Whether this day is enabled
                                timeRanges:
                                  type: array
                                  items:
                                    type: object
                                    properties:
                                      startHour:
                                        type: integer
                                        minimum: 0
                                        maximum: 23
                                        description: Start hour (0-23)
                                        example: 9
                                      startMinute:
                                        type: integer
                                        minimum: 0
                                        maximum: 59
                                        description: Start minute (0-59)
                                        example: 0
                                      endHour:
                                        type: integer
                                        minimum: 0
                                        maximum: 23
                                        description: End hour (0-23)
                                        example: 17
                                      endMinute:
                                        type: integer
                                        minimum: 0
                                        maximum: 59
                                        description: End minute (0-59)
                                        example: 0
                                    required:
                                      - startHour
                                      - startMinute
                                      - endHour
                                      - endMinute
                                    description: >-
                                      Time range for a day using separate
                                      hour/minute numbers
                                    example:
                                      startHour: 9
                                      startMinute: 0
                                      endHour: 17
                                      endMinute: 0
                                  minItems: 0
                                  default: []
                                  description: >-
                                    Time ranges when calls are allowed on this
                                    day
                              description: Schedule configuration for a specific day
                            sunday:
                              type: object
                              properties:
                                enabled:
                                  type: boolean
                                  default: true
                                  description: Whether this day is enabled
                                timeRanges:
                                  type: array
                                  items:
                                    type: object
                                    properties:
                                      startHour:
                                        type: integer
                                        minimum: 0
                                        maximum: 23
                                        description: Start hour (0-23)
                                        example: 9
                                      startMinute:
                                        type: integer
                                        minimum: 0
                                        maximum: 59
                                        description: Start minute (0-59)
                                        example: 0
                                      endHour:
                                        type: integer
                                        minimum: 0
                                        maximum: 23
                                        description: End hour (0-23)
                                        example: 17
                                      endMinute:
                                        type: integer
                                        minimum: 0
                                        maximum: 59
                                        description: End minute (0-59)
                                        example: 0
                                    required:
                                      - startHour
                                      - startMinute
                                      - endHour
                                      - endMinute
                                    description: >-
                                      Time range for a day using separate
                                      hour/minute numbers
                                    example:
                                      startHour: 9
                                      startMinute: 0
                                      endHour: 17
                                      endMinute: 0
                                  minItems: 0
                                  default: []
                                  description: >-
                                    Time ranges when calls are allowed on this
                                    day
                              description: Schedule configuration for a specific day
                        description: >-
                          State-specific TCPA schedule overrides (e.g.,
                          different rules for CA, NY)
                    description: TCPA schedule - applies to borrower local timezone
                    example:
                      monday:
                        enabled: true
                        timeRanges:
                          - startHour: 8
                            startMinute: 0
                            endHour: 21
                            endMinute: 0
                      tuesday:
                        enabled: true
                        timeRanges:
                          - startHour: 8
                            startMinute: 0
                            endHour: 21
                            endMinute: 0
                      wednesday:
                        enabled: true
                        timeRanges:
                          - startHour: 8
                            startMinute: 0
                            endHour: 21
                            endMinute: 0
                      thursday:
                        enabled: true
                        timeRanges:
                          - startHour: 8
                            startMinute: 0
                            endHour: 21
                            endMinute: 0
                      friday:
                        enabled: true
                        timeRanges:
                          - startHour: 8
                            startMinute: 0
                            endHour: 21
                            endMinute: 0
                      saturday:
                        enabled: true
                        timeRanges:
                          - startHour: 8
                            startMinute: 0
                            endHour: 21
                            endMinute: 0
                      sunday:
                        enabled: true
                        timeRanges:
                          - startHour: 13
                            startMinute: 0
                            endHour: 21
                            endMinute: 0
                  definition:
                    type: object
                    properties:
                      steps:
                        type: array
                        items:
                          type: object
                          properties:
                            id:
                              type: string
                              format: uuid
                            type:
                              type: string
                              enum:
                                - CALL
                                - TEXT
                              description: Type of workflow step
                            order:
                              type: integer
                              minimum: 1
                              description: Order of execution (1-indexed)
                            delayInSecs:
                              type: integer
                              minimum: 0
                              default: 0
                              description: Delay in seconds before executing this step
                            finishOn:
                              type: array
                              items:
                                type: string
                                enum:
                                  - COULD_NOT_CONNECT
                                  - NO_ANSWER
                                  - LEFT_VOICEMAIL
                                  - VOICEMAIL_DETECTED
                                  - SILENCE_TIMEOUT
                                  - BAD_NUMBER
                                  - NOT_INTERESTED
                                  - WARM_TRANSFER
                                  - WARM_TRANSFER_FAILED
                                  - CALENDLY
                                  - DNC
                                  - ENDED
                                  - FRAUD
                                  - LINE_BUSY
                                  - TEXT_CONSENT
                                  - CALL_AGAIN
                              default: []
                              description: Call end reasons that should finish the workflow
                            agentId:
                              type: string
                              format: uuid
                              description: Agent to use for this step
                            leaveVoicemail:
                              type: boolean
                              default: false
                              description: Whether to leave voicemail for call steps
                            initialMessage:
                              type: string
                              maxLength: 1600
                              description: >-
                                SMS message body for TEXT steps. Supports
                                {{variableName}} interpolation.
                            count:
                              type: integer
                              minimum: 1
                              default: 1
                              description: >-
                                Number of times to repeat this step before
                                moving to next
                          required:
                            - type
                            - order
                            - agentId
                        minItems: 1
                        description: Workflow steps
                      isInfinite:
                        type: boolean
                        default: false
                        description: >-
                          If true, workflow loops indefinitely using last step
                          config when defined steps are exhausted
                    required:
                      - steps
                    description: Workflow definition
                  maxDialsPerTick:
                    type: integer
                    nullable: true
                    minimum: 1
                    description: >-
                      Per-workflow max dials per scheduler tick. null = uncapped
                      (uses shared org budget).
                  createdAt:
                    type: string
                    description: Creation timestamp
                  updatedAt:
                    type: string
                    description: Last update timestamp
                required:
                  - id
                  - name
                  - description
                  - organizationId
                  - userId
                  - active
                  - startHour
                  - endHour
                  - timezone
                  - workflowSchedule
                  - tcpaSchedule
                  - definition
                  - maxDialsPerTick
                  - createdAt
                  - updatedAt
        '400':
          description: Bad Request
          content:
            application/json:
              schema:
                type: object
                properties:
                  status:
                    type: integer
                    default: 400
                  message:
                    type: string
                    default: Bad request
                  code:
                    type: string
                    enum:
                      - BAD_REQUEST
                    default: BAD_REQUEST
                  success:
                    type: boolean
                    enum:
                      - false
                    default: false
        '500':
          description: Internal server error
          content:
            application/json:
              schema:
                type: object
                properties:
                  status:
                    type: integer
                    default: 500
                  message:
                    type: string
                    default: Internal server error
                  code:
                    type: string
                    enum:
                      - INTERNAL_SERVER_ERROR
                    default: INTERNAL_SERVER_ERROR
                  success:
                    type: boolean
                    enum:
                      - false
                    default: false
      security:
        - ApiKey: []
components:
  schemas:
    WorkflowSchedule:
      type: object
      properties:
        monday:
          type: object
          properties:
            enabled:
              type: boolean
              default: true
              description: Whether this day is enabled
            timeRanges:
              type: array
              items:
                type: object
                properties:
                  startHour:
                    type: integer
                    minimum: 0
                    maximum: 23
                    description: Start hour (0-23)
                    example: 9
                  startMinute:
                    type: integer
                    minimum: 0
                    maximum: 59
                    description: Start minute (0-59)
                    example: 0
                  endHour:
                    type: integer
                    minimum: 0
                    maximum: 23
                    description: End hour (0-23)
                    example: 17
                  endMinute:
                    type: integer
                    minimum: 0
                    maximum: 59
                    description: End minute (0-59)
                    example: 0
                required:
                  - startHour
                  - startMinute
                  - endHour
                  - endMinute
                description: Time range for a day using separate hour/minute numbers
                example:
                  startHour: 9
                  startMinute: 0
                  endHour: 17
                  endMinute: 0
              minItems: 0
              default: []
              description: Time ranges when calls are allowed on this day
          description: Schedule configuration for a specific day
        tuesday:
          type: object
          properties:
            enabled:
              type: boolean
              default: true
              description: Whether this day is enabled
            timeRanges:
              type: array
              items:
                type: object
                properties:
                  startHour:
                    type: integer
                    minimum: 0
                    maximum: 23
                    description: Start hour (0-23)
                    example: 9
                  startMinute:
                    type: integer
                    minimum: 0
                    maximum: 59
                    description: Start minute (0-59)
                    example: 0
                  endHour:
                    type: integer
                    minimum: 0
                    maximum: 23
                    description: End hour (0-23)
                    example: 17
                  endMinute:
                    type: integer
                    minimum: 0
                    maximum: 59
                    description: End minute (0-59)
                    example: 0
                required:
                  - startHour
                  - startMinute
                  - endHour
                  - endMinute
                description: Time range for a day using separate hour/minute numbers
                example:
                  startHour: 9
                  startMinute: 0
                  endHour: 17
                  endMinute: 0
              minItems: 0
              default: []
              description: Time ranges when calls are allowed on this day
          description: Schedule configuration for a specific day
        wednesday:
          type: object
          properties:
            enabled:
              type: boolean
              default: true
              description: Whether this day is enabled
            timeRanges:
              type: array
              items:
                type: object
                properties:
                  startHour:
                    type: integer
                    minimum: 0
                    maximum: 23
                    description: Start hour (0-23)
                    example: 9
                  startMinute:
                    type: integer
                    minimum: 0
                    maximum: 59
                    description: Start minute (0-59)
                    example: 0
                  endHour:
                    type: integer
                    minimum: 0
                    maximum: 23
                    description: End hour (0-23)
                    example: 17
                  endMinute:
                    type: integer
                    minimum: 0
                    maximum: 59
                    description: End minute (0-59)
                    example: 0
                required:
                  - startHour
                  - startMinute
                  - endHour
                  - endMinute
                description: Time range for a day using separate hour/minute numbers
                example:
                  startHour: 9
                  startMinute: 0
                  endHour: 17
                  endMinute: 0
              minItems: 0
              default: []
              description: Time ranges when calls are allowed on this day
          description: Schedule configuration for a specific day
        thursday:
          type: object
          properties:
            enabled:
              type: boolean
              default: true
              description: Whether this day is enabled
            timeRanges:
              type: array
              items:
                type: object
                properties:
                  startHour:
                    type: integer
                    minimum: 0
                    maximum: 23
                    description: Start hour (0-23)
                    example: 9
                  startMinute:
                    type: integer
                    minimum: 0
                    maximum: 59
                    description: Start minute (0-59)
                    example: 0
                  endHour:
                    type: integer
                    minimum: 0
                    maximum: 23
                    description: End hour (0-23)
                    example: 17
                  endMinute:
                    type: integer
                    minimum: 0
                    maximum: 59
                    description: End minute (0-59)
                    example: 0
                required:
                  - startHour
                  - startMinute
                  - endHour
                  - endMinute
                description: Time range for a day using separate hour/minute numbers
                example:
                  startHour: 9
                  startMinute: 0
                  endHour: 17
                  endMinute: 0
              minItems: 0
              default: []
              description: Time ranges when calls are allowed on this day
          description: Schedule configuration for a specific day
        friday:
          type: object
          properties:
            enabled:
              type: boolean
              default: true
              description: Whether this day is enabled
            timeRanges:
              type: array
              items:
                type: object
                properties:
                  startHour:
                    type: integer
                    minimum: 0
                    maximum: 23
                    description: Start hour (0-23)
                    example: 9
                  startMinute:
                    type: integer
                    minimum: 0
                    maximum: 59
                    description: Start minute (0-59)
                    example: 0
                  endHour:
                    type: integer
                    minimum: 0
                    maximum: 23
                    description: End hour (0-23)
                    example: 17
                  endMinute:
                    type: integer
                    minimum: 0
                    maximum: 59
                    description: End minute (0-59)
                    example: 0
                required:
                  - startHour
                  - startMinute
                  - endHour
                  - endMinute
                description: Time range for a day using separate hour/minute numbers
                example:
                  startHour: 9
                  startMinute: 0
                  endHour: 17
                  endMinute: 0
              minItems: 0
              default: []
              description: Time ranges when calls are allowed on this day
          description: Schedule configuration for a specific day
        saturday:
          type: object
          properties:
            enabled:
              type: boolean
              default: true
              description: Whether this day is enabled
            timeRanges:
              type: array
              items:
                type: object
                properties:
                  startHour:
                    type: integer
                    minimum: 0
                    maximum: 23
                    description: Start hour (0-23)
                    example: 9
                  startMinute:
                    type: integer
                    minimum: 0
                    maximum: 59
                    description: Start minute (0-59)
                    example: 0
                  endHour:
                    type: integer
                    minimum: 0
                    maximum: 23
                    description: End hour (0-23)
                    example: 17
                  endMinute:
                    type: integer
                    minimum: 0
                    maximum: 59
                    description: End minute (0-59)
                    example: 0
                required:
                  - startHour
                  - startMinute
                  - endHour
                  - endMinute
                description: Time range for a day using separate hour/minute numbers
                example:
                  startHour: 9
                  startMinute: 0
                  endHour: 17
                  endMinute: 0
              minItems: 0
              default: []
              description: Time ranges when calls are allowed on this day
          description: Schedule configuration for a specific day
        sunday:
          type: object
          properties:
            enabled:
              type: boolean
              default: true
              description: Whether this day is enabled
            timeRanges:
              type: array
              items:
                type: object
                properties:
                  startHour:
                    type: integer
                    minimum: 0
                    maximum: 23
                    description: Start hour (0-23)
                    example: 9
                  startMinute:
                    type: integer
                    minimum: 0
                    maximum: 59
                    description: Start minute (0-59)
                    example: 0
                  endHour:
                    type: integer
                    minimum: 0
                    maximum: 23
                    description: End hour (0-23)
                    example: 17
                  endMinute:
                    type: integer
                    minimum: 0
                    maximum: 59
                    description: End minute (0-59)
                    example: 0
                required:
                  - startHour
                  - startMinute
                  - endHour
                  - endMinute
                description: Time range for a day using separate hour/minute numbers
                example:
                  startHour: 9
                  startMinute: 0
                  endHour: 17
                  endMinute: 0
              minItems: 0
              default: []
              description: Time ranges when calls are allowed on this day
          description: Schedule configuration for a specific day
        globalTimeRanges:
          type: array
          items:
            type: object
            properties:
              startHour:
                type: integer
                minimum: 0
                maximum: 23
                description: Start hour (0-23)
                example: 9
              startMinute:
                type: integer
                minimum: 0
                maximum: 59
                description: Start minute (0-59)
                example: 0
              endHour:
                type: integer
                minimum: 0
                maximum: 23
                description: End hour (0-23)
                example: 17
              endMinute:
                type: integer
                minimum: 0
                maximum: 59
                description: End minute (0-59)
                example: 0
            required:
              - startHour
              - startMinute
              - endHour
              - endMinute
            description: Time range for a day using separate hour/minute numbers
            example:
              startHour: 9
              startMinute: 0
              endHour: 17
              endMinute: 0
          description: >-
            Global time ranges that apply to all enabled days if day-specific
            ranges are not set
        exceptions:
          type: array
          items:
            type: object
            properties:
              date:
                type: string
                pattern: ^\d{4}-\d{2}-\d{2}$
                description: Date in YYYY-MM-DD format
                example: '2024-12-25'
              enabled:
                type: boolean
                description: Whether calls are allowed on this date
              timeRanges:
                type: array
                items:
                  type: object
                  properties:
                    startHour:
                      type: integer
                      minimum: 0
                      maximum: 23
                      description: Start hour (0-23)
                      example: 9
                    startMinute:
                      type: integer
                      minimum: 0
                      maximum: 59
                      description: Start minute (0-59)
                      example: 0
                    endHour:
                      type: integer
                      minimum: 0
                      maximum: 23
                      description: End hour (0-23)
                      example: 17
                    endMinute:
                      type: integer
                      minimum: 0
                      maximum: 59
                      description: End minute (0-59)
                      example: 0
                  required:
                    - startHour
                    - startMinute
                    - endHour
                    - endMinute
                  description: Time range for a day using separate hour/minute numbers
                  example:
                    startHour: 9
                    startMinute: 0
                    endHour: 17
                    endMinute: 0
                description: Custom time ranges for this exception date
              reason:
                type: string
                description: Reason for the exception (e.g., "Christmas Day")
            required:
              - date
              - enabled
          default: []
          description: Exception dates (holidays, special events, etc.)
      description: Workflow schedule - operates in workflow timezone defined above
      example:
        monday:
          enabled: true
          timeRanges:
            - startHour: 9
              startMinute: 0
              endHour: 17
              endMinute: 0
        tuesday:
          enabled: true
          timeRanges:
            - startHour: 9
              startMinute: 0
              endHour: 17
              endMinute: 0
        wednesday:
          enabled: true
          timeRanges:
            - startHour: 9
              startMinute: 0
              endHour: 17
              endMinute: 0
        thursday:
          enabled: true
          timeRanges:
            - startHour: 9
              startMinute: 0
              endHour: 17
              endMinute: 0
        friday:
          enabled: true
          timeRanges:
            - startHour: 9
              startMinute: 0
              endHour: 17
              endMinute: 0
        saturday:
          enabled: false
          timeRanges: []
        sunday:
          enabled: false
          timeRanges: []
    TcpaSchedule:
      type: object
      properties:
        monday:
          type: object
          properties:
            enabled:
              type: boolean
              default: true
              description: Whether this day is enabled
            timeRanges:
              type: array
              items:
                type: object
                properties:
                  startHour:
                    type: integer
                    minimum: 0
                    maximum: 23
                    description: Start hour (0-23)
                    example: 9
                  startMinute:
                    type: integer
                    minimum: 0
                    maximum: 59
                    description: Start minute (0-59)
                    example: 0
                  endHour:
                    type: integer
                    minimum: 0
                    maximum: 23
                    description: End hour (0-23)
                    example: 17
                  endMinute:
                    type: integer
                    minimum: 0
                    maximum: 59
                    description: End minute (0-59)
                    example: 0
                required:
                  - startHour
                  - startMinute
                  - endHour
                  - endMinute
                description: Time range for a day using separate hour/minute numbers
                example:
                  startHour: 9
                  startMinute: 0
                  endHour: 17
                  endMinute: 0
              minItems: 0
              default: []
              description: Time ranges when calls are allowed on this day
          description: Schedule configuration for a specific day
        tuesday:
          type: object
          properties:
            enabled:
              type: boolean
              default: true
              description: Whether this day is enabled
            timeRanges:
              type: array
              items:
                type: object
                properties:
                  startHour:
                    type: integer
                    minimum: 0
                    maximum: 23
                    description: Start hour (0-23)
                    example: 9
                  startMinute:
                    type: integer
                    minimum: 0
                    maximum: 59
                    description: Start minute (0-59)
                    example: 0
                  endHour:
                    type: integer
                    minimum: 0
                    maximum: 23
                    description: End hour (0-23)
                    example: 17
                  endMinute:
                    type: integer
                    minimum: 0
                    maximum: 59
                    description: End minute (0-59)
                    example: 0
                required:
                  - startHour
                  - startMinute
                  - endHour
                  - endMinute
                description: Time range for a day using separate hour/minute numbers
                example:
                  startHour: 9
                  startMinute: 0
                  endHour: 17
                  endMinute: 0
              minItems: 0
              default: []
              description: Time ranges when calls are allowed on this day
          description: Schedule configuration for a specific day
        wednesday:
          type: object
          properties:
            enabled:
              type: boolean
              default: true
              description: Whether this day is enabled
            timeRanges:
              type: array
              items:
                type: object
                properties:
                  startHour:
                    type: integer
                    minimum: 0
                    maximum: 23
                    description: Start hour (0-23)
                    example: 9
                  startMinute:
                    type: integer
                    minimum: 0
                    maximum: 59
                    description: Start minute (0-59)
                    example: 0
                  endHour:
                    type: integer
                    minimum: 0
                    maximum: 23
                    description: End hour (0-23)
                    example: 17
                  endMinute:
                    type: integer
                    minimum: 0
                    maximum: 59
                    description: End minute (0-59)
                    example: 0
                required:
                  - startHour
                  - startMinute
                  - endHour
                  - endMinute
                description: Time range for a day using separate hour/minute numbers
                example:
                  startHour: 9
                  startMinute: 0
                  endHour: 17
                  endMinute: 0
              minItems: 0
              default: []
              description: Time ranges when calls are allowed on this day
          description: Schedule configuration for a specific day
        thursday:
          type: object
          properties:
            enabled:
              type: boolean
              default: true
              description: Whether this day is enabled
            timeRanges:
              type: array
              items:
                type: object
                properties:
                  startHour:
                    type: integer
                    minimum: 0
                    maximum: 23
                    description: Start hour (0-23)
                    example: 9
                  startMinute:
                    type: integer
                    minimum: 0
                    maximum: 59
                    description: Start minute (0-59)
                    example: 0
                  endHour:
                    type: integer
                    minimum: 0
                    maximum: 23
                    description: End hour (0-23)
                    example: 17
                  endMinute:
                    type: integer
                    minimum: 0
                    maximum: 59
                    description: End minute (0-59)
                    example: 0
                required:
                  - startHour
                  - startMinute
                  - endHour
                  - endMinute
                description: Time range for a day using separate hour/minute numbers
                example:
                  startHour: 9
                  startMinute: 0
                  endHour: 17
                  endMinute: 0
              minItems: 0
              default: []
              description: Time ranges when calls are allowed on this day
          description: Schedule configuration for a specific day
        friday:
          type: object
          properties:
            enabled:
              type: boolean
              default: true
              description: Whether this day is enabled
            timeRanges:
              type: array
              items:
                type: object
                properties:
                  startHour:
                    type: integer
                    minimum: 0
                    maximum: 23
                    description: Start hour (0-23)
                    example: 9
                  startMinute:
                    type: integer
                    minimum: 0
                    maximum: 59
                    description: Start minute (0-59)
                    example: 0
                  endHour:
                    type: integer
                    minimum: 0
                    maximum: 23
                    description: End hour (0-23)
                    example: 17
                  endMinute:
                    type: integer
                    minimum: 0
                    maximum: 59
                    description: End minute (0-59)
                    example: 0
                required:
                  - startHour
                  - startMinute
                  - endHour
                  - endMinute
                description: Time range for a day using separate hour/minute numbers
                example:
                  startHour: 9
                  startMinute: 0
                  endHour: 17
                  endMinute: 0
              minItems: 0
              default: []
              description: Time ranges when calls are allowed on this day
          description: Schedule configuration for a specific day
        saturday:
          type: object
          properties:
            enabled:
              type: boolean
              default: true
              description: Whether this day is enabled
            timeRanges:
              type: array
              items:
                type: object
                properties:
                  startHour:
                    type: integer
                    minimum: 0
                    maximum: 23
                    description: Start hour (0-23)
                    example: 9
                  startMinute:
                    type: integer
                    minimum: 0
                    maximum: 59
                    description: Start minute (0-59)
                    example: 0
                  endHour:
                    type: integer
                    minimum: 0
                    maximum: 23
                    description: End hour (0-23)
                    example: 17
                  endMinute:
                    type: integer
                    minimum: 0
                    maximum: 59
                    description: End minute (0-59)
                    example: 0
                required:
                  - startHour
                  - startMinute
                  - endHour
                  - endMinute
                description: Time range for a day using separate hour/minute numbers
                example:
                  startHour: 9
                  startMinute: 0
                  endHour: 17
                  endMinute: 0
              minItems: 0
              default: []
              description: Time ranges when calls are allowed on this day
          description: Schedule configuration for a specific day
        sunday:
          type: object
          properties:
            enabled:
              type: boolean
              default: true
              description: Whether this day is enabled
            timeRanges:
              type: array
              items:
                type: object
                properties:
                  startHour:
                    type: integer
                    minimum: 0
                    maximum: 23
                    description: Start hour (0-23)
                    example: 9
                  startMinute:
                    type: integer
                    minimum: 0
                    maximum: 59
                    description: Start minute (0-59)
                    example: 0
                  endHour:
                    type: integer
                    minimum: 0
                    maximum: 23
                    description: End hour (0-23)
                    example: 17
                  endMinute:
                    type: integer
                    minimum: 0
                    maximum: 59
                    description: End minute (0-59)
                    example: 0
                required:
                  - startHour
                  - startMinute
                  - endHour
                  - endMinute
                description: Time range for a day using separate hour/minute numbers
                example:
                  startHour: 9
                  startMinute: 0
                  endHour: 17
                  endMinute: 0
              minItems: 0
              default: []
              description: Time ranges when calls are allowed on this day
          description: Schedule configuration for a specific day
        globalTimeRanges:
          type: array
          items:
            type: object
            properties:
              startHour:
                type: integer
                minimum: 0
                maximum: 23
                description: Start hour (0-23)
                example: 9
              startMinute:
                type: integer
                minimum: 0
                maximum: 59
                description: Start minute (0-59)
                example: 0
              endHour:
                type: integer
                minimum: 0
                maximum: 23
                description: End hour (0-23)
                example: 17
              endMinute:
                type: integer
                minimum: 0
                maximum: 59
                description: End minute (0-59)
                example: 0
            required:
              - startHour
              - startMinute
              - endHour
              - endMinute
            description: Time range for a day using separate hour/minute numbers
            example:
              startHour: 9
              startMinute: 0
              endHour: 17
              endMinute: 0
          description: >-
            Global time ranges that apply to all enabled days if day-specific
            ranges are not set
        stateOverrides:
          type: object
          additionalProperties:
            type: object
            properties:
              monday:
                type: object
                properties:
                  enabled:
                    type: boolean
                    default: true
                    description: Whether this day is enabled
                  timeRanges:
                    type: array
                    items:
                      type: object
                      properties:
                        startHour:
                          type: integer
                          minimum: 0
                          maximum: 23
                          description: Start hour (0-23)
                          example: 9
                        startMinute:
                          type: integer
                          minimum: 0
                          maximum: 59
                          description: Start minute (0-59)
                          example: 0
                        endHour:
                          type: integer
                          minimum: 0
                          maximum: 23
                          description: End hour (0-23)
                          example: 17
                        endMinute:
                          type: integer
                          minimum: 0
                          maximum: 59
                          description: End minute (0-59)
                          example: 0
                      required:
                        - startHour
                        - startMinute
                        - endHour
                        - endMinute
                      description: Time range for a day using separate hour/minute numbers
                      example:
                        startHour: 9
                        startMinute: 0
                        endHour: 17
                        endMinute: 0
                    minItems: 0
                    default: []
                    description: Time ranges when calls are allowed on this day
                description: Schedule configuration for a specific day
              tuesday:
                type: object
                properties:
                  enabled:
                    type: boolean
                    default: true
                    description: Whether this day is enabled
                  timeRanges:
                    type: array
                    items:
                      type: object
                      properties:
                        startHour:
                          type: integer
                          minimum: 0
                          maximum: 23
                          description: Start hour (0-23)
                          example: 9
                        startMinute:
                          type: integer
                          minimum: 0
                          maximum: 59
                          description: Start minute (0-59)
                          example: 0
                        endHour:
                          type: integer
                          minimum: 0
                          maximum: 23
                          description: End hour (0-23)
                          example: 17
                        endMinute:
                          type: integer
                          minimum: 0
                          maximum: 59
                          description: End minute (0-59)
                          example: 0
                      required:
                        - startHour
                        - startMinute
                        - endHour
                        - endMinute
                      description: Time range for a day using separate hour/minute numbers
                      example:
                        startHour: 9
                        startMinute: 0
                        endHour: 17
                        endMinute: 0
                    minItems: 0
                    default: []
                    description: Time ranges when calls are allowed on this day
                description: Schedule configuration for a specific day
              wednesday:
                type: object
                properties:
                  enabled:
                    type: boolean
                    default: true
                    description: Whether this day is enabled
                  timeRanges:
                    type: array
                    items:
                      type: object
                      properties:
                        startHour:
                          type: integer
                          minimum: 0
                          maximum: 23
                          description: Start hour (0-23)
                          example: 9
                        startMinute:
                          type: integer
                          minimum: 0
                          maximum: 59
                          description: Start minute (0-59)
                          example: 0
                        endHour:
                          type: integer
                          minimum: 0
                          maximum: 23
                          description: End hour (0-23)
                          example: 17
                        endMinute:
                          type: integer
                          minimum: 0
                          maximum: 59
                          description: End minute (0-59)
                          example: 0
                      required:
                        - startHour
                        - startMinute
                        - endHour
                        - endMinute
                      description: Time range for a day using separate hour/minute numbers
                      example:
                        startHour: 9
                        startMinute: 0
                        endHour: 17
                        endMinute: 0
                    minItems: 0
                    default: []
                    description: Time ranges when calls are allowed on this day
                description: Schedule configuration for a specific day
              thursday:
                type: object
                properties:
                  enabled:
                    type: boolean
                    default: true
                    description: Whether this day is enabled
                  timeRanges:
                    type: array
                    items:
                      type: object
                      properties:
                        startHour:
                          type: integer
                          minimum: 0
                          maximum: 23
                          description: Start hour (0-23)
                          example: 9
                        startMinute:
                          type: integer
                          minimum: 0
                          maximum: 59
                          description: Start minute (0-59)
                          example: 0
                        endHour:
                          type: integer
                          minimum: 0
                          maximum: 23
                          description: End hour (0-23)
                          example: 17
                        endMinute:
                          type: integer
                          minimum: 0
                          maximum: 59
                          description: End minute (0-59)
                          example: 0
                      required:
                        - startHour
                        - startMinute
                        - endHour
                        - endMinute
                      description: Time range for a day using separate hour/minute numbers
                      example:
                        startHour: 9
                        startMinute: 0
                        endHour: 17
                        endMinute: 0
                    minItems: 0
                    default: []
                    description: Time ranges when calls are allowed on this day
                description: Schedule configuration for a specific day
              friday:
                type: object
                properties:
                  enabled:
                    type: boolean
                    default: true
                    description: Whether this day is enabled
                  timeRanges:
                    type: array
                    items:
                      type: object
                      properties:
                        startHour:
                          type: integer
                          minimum: 0
                          maximum: 23
                          description: Start hour (0-23)
                          example: 9
                        startMinute:
                          type: integer
                          minimum: 0
                          maximum: 59
                          description: Start minute (0-59)
                          example: 0
                        endHour:
                          type: integer
                          minimum: 0
                          maximum: 23
                          description: End hour (0-23)
                          example: 17
                        endMinute:
                          type: integer
                          minimum: 0
                          maximum: 59
                          description: End minute (0-59)
                          example: 0
                      required:
                        - startHour
                        - startMinute
                        - endHour
                        - endMinute
                      description: Time range for a day using separate hour/minute numbers
                      example:
                        startHour: 9
                        startMinute: 0
                        endHour: 17
                        endMinute: 0
                    minItems: 0
                    default: []
                    description: Time ranges when calls are allowed on this day
                description: Schedule configuration for a specific day
              saturday:
                type: object
                properties:
                  enabled:
                    type: boolean
                    default: true
                    description: Whether this day is enabled
                  timeRanges:
                    type: array
                    items:
                      type: object
                      properties:
                        startHour:
                          type: integer
                          minimum: 0
                          maximum: 23
                          description: Start hour (0-23)
                          example: 9
                        startMinute:
                          type: integer
                          minimum: 0
                          maximum: 59
                          description: Start minute (0-59)
                          example: 0
                        endHour:
                          type: integer
                          minimum: 0
                          maximum: 23
                          description: End hour (0-23)
                          example: 17
                        endMinute:
                          type: integer
                          minimum: 0
                          maximum: 59
                          description: End minute (0-59)
                          example: 0
                      required:
                        - startHour
                        - startMinute
                        - endHour
                        - endMinute
                      description: Time range for a day using separate hour/minute numbers
                      example:
                        startHour: 9
                        startMinute: 0
                        endHour: 17
                        endMinute: 0
                    minItems: 0
                    default: []
                    description: Time ranges when calls are allowed on this day
                description: Schedule configuration for a specific day
              sunday:
                type: object
                properties:
                  enabled:
                    type: boolean
                    default: true
                    description: Whether this day is enabled
                  timeRanges:
                    type: array
                    items:
                      type: object
                      properties:
                        startHour:
                          type: integer
                          minimum: 0
                          maximum: 23
                          description: Start hour (0-23)
                          example: 9
                        startMinute:
                          type: integer
                          minimum: 0
                          maximum: 59
                          description: Start minute (0-59)
                          example: 0
                        endHour:
                          type: integer
                          minimum: 0
                          maximum: 23
                          description: End hour (0-23)
                          example: 17
                        endMinute:
                          type: integer
                          minimum: 0
                          maximum: 59
                          description: End minute (0-59)
                          example: 0
                      required:
                        - startHour
                        - startMinute
                        - endHour
                        - endMinute
                      description: Time range for a day using separate hour/minute numbers
                      example:
                        startHour: 9
                        startMinute: 0
                        endHour: 17
                        endMinute: 0
                    minItems: 0
                    default: []
                    description: Time ranges when calls are allowed on this day
                description: Schedule configuration for a specific day
          description: >-
            State-specific TCPA schedule overrides (e.g., different rules for
            CA, NY)
      description: TCPA schedule - applies to borrower local timezone
      example:
        monday:
          enabled: true
          timeRanges:
            - startHour: 8
              startMinute: 0
              endHour: 21
              endMinute: 0
        tuesday:
          enabled: true
          timeRanges:
            - startHour: 8
              startMinute: 0
              endHour: 21
              endMinute: 0
        wednesday:
          enabled: true
          timeRanges:
            - startHour: 8
              startMinute: 0
              endHour: 21
              endMinute: 0
        thursday:
          enabled: true
          timeRanges:
            - startHour: 8
              startMinute: 0
              endHour: 21
              endMinute: 0
        friday:
          enabled: true
          timeRanges:
            - startHour: 8
              startMinute: 0
              endHour: 21
              endMinute: 0
        saturday:
          enabled: true
          timeRanges:
            - startHour: 8
              startMinute: 0
              endHour: 21
              endMinute: 0
        sunday:
          enabled: true
          timeRanges:
            - startHour: 13
              startMinute: 0
              endHour: 21
              endMinute: 0
  securitySchemes:
    ApiKey:
      type: apiKey
      in: header
      name: X-API-Key

````