Wipple CPaaS
Menu
REST API / Update a call

Update a call

PUThttps://{API_ENDPOINT}/v1/Accounts/{AccountSid}/Calls/{CallSid}Content-Type: application/json

Authentication

  • Authorization header (bearer token, required) — Bearer authentication of the form Bearer <token>, where token is your auth token.

Request

Path parameters

  • AccountSidstringrequired
  • CallSidstringrequired

Body (application/json)

This endpoint expects an object.

  • call_hookWebhookoptional
  • child_call_hookWebhookoptional
  • call_statusenumoptional
  • Allowed values: completed, no-answer
  • conf_mute_statusenumoptional
  • Allowed values: mute, unmute
  • conf_hold_statusenumoptional
  • Allowed values: hold, unhold
  • listen_statusenumoptional
  • Allowed values: pause, silence, resume
  • mute_statusenumoptional
  • Allowed values: mute, unmute
  • transcribe_statusenumoptional
  • Allowed values: pause, resume
  • whisperobjectoptional
  • sip_requestsip_requestoptional
  • recordrecordoptional
  • conferenceParticipantActionconference_participant_actionoptional
  • dtmfdtmfoptional
  • stream_statusenumoptionalPause or resume an active stream Function.
  • Allowed values: pause, silence, resume
  • tagmap from string to anyoptionalSet customer data tags on the call. Freeform key-value object.
  • dubduboptionalAdd or remove additional audio tracks on the call.
  • boostAudioSignalobjectoptionalBoost audio signal by specified decibels (e.g. 6 or "6dB").
  • media_pathenumoptionalUpdate the media path during an active Dial Function.
  • Allowed values: no-media, partial-media, full-media
  • noise_isolation_statusenumoptionalEnable or disable noise isolation on the call.
  • Allowed values: enable, disable
  • noise_isolation_vendorstringoptionalNoise isolation vendor. Default is krisp.
  • noise_isolation_leveldoubleoptionalNoise isolation level 0-100. Default is 100.
  • noise_isolation_modelstringoptionalNoise isolation model identifier.
  • agent_updateagent_updateoptionalUpdate 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

  • msgstringrequired

500 Internal Server Error

system error

  • msgstringrequired

Types

Webhook

  • urlstringrequired
  • webhook_sidstringoptional
  • methodenumoptional
  • Allowed values: get, post
  • usernamestringoptional
  • passwordstringoptional

sip_request

  • methodstringoptional
  • content_typestringoptional
  • contentstringoptional
  • headersobjectoptional

record

  • actionenumoptional
  • Allowed values: startCallRecording, stopCallRecording, pauseCallRecording, resumeCallRecording
  • typeenumoptionaldefault: siprec
  • Allowed values: cloud, siprec
  • recordingIDstringoptionalused with startCallRecording and SIPREC
  • siprecServerURLstringoptionalused with startCallRecording and SIPREC
  • silencebooleanoptionaldefault: falsewhen pausing recording the file will be padded with silence

conference_participant_action

  • actionenumoptional
  • Allowed values: tag, untag, coach, uncoach, mute, unmute, hold, unhold
  • tagstringoptional

dtmf

  • digitenumrequiredSingle digit to send
  • Allowed values: 1, 2, 3, 4, 5, 6, 7, 8, 9, 0, *, #
  • durationintegeroptionaldefault: 250Duration of the tone in ms

dub

Add or remove additional audio tracks on the call.

  • actionenumrequired
  • Allowed values: startDub, stopDub
  • trackstringrequiredTrack name identifier.
  • playstringoptionalAudio URL to play.
  • sayobjectoptionalTTS configuration.
  • loopbooleanoptionalWhether to loop playback.
  • gaindoubleoptionalGain in decibels.

agent_update

Update an active agent Function mid-conversation.

  • typeenumrequiredThe type of agent update to perform.
  • Allowed values: update_instructions, inject_context, update_tools, generate_reply
  • instructionsstringoptionalNew system prompt (for update_instructions).
  • messageslist of agent_update_messages_itemsoptionalMessages to append to conversation history (for inject_context).
  • toolslist of agent_update_tools_itemsoptionalReplacement tool definitions (for update_tools).
  • user_inputstringoptionalText to prompt the LLM with (for generate_reply).
  • interruptbooleanoptionaldefault: falseWhether to interrupt current assistant speech (for generate_reply).

whisper

  • verbenumoptionalSee Say or Play for details of the properties
  • Allowed values: say, play

agent_update_messages_items

  • roleenumrequired
  • Allowed values: user, assistant
  • contentstringrequired

agent_update_tools_items

  • namestringoptional
  • descriptionstringoptional
  • parametersobjectoptional

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);
}