{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/highlevel/json-schema/highlevel-patch-agent-dto-schema.json",
  "title": "PatchAgentDTO",
  "x-generated": "2026-11-10",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/highlevel-agents-api-openapi.yml#/components/schemas/PatchAgentDTO",
  "type": "object",
  "properties": {
    "agentName": {
      "type": "string",
      "description": "Display name for the voice AI agent, between 1-40 characters. Default: \"My Agent {random 3 digit number}\"",
      "maxLength": 40,
      "minLength": 1
    },
    "businessName": {
      "type": "string",
      "description": "Name of the business this agent represents. Default: Uses location name",
      "minLength": 1
    },
    "welcomeMessage": {
      "type": "string",
      "description": "Initial greeting spoken when the agent answers calls. Default: Auto generated",
      "maxLength": 190,
      "minLength": 1
    },
    "agentPrompt": {
      "type": "string",
      "description": "Custom instructions defining the agent's behavior and personality. Default: Basic prompt generated automatically"
    },
    "voiceId": {
      "type": "string",
      "description": "Identifier for the speech synthesis voice from available voice options. Default: Auto generated"
    },
    "language": {
      "$ref": "#/$defs/VoiceAILanguage"
    },
    "patienceLevel": {
      "$ref": "#/$defs/PatienceLevel"
    },
    "maxCallDuration": {
      "type": "number",
      "description": "Maximum call duration in seconds, between 180-900 (3-15 minutes). Default: 300 seconds (5 minutes)",
      "minimum": 180,
      "maximum": 900
    },
    "sendUserIdleReminders": {
      "type": "boolean",
      "description": "Enables automatic reminders when callers are silent. Default: true"
    },
    "reminderAfterIdleTimeSeconds": {
      "type": "number",
      "description": "Seconds to wait before sending idle reminders, between 1-20. Default: 8 seconds",
      "minimum": 1,
      "maximum": 20
    },
    "inboundNumber": {
      "type": "string",
      "description": "Phone number for receiving inbound calls to this agent. Default: null"
    },
    "numberPoolId": {
      "type": "string",
      "description": "Identifier for the number pool managing phone number allocation. Default: null"
    },
    "callEndWorkflowIds": {
      "description": "Array of workflow IDs to trigger automatically when calls end. Default: []",
      "maxItems": 10,
      "type": "array",
      "items": {
        "type": "string"
      }
    },
    "sendPostCallNotificationTo": {
      "description": "Configuration for post-call email notifications to various recipients. Default: []",
      "allOf": [
        {
          "$ref": "#/$defs/SendPostCallNotificationDTO"
        }
      ]
    },
    "agentWorkingHours": {
      "description": "Time intervals defining when the agent accepts calls, organized by day of week. Default: [] (available 24/7)",
      "type": "array",
      "items": {
        "$ref": "#/$defs/AgentWorkingHoursDTO"
      }
    },
    "timezone": {
      "type": "string",
      "description": "IANA timezone identifier affecting working hours and scheduling. Default: Location timezone",
      "pattern": "^[A-Za-z_]+/[A-Za-z_]+$"
    },
    "isAgentAsBackupDisabled": {
      "type": "boolean",
      "description": "Prevents this agent from being used as a fallback option. Default: false (Available as backup agent)"
    },
    "translation": {
      "description": "Language translation settings including enablement flag and target language code. Rules: (1) translation.enabled can only be true if the agent's language is not en-US; (2) when enabled, translation.language must be either the agent's language or en-US; (3) when enabled, translation.language is required.",
      "allOf": [
        {
          "$ref": "#/$defs/TranslationDTO"
        }
      ]
    }
  },
  "$defs": {
    "AgentWorkingHoursDTO": {
      "type": "object",
      "properties": {
        "dayOfTheWeek": {
          "type": "number",
          "enum": [
            1,
            2,
            3,
            4,
            5,
            6,
            7
          ],
          "description": "Day of the week for this working hours configuration (Monday=1 to Sunday=7)"
        },
        "intervals": {
          "description": "Array of time intervals when the agent is available on this day",
          "type": "array",
          "items": {
            "$ref": "#/$defs/IntervalDTO"
          }
        }
      },
      "required": [
        "dayOfTheWeek",
        "intervals"
      ]
    },
    "IntervalDTO": {
      "type": "object",
      "properties": {
        "startHour": {
          "type": "number",
          "description": "Starting hour of the working interval in 24-hour format (0-23)",
          "minimum": 0,
          "maximum": 23
        },
        "endHour": {
          "type": "number",
          "description": "Ending hour of the working interval in 24-hour format (0-23)",
          "minimum": 0,
          "maximum": 23
        },
        "startMinute": {
          "type": "number",
          "description": "Starting minute of the working interval (0-59)",
          "minimum": 0,
          "maximum": 59
        },
        "endMinute": {
          "type": "number",
          "description": "Ending minute of the working interval (0-59)",
          "minimum": 0,
          "maximum": 59
        }
      },
      "required": [
        "startHour",
        "endHour",
        "startMinute",
        "endMinute"
      ]
    },
    "PatienceLevel": {
      "type": "string",
      "description": "Tolerance level for caller response delays. Default: \"high\"",
      "enum": [
        "low",
        "medium",
        "high"
      ]
    },
    "SendPostCallNotificationDTO": {
      "type": "object",
      "properties": {
        "admins": {
          "type": "boolean",
          "description": "Enables post-call notifications to all admin users in the location. Default: true"
        },
        "allUsers": {
          "type": "boolean",
          "description": "Enables post-call notifications to all users in the location. Default: false"
        },
        "contactAssignedUser": {
          "type": "boolean",
          "description": "Enables post-call notifications to the user assigned to the contact. Default: false"
        },
        "specificUsers": {
          "description": "Array of specific user IDs to receive post-call notifications. Default: []",
          "type": "array",
          "items": {
            "type": "string"
          }
        },
        "customEmails": {
          "description": "Array of custom email addresses to receive post-call notifications. Default: []",
          "type": "array",
          "items": {
            "type": "string"
          }
        }
      },
      "required": [
        "admins",
        "allUsers",
        "contactAssignedUser",
        "specificUsers",
        "customEmails"
      ]
    },
    "TranslationDTO": {
      "type": "object",
      "properties": {
        "enabled": {
          "type": "boolean",
          "description": "Enables language translation for agent conversations. Default: false"
        },
        "language": {
          "type": "string",
          "description": "Target language code for translation (e.g., \"es\" for Spanish, \"fr\" for French)."
        }
      },
      "required": [
        "enabled"
      ]
    },
    "VoiceAILanguage": {
      "type": "string",
      "description": "Language code for the agent's speech and understanding. Default: \"en-US\"",
      "enum": [
        "en-US",
        "pt-BR",
        "es",
        "fr",
        "de",
        "it",
        "nl-NL",
        "multi"
      ]
    }
  }
}