Update Agent
Updates an existing AI agent’s configuration. All fields in the agent configuration can be updated including name, status, actions, and behavior settings.
PUT
/
conversation-ai
/
agents
/
{agentId}
Update Agent
curl --request PUT \
--url https://services.leadconnectorhq.com/conversation-ai/agents/{agentId} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--header 'Version: <version>' \
--data '
{
"autoPilotMaxMessages": 10,
"name": "John Doe",
"businessName": "Tech Corp",
"channels": [],
"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.",
"knowledgeBaseIds": [
"<string>"
],
"respondToImages": true,
"respondToAudio": true
}
'const options = {
method: 'PUT',
headers: {
Version: '<version>',
Authorization: 'Bearer <token>',
'Content-Type': 'application/json'
},
body: JSON.stringify({
autoPilotMaxMessages: 10,
name: 'John Doe',
businessName: 'Tech Corp',
channels: [],
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.',
knowledgeBaseIds: ['<string>'],
respondToImages: true,
respondToAudio: true
})
};
fetch('https://services.leadconnectorhq.com/conversation-ai/agents/{agentId}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://services.leadconnectorhq.com/conversation-ai/agents/{agentId}"
payload = {
"autoPilotMaxMessages": 10,
"name": "John Doe",
"businessName": "Tech Corp",
"channels": [],
"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.",
"knowledgeBaseIds": ["<string>"],
"respondToImages": True,
"respondToAudio": True
}
headers = {
"Version": "<version>",
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.put(url, json=payload, headers=headers)
print(response.text){
"id": "emp_123",
"name": "John Doe",
"mode": "auto-pilot",
"channels": [
"SMS",
"Live_Chat"
],
"waitTime": 30,
"waitTimeUnit": "seconds",
"sleepEnabled": false,
"actions": [
{
"id": "actionId123",
"type": "triggerWorkflow"
}
],
"isPrimary": false,
"autoPilotMaxMessages": 25,
"businessName": "Tech Corp",
"sleepTime": 2,
"sleepTimeUnit": "hours",
"goal": "Assist customers with inquiries",
"personality": "Friendly and helpful",
"instructions": "Provide excellent customer service",
"knowledgeBaseIds": [
"kb_123",
"kb_456"
]
}{
"statusCode": 400,
"message": "Bad Request"
}{
"statusCode": 401,
"message": "Invalid token: access token is invalid",
"error": "Unauthorized"
}{
"statusCode": 422,
"message": [
"Unprocessable Entity"
],
"error": "Unprocessable Entity"
}Body
application/json
Response
Successful response
Last modified on March 7, 2026
Was this page helpful?
Update Agent
curl --request PUT \
--url https://services.leadconnectorhq.com/conversation-ai/agents/{agentId} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--header 'Version: <version>' \
--data '
{
"autoPilotMaxMessages": 10,
"name": "John Doe",
"businessName": "Tech Corp",
"channels": [],
"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.",
"knowledgeBaseIds": [
"<string>"
],
"respondToImages": true,
"respondToAudio": true
}
'const options = {
method: 'PUT',
headers: {
Version: '<version>',
Authorization: 'Bearer <token>',
'Content-Type': 'application/json'
},
body: JSON.stringify({
autoPilotMaxMessages: 10,
name: 'John Doe',
businessName: 'Tech Corp',
channels: [],
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.',
knowledgeBaseIds: ['<string>'],
respondToImages: true,
respondToAudio: true
})
};
fetch('https://services.leadconnectorhq.com/conversation-ai/agents/{agentId}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://services.leadconnectorhq.com/conversation-ai/agents/{agentId}"
payload = {
"autoPilotMaxMessages": 10,
"name": "John Doe",
"businessName": "Tech Corp",
"channels": [],
"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.",
"knowledgeBaseIds": ["<string>"],
"respondToImages": True,
"respondToAudio": True
}
headers = {
"Version": "<version>",
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.put(url, json=payload, headers=headers)
print(response.text){
"id": "emp_123",
"name": "John Doe",
"mode": "auto-pilot",
"channels": [
"SMS",
"Live_Chat"
],
"waitTime": 30,
"waitTimeUnit": "seconds",
"sleepEnabled": false,
"actions": [
{
"id": "actionId123",
"type": "triggerWorkflow"
}
],
"isPrimary": false,
"autoPilotMaxMessages": 25,
"businessName": "Tech Corp",
"sleepTime": 2,
"sleepTimeUnit": "hours",
"goal": "Assist customers with inquiries",
"personality": "Friendly and helpful",
"instructions": "Provide excellent customer service",
"knowledgeBaseIds": [
"kb_123",
"kb_456"
]
}{
"statusCode": 400,
"message": "Bad Request"
}{
"statusCode": 401,
"message": "Invalid token: access token is invalid",
"error": "Unauthorized"
}{
"statusCode": 422,
"message": [
"Unprocessable Entity"
],
"error": "Unprocessable Entity"
}