{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/highlevel/json-schema/highlevel-get-agent-response-dto-schema.json",
  "title": "GetAgentResponseDTO",
  "x-generated": "2026-11-10",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/highlevel-agents-api-openapi.yml#/components/schemas/GetAgentResponseDTO",
  "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"
        }
      ]
    },
    "actions": {
      "description": "Raw actions configured for this agent with complete actionParameters structure",
      "type": "array",
      "items": {
        "$ref": "#/$defs/AgentActionResponseDTO"
      }
    }
  },
  "required": [
    "id",
    "locationId",
    "agentName",
    "businessName",
    "welcomeMessage",
    "agentPrompt",
    "voiceId",
    "language",
    "patienceLevel",
    "maxCallDuration",
    "sendUserIdleReminders",
    "reminderAfterIdleTimeSeconds",
    "timezone",
    "isAgentAsBackupDisabled",
    "actions"
  ],
  "$defs": {
    "AgentActionResponseDTO": {
      "type": "object",
      "properties": {
        "id": {
          "type": "string",
          "description": "Unique identifier for this action"
        },
        "actionType": {
          "type": "string",
          "description": "Type of action",
          "enum": [
            "CALL_TRANSFER",
            "DATA_EXTRACTION",
            "IN_CALL_DATA_EXTRACTION",
            "WORKFLOW_TRIGGER",
            "SMS",
            "APPOINTMENT_BOOKING",
            "CUSTOM_ACTION",
            "KNOWLEDGE_BASE"
          ]
        },
        "name": {
          "type": "string",
          "description": "Human-readable name for this action"
        },
        "actionParameters": {
          "description": "Action parameters - structure varies by actionType",
          "oneOf": [
            {
              "$ref": "#/$defs/CallTransferActionParameters"
            },
            {
              "$ref": "#/$defs/DataExtractionActionParameters"
            },
            {
              "$ref": "#/$defs/InCallDataExtractionActionParameters"
            },
            {
              "$ref": "#/$defs/WorkflowTriggerParameters"
            },
            {
              "$ref": "#/$defs/SMSParameters"
            },
            {
              "$ref": "#/$defs/AppointmentBookingActionParameters"
            },
            {
              "$ref": "#/$defs/CustomActionParameters"
            },
            {
              "$ref": "#/$defs/KnowledgeBaseParameters"
            }
          ]
        }
      },
      "required": [
        "id",
        "actionType",
        "name",
        "actionParameters"
      ]
    },
    "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"
      ]
    },
    "AppointmentBookingActionParameters": {
      "type": "object",
      "properties": {
        "calendarId": {
          "type": "string",
          "description": "Calendar ID to book appointments in"
        },
        "daysOfOfferingDates": {
          "type": "number",
          "description": "Number of days ahead to offer booking dates"
        },
        "slotsPerDay": {
          "type": "number",
          "description": "Number of available slots per day"
        },
        "hoursBetweenSlots": {
          "type": "number",
          "description": "Hours between available slots"
        }
      },
      "required": [
        "calendarId",
        "daysOfOfferingDates",
        "slotsPerDay",
        "hoursBetweenSlots"
      ]
    },
    "CallTransferActionParameters": {
      "type": "object",
      "properties": {
        "triggerPrompt": {
          "type": "string",
          "description": "When to trigger this action during the call"
        },
        "transferToType": {
          "type": "string",
          "description": "Type of transfer destination (currently only \"number\" is supported)",
          "enum": [
            "number"
          ]
        },
        "transferToValue": {
          "type": "string",
          "description": "Phone number to transfer to. Must start with +, include country code, contain only numbers, and be 11-16 characters long (e.g., +12345678901)."
        },
        "triggerMessage": {
          "type": "string",
          "description": "Message to tell the caller before transferring"
        },
        "hearWhisperMessage": {
          "type": "boolean",
          "description": "Whether to play whisper message to the receiving party"
        }
      },
      "required": [
        "triggerPrompt",
        "transferToType",
        "transferToValue",
        "triggerMessage"
      ]
    },
    "CustomActionApiDetailsDTO": {
      "type": "object",
      "properties": {
        "url": {
          "type": "string",
          "description": "API endpoint URL"
        },
        "method": {
          "type": "string",
          "description": "HTTP method",
          "enum": [
            "POST",
            "GET"
          ]
        },
        "authenticationRequired": {
          "type": "boolean",
          "description": "Whether authentication is required"
        },
        "authenticationValue": {
          "type": "string",
          "description": "Authentication token or API key (required if authenticationRequired is true)"
        },
        "headers": {
          "description": "HTTP headers to include",
          "type": "array",
          "items": {
            "$ref": "#/$defs/CustomActionHeaderDTO"
          }
        },
        "parameters": {
          "description": "API parameters to send",
          "type": "array",
          "items": {
            "$ref": "#/$defs/CustomActionParameterDTO"
          }
        }
      },
      "required": [
        "url",
        "method"
      ]
    },
    "CustomActionHeaderDTO": {
      "type": "object",
      "properties": {
        "key": {
          "type": "string",
          "description": "HTTP header name"
        },
        "value": {
          "type": "string",
          "description": "HTTP header value"
        }
      },
      "required": [
        "key",
        "value"
      ]
    },
    "CustomActionParameterDTO": {
      "type": "object",
      "properties": {
        "name": {
          "type": "string",
          "description": "Parameter name"
        },
        "description": {
          "type": "string",
          "description": "Parameter description"
        },
        "type": {
          "type": "string",
          "description": "Parameter type"
        }
      },
      "required": [
        "name"
      ]
    },
    "CustomActionParameters": {
      "type": "object",
      "properties": {
        "triggerPrompt": {
          "type": "string",
          "description": "When to call the custom API"
        },
        "triggerMessage": {
          "type": "string",
          "description": "Message to tell the caller"
        },
        "apiDetails": {
          "description": "API endpoint configuration",
          "allOf": [
            {
              "$ref": "#/$defs/CustomActionApiDetailsDTO"
            }
          ]
        },
        "selectedPaths": {
          "description": "Selected response paths to extract from API response. Required: at least 1 value if the method is GET. Should be empty if the method is POST.",
          "type": "array",
          "items": {
            "type": "string"
          }
        }
      },
      "required": [
        "triggerPrompt",
        "triggerMessage",
        "apiDetails"
      ]
    },
    "DataExtractionActionParameters": {
      "type": "object",
      "properties": {
        "contactFieldId": {
          "type": "string",
          "description": "ID of the contact field to be updated with the extracted data"
        },
        "description": {
          "type": "string",
          "description": "Description of what data to extract"
        },
        "overwriteExistingValue": {
          "type": "boolean",
          "description": "Whether to overwrite existing field value if already set, default is false",
          "default": false
        }
      },
      "required": [
        "contactFieldId",
        "description",
        "examples"
      ]
    },
    "InCallDataExtractionActionParameters": {
      "type": "object",
      "properties": {
        "contactFieldId": {
          "type": "string",
          "description": "ID of the contact field to be updated with the extracted data"
        },
        "description": {
          "type": "string",
          "description": "Description of what data to extract"
        },
        "overwriteExistingValue": {
          "type": "boolean",
          "description": "Whether to overwrite existing field value if already set, default is false",
          "default": false
        }
      },
      "required": [
        "contactFieldId",
        "description",
        "examples"
      ]
    },
    "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"
      ]
    },
    "KnowledgeBaseParameters": {
      "type": "object",
      "properties": {
        "triggerPrompt": {
          "type": "string",
          "description": "When to query the knowledge base"
        },
        "knowledgeBaseId": {
          "type": "string",
          "description": "Knowledge base ID to query"
        }
      },
      "required": [
        "triggerPrompt",
        "knowledgeBaseId"
      ]
    },
    "SMSParameters": {
      "type": "object",
      "properties": {
        "triggerPrompt": {
          "type": "string",
          "description": "When to send the SMS"
        },
        "triggerMessage": {
          "type": "string",
          "description": "Message to tell the caller"
        },
        "messageBody": {
          "type": "string",
          "description": "SMS message content to send"
        }
      },
      "required": [
        "triggerPrompt",
        "triggerMessage",
        "messageBody"
      ]
    },
    "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"
        }
      }
    },
    "WorkflowTriggerParameters": {
      "type": "object",
      "properties": {
        "triggerPrompt": {
          "type": "string",
          "description": "When to trigger this workflow"
        },
        "triggerMessage": {
          "type": "string",
          "description": "Message to tell the caller"
        },
        "workflowId": {
          "type": "string",
          "description": "Workflow ID to trigger"
        }
      },
      "required": [
        "triggerPrompt",
        "triggerMessage",
        "workflowId"
      ]
    }
  }
}