Update a call
PUThttps://{API_ENDPOINT}/v1/Accounts/{AccountSid}/Calls/{CallSid}Content-Type: application/json
Authentication
Authorizationheader (bearer token, required) — Bearer authentication of the formBearer <token>, where token is your auth token.
Request
Path parameters
AccountSidstringCallSidstring
Body (application/json)
This endpoint expects an object.
call_hookWebhookchild_call_hookWebhookcall_statusenum- Allowed values:
completed,no-answer conf_mute_statusenum- Allowed values:
mute,unmute conf_hold_statusenum- Allowed values:
hold,unhold listen_statusenum- Allowed values:
pause,silence,resume mute_statusenum- Allowed values:
mute,unmute transcribe_statusenum- Allowed values:
pause,resume whisperobjectsip_requestsip_requestrecordrecordconferenceParticipantActionconference_participant_actiondtmfdtmfstream_statusenumPause or resume an active stream Function.- Allowed values:
pause,silence,resume tagmap from string to anySet customer data tags on the call. Freeform key-value object.dubdubAdd or remove additional audio tracks on the call.boostAudioSignalobjectBoost audio signal by specified decibels (e.g. 6 or "6dB").media_pathenumUpdate the media path during an active Dial Function.- Allowed values:
no-media,partial-media,full-media noise_isolation_statusenumEnable or disable noise isolation on the call.- Allowed values:
enable,disable noise_isolation_vendorstringNoise isolation vendor. Default is krisp.noise_isolation_leveldoubleNoise isolation level 0-100. Default is 100.noise_isolation_modelstringNoise isolation model identifier.agent_updateagent_updateUpdate an active agent Function mid-conversation.
Response
200
Accepted
202
Accepted
Errors
400 Bad Request Error
bad request
any
404 Not Found Error
call not found
any
422 Unprocessable Entity Error
unprocessable entity
msgstring
500 Internal Server Error
system error
msgstring
Types
Webhook
urlstringwebhook_sidstringmethodenum- Allowed values:
get,post usernamestringpasswordstring
sip_request
methodstringcontent_typestringcontentstringheadersobject
record
actionenum- Allowed values:
startCallRecording,stopCallRecording,pauseCallRecording,resumeCallRecording typeenum- Allowed values:
cloud,siprec recordingIDstringused with startCallRecording and SIPRECsiprecServerURLstringused with startCallRecording and SIPRECsilencebooleanwhen pausing recording the file will be padded with silence
conference_participant_action
actionenum- Allowed values:
tag,untag,coach,uncoach,mute,unmute,hold,unhold tagstring
dtmf
digitenumSingle digit to send- Allowed values:
1,2,3,4,5,6,7,8,9,0,*,# durationintegerDuration of the tone in ms
dub
Add or remove additional audio tracks on the call.
actionenum- Allowed values:
startDub,stopDub trackstringTrack name identifier.playstringAudio URL to play.sayobjectTTS configuration.loopbooleanWhether to loop playback.gaindoubleGain in decibels.
agent_update
Update an active agent Function mid-conversation.
typeenumThe type of agent update to perform.- Allowed values:
update_instructions,inject_context,update_tools,generate_reply instructionsstringNew system prompt (for update_instructions).messageslist of agent_update_messages_itemsMessages to append to conversation history (for inject_context).toolslist of agent_update_tools_itemsReplacement tool definitions (for update_tools).user_inputstringText to prompt the LLM with (for generate_reply).interruptbooleanWhether to interrupt current assistant speech (for generate_reply).
whisper
agent_update_messages_items
roleenum- Allowed values:
user,assistant contentstring
agent_update_tools_items
namestringdescriptionstringparametersobject
Examples
Example 1
Request
{}
Response
{}
cURL
curl -X PUT "https://{API_ENDPOINT}/v1/Accounts/AccountSid/Calls/CallSid" \
-H "Authorization: Bearer <token>"
Python
import requests
url = "https://{API_ENDPOINT}/v1/Accounts/AccountSid/Calls/CallSid"
headers = {
"Authorization": "Bearer <token>"
}
response = requests.put(url, headers=headers)
print(response.json())
JavaScript
const url = 'https://{API_ENDPOINT}/v1/Accounts/AccountSid/Calls/CallSid';
const options = {
method: 'PUT',
headers: {Authorization: 'Bearer <token>'}
};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
Request
{}
Response
{}
cURL
curl -X PUT "https://{API_ENDPOINT}/v1/Accounts/AccountSid/Calls/CallSid" \
-H "Authorization: Bearer <token>"
Python
import requests
url = "https://{API_ENDPOINT}/v1/Accounts/AccountSid/Calls/CallSid"
headers = {
"Authorization": "Bearer <token>"
}
response = requests.put(url, headers=headers)
print(response.json())
JavaScript
const url = 'https://{API_ENDPOINT}/v1/Accounts/AccountSid/Calls/CallSid';
const options = {
method: 'PUT',
headers: {Authorization: 'Bearer <token>'}
};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}