{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/highlevel/json-schema/highlevel-patch-agent-response-dto-schema.json",
  "title": "PatchAgentResponseDTO",
  "x-generated": "2026-11-10",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/highlevel-agents-api-openapi.yml#/components/schemas/PatchAgentResponseDTO",
  "type": "object",
  "properties": {
    "id": {
      "type": "string",
      "description": "Unique identifier for the created agent"
    },
    "locationId": {
      "type": "string",
      "description": "Unique identifier for the location where this agent operates"
    },
    "agentName": {
      "type": "string",
      "description": "Display name of the voice AI agent"
    },
    "businessName": {
      "type": "string",
      "description": "Name of the business this agent represents"
    },
    "welcomeMessage": {
      "type": "string",
      "description": "Greeting message spoken when the agent answers calls"
    },
    "agentPrompt": {
      "type": "string",
      "description": "Custom instructions defining the agent's behavior"
    },
    "voiceId": {
      "type": "string",
      "description": "Identifier for the speech synthesis voice being used"
    },
    "language": {
      "type": "string",
      "description": "Language code for the agent's speech and understanding"
    },
    "patienceLevel": {
      "type": "string",
      "description": "Current tolerance level for caller response delays"
    },
    "maxCallDuration": {
      "type": "number",
      "description": "Maximum call duration in seconds, between 180-900",
      "minimum": 180,
      "maximum": 900
    },
    "sendUserIdleReminders": {
      "type": "boolean",
      "description": "Indicates whether automatic idle reminders are enabled"
    },
    "reminderAfterIdleTimeSeconds": {
      "type": "number",
      "description": "Seconds to wait before sending idle reminders, between 1-20",
      "minimum": 1,
      "maximum": 20
    },
    "inboundNumber": {
      "type": "string",
      "description": "Phone number for receiving inbound calls"
    },
    "numberPoolId": {
      "type": "string",
      "description": "Identifier for the number pool managing this agent's phone allocation"
    },
    "callEndWorkflowIds": {
      "description": "Array of workflow IDs triggered automatically when calls end",
      "type": "array",
      "items": {
        "type": "string"
      }
    },
    "sendPostCallNotificationTo": {
      "description": "Current post-call notification settings including recipient configuration",
      "allOf": [
        {
          "$ref": "#/$defs/SendPostCallNotificationSchema"
        }
      ]
    },
    "agentWorkingHours": {
      "description": "Time intervals when the agent accepts calls, organized by day of week",
      "type": "array",
      "items": {
        "$ref": "#/$defs/AgentWorkingHoursDTO"
      }
    },
    "timezone": {
      "type": "string",
      "description": "IANA timezone identifier for working hours and scheduling"
    },
    "isAgentAsBackupDisabled": {
      "type": "boolean",
      "description": "Indicates whether this agent is excluded from backup scenarios"
    },
    "translation": {
      "description": "Current language translation settings including enablement status and target language",
      "allOf": [
        {
          "$ref": "#/$defs/TranslationSchema"
        }
      ]
    }
  },
  "required": [
    "id",
    "locationId",
    "agentName",
    "businessName",
    "welcomeMessage",
    "agentPrompt",
    "voiceId",
    "language",
    "patienceLevel",
    "maxCallDuration",
    "sendUserIdleReminders",
    "reminderAfterIdleTimeSeconds",
    "timezone",
    "isAgentAsBackupDisabled"
  ],
  "$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"
      ]
    },
    "SendPostCallNotificationSchema": {
      "type": "object",
      "properties": {
        "admins": {
          "type": "boolean",
          "description": "Send notifications to admins"
        },
        "allUsers": {
          "type": "boolean",
          "description": "Send notifications to all users"
        },
        "contactAssignedUser": {
          "type": "boolean",
          "description": "Send notifications to contact assigned user"
        },
        "specificUsers": {
          "description": "Specific user IDs to notify",
          "type": "array",
          "items": {
            "type": "string"
          }
        },
        "customEmails": {
          "description": "Custom email addresses to notify",
          "type": "array",
          "items": {
            "type": "string"
          }
        }
      }
    },
    "TranslationSchema": {
      "type": "object",
      "properties": {
        "enabled": {
          "type": "boolean",
          "description": "Whether translation is enabled"
        },
        "language": {
          "type": "string",
          "description": "Translation language code"
        }
      }
    }
  }
}