Update Agent Action
Update an existing action for a voice AI agent. Modifies the behavior and configuration of an agent action.
PUT
/
voice-ai
/
actions
/
{actionId}
Update Agent Action
curl --request PUT \
--url https://services.leadconnectorhq.com/voice-ai/actions/{actionId} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--header 'Version: <version>' \
--data '
{
"agentId": "507f1f77bcf86cd799439011",
"locationId": "507f1f77bcf86cd799439012",
"actionType": "CALL_TRANSFER",
"name": "Transfer to Manager",
"actionParameters": {
"triggerPrompt": "When the caller asks to speak to a manager",
"transferToType": "number",
"transferToValue": "+12345678901",
"triggerMessage": "Let me transfer you to a manager right away",
"hearWhisperMessage": true
}
}
'const options = {
method: 'PUT',
headers: {
Version: '<version>',
Authorization: 'Bearer <token>',
'Content-Type': 'application/json'
},
body: JSON.stringify({
agentId: '507f1f77bcf86cd799439011',
locationId: '507f1f77bcf86cd799439012',
actionType: 'CALL_TRANSFER',
name: 'Transfer to Manager',
actionParameters: {
triggerPrompt: 'When the caller asks to speak to a manager',
transferToType: 'number',
transferToValue: '+12345678901',
triggerMessage: 'Let me transfer you to a manager right away',
hearWhisperMessage: true
}
})
};
fetch('https://services.leadconnectorhq.com/voice-ai/actions/{actionId}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://services.leadconnectorhq.com/voice-ai/actions/{actionId}"
payload = {
"agentId": "507f1f77bcf86cd799439011",
"locationId": "507f1f77bcf86cd799439012",
"actionType": "CALL_TRANSFER",
"name": "Transfer to Manager",
"actionParameters": {
"triggerPrompt": "When the caller asks to speak to a manager",
"transferToType": "number",
"transferToValue": "+12345678901",
"triggerMessage": "Let me transfer you to a manager right away",
"hearWhisperMessage": True
}
}
headers = {
"Version": "<version>",
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.put(url, json=payload, headers=headers)
print(response.text){
"id": "507f1f77bcf86cd799439011",
"actionType": "CALL_TRANSFER",
"name": "Transfer to Manager",
"actionParameters": {
"triggerPrompt": "When the caller asks to speak to a manager",
"transferToType": "number",
"transferToValue": "+12345678901",
"triggerMessage": "Let me transfer you to a manager right away",
"hearWhisperMessage": true
}
}{
"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
Action updated successfully
Last modified on March 7, 2026
Was this page helpful?
Update Agent Action
curl --request PUT \
--url https://services.leadconnectorhq.com/voice-ai/actions/{actionId} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--header 'Version: <version>' \
--data '
{
"agentId": "507f1f77bcf86cd799439011",
"locationId": "507f1f77bcf86cd799439012",
"actionType": "CALL_TRANSFER",
"name": "Transfer to Manager",
"actionParameters": {
"triggerPrompt": "When the caller asks to speak to a manager",
"transferToType": "number",
"transferToValue": "+12345678901",
"triggerMessage": "Let me transfer you to a manager right away",
"hearWhisperMessage": true
}
}
'const options = {
method: 'PUT',
headers: {
Version: '<version>',
Authorization: 'Bearer <token>',
'Content-Type': 'application/json'
},
body: JSON.stringify({
agentId: '507f1f77bcf86cd799439011',
locationId: '507f1f77bcf86cd799439012',
actionType: 'CALL_TRANSFER',
name: 'Transfer to Manager',
actionParameters: {
triggerPrompt: 'When the caller asks to speak to a manager',
transferToType: 'number',
transferToValue: '+12345678901',
triggerMessage: 'Let me transfer you to a manager right away',
hearWhisperMessage: true
}
})
};
fetch('https://services.leadconnectorhq.com/voice-ai/actions/{actionId}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://services.leadconnectorhq.com/voice-ai/actions/{actionId}"
payload = {
"agentId": "507f1f77bcf86cd799439011",
"locationId": "507f1f77bcf86cd799439012",
"actionType": "CALL_TRANSFER",
"name": "Transfer to Manager",
"actionParameters": {
"triggerPrompt": "When the caller asks to speak to a manager",
"transferToType": "number",
"transferToValue": "+12345678901",
"triggerMessage": "Let me transfer you to a manager right away",
"hearWhisperMessage": True
}
}
headers = {
"Version": "<version>",
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.put(url, json=payload, headers=headers)
print(response.text){
"id": "507f1f77bcf86cd799439011",
"actionType": "CALL_TRANSFER",
"name": "Transfer to Manager",
"actionParameters": {
"triggerPrompt": "When the caller asks to speak to a manager",
"transferToType": "number",
"transferToValue": "+12345678901",
"triggerMessage": "Let me transfer you to a manager right away",
"hearWhisperMessage": true
}
}{
"statusCode": 400,
"message": "Bad Request"
}{
"statusCode": 401,
"message": "Invalid token: access token is invalid",
"error": "Unauthorized"
}{
"statusCode": 422,
"message": [
"Unprocessable Entity"
],
"error": "Unprocessable Entity"
}