Skip to main content

Documentation Index

Fetch the complete documentation index at: https://developers.leadwaycrm.com/llms.txt

Use this file to discover all available pages before exploring further.

Updates an existing AI agent’s configuration. All fields in the agent configuration can be updated including name, status, actions, and behavior settings.
PUT https://services.leadconnectorhq.com/conversation-ai/agents/{agentId}

Autorizacion

Authorization
string
required
Bearer token generado desde el portal Leadway. Ver Autenticacion.
Version
string
default:"2021-07-28"
required
Version de la API.

Path parameters

agentId
string
required
Conversations AI agent id

Body

name
string
default:"John Doe"
Name of the agent.
businessName
string
default:"Tech Corp"
Name of the business the agent represents.
mode
string
Mode of operation for the agent, required if primary is enabled. Posibles valores: ‘off’, ‘suggestive’, ‘auto-pilot’
channels
string[]
Channels the agent can use.
isPrimary
boolean
default:"True"
Indicates if this agent is a primary agent.
waitTime
number
default:"30"
Wait time before agent responds (max 5 for minutes, 300 for seconds).
waitTimeUnit
string
default:"seconds"
Unit for wait time - SECONDS or MINUTES Posibles valores: ‘minutes’, ‘seconds’
sleepEnabled
boolean
default:"False"
Indicates if sleep functionality is enabled.
sleepTime
number
default:"10"
Duration of sleep period (required if sleepEnabled is true). Set to null for indefinite sleep. (max 2880 for minutes, 172800 for seconds, 48 for hours)
sleepTimeUnit
string
Unit of sleep time - HOURS, MINUTES, or SECONDS (required if sleepEnabled is true). Set to null for indefinite sleep. Posibles valores: ‘hours’, ‘minutes’, ‘seconds’
personality
string
Personality traits of the agent.
goal
string
The goal of the agent.
instructions
string
default:"Provide excellent customer service."
Instructions for the agent.
autoPilotMaxMessages
number
required
Maximum number of messages in auto-pilot mode before requiring human intervention. (max: 100, min: 1)
knowledgeBaseIds
string[]
Array of knowledge base IDs associated with this agent.
respondToImages
boolean
default:"True"
Allow agent to respond to images
respondToAudio
boolean
default:"True"
Allow agent to respond to audio
sleepOnManualMessage
boolean
default:"False"
Enable sleep when a manual outbound message is sent.
sleepOnWorkflowMessage
boolean
default:"False"
Enable sleep when a workflow outbound message is sent.

Respuestas

id
string
default:"emp_123"
required
Unique identifier for the agent.
name
string
default:"John Doe"
required
Name of the agent.
businessName
string
default:"Tech Corp"
Name of the business the agent represents.
mode
string
default:"auto-pilot"
required
Current operating mode of the agent. Posibles valores: ‘off’, ‘suggestive’, ‘auto-pilot’
channels
string[]
required
Communication channels the agent operates on.
waitTime
number
default:"30"
required
Wait time before agent responds.
waitTimeUnit
string
default:"seconds"
required
Unit for wait time. Posibles valores: ‘minutes’, ‘seconds’
sleepEnabled
boolean
default:"False"
required
Indicates if sleep functionality is enabled.
sleepTime
number
default:"2"
Duration of sleep period.
sleepTimeUnit
string
default:"hours"
Unit of sleep time. Posibles valores: ‘hours’, ‘minutes’, ‘seconds’
actions
object[]
required
List of actions associated with this agent.
isPrimary
boolean
default:"False"
required
Indicates if this agent is a primary agent.
autoPilotMaxMessages
number
default:"25"
required
Maximum number of messages in auto-pilot mode before requiring human intervention.
goal
string
default:"Assist customers with inquiries"
The goal of the agent.
personality
string
default:"Friendly and helpful"
Personality traits of the agent.
instructions
string
default:"Provide excellent customer service"
Instructions for the agent.
knowledgeBaseIds
string[]
Array of knowledge base IDs associated with this agent.
sleepOnManualMessage
boolean
default:"False"
Whether the bot sleeps on manual outbound messages.
sleepOnWorkflowMessage
boolean
default:"False"
Whether the bot sleeps on workflow outbound messages.
{
  "id": "emp_123",
  "name": "John Doe",
  "businessName": "Tech Corp",
  "mode": "auto-pilot",
  "channels": [
    "SMS",
    "Live_Chat"
  ],
  "waitTime": 30,
  "waitTimeUnit": "seconds",
  "sleepEnabled": false,
  "sleepTime": 2,
  "sleepTimeUnit": "hours",
  "actions": [
    {
      "id": "actionId123",
      "type": "triggerWorkflow"
    }
  ],
  "isPrimary": false,
  "autoPilotMaxMessages": 25,
  "goal": "Assist customers with inquiries",
  "personality": "Friendly and helpful",
  "instructions": "Provide excellent customer service",
  "knowledgeBaseIds": [
    "kb_123",
    "kb_456"
  ],
  "sleepOnManualMessage": false,
  "sleepOnWorkflowMessage": false
}
{}
{}
{}

Ejemplo

curl -X PUT 'https://services.leadconnectorhq.com/conversation-ai/agents/YOUR_agentId' \
  -H 'Authorization: Bearer YOUR_TOKEN' \
  -H 'Version: 2021-07-28' \
  -H 'Content-Type: application/json' \
  -d '{
  "name": "John Doe",
  "businessName": "Tech Corp",
  "mode": "off",
  "channels": [
    "IG"
  ],
  "isPrimary": true,
  "waitTime": 30,
  "waitTimeUnit": "seconds",
  "sleepEnabled": false,
  "sleepTime": 10,
  "sleepTimeUnit": "hours",
  "personality": "You re an AI assistant and you are friendly and helpful",
  "goal": "You are an AI assistant and you are helping customers with inquiries.",
  "instructions": "Provide excellent customer service.",
  "autoPilotMaxMessages": 75,
  "knowledgeBaseIds": [
    "string"
  ],
  "respondToImages": true,
  "respondToAudio": true,
  "sleepOnManualMessage": false,
  "sleepOnWorkflowMessage": false
}'