Transfer a call

POST https://api.plivo.com/v1/Account/{{auth_id}}/Call/{call_uuid}/

This API enables an in-progress or ongoing call to fetch and execute a XML from a different URL. If the call (the A leg) is in a Dial, you can also transfer the other party (the B leg) at the same time or only transfer the B leg to an URL. This is useful for many applications where you want to asynchronously change the behavior of a live call. For example, you can play music while the call is on hold, queue calls, transfer calls etc.

Below is the list of arguments that can be passed in this API request, more information can be found here

ArgumentsDescriptionRequired/Conditional/Optional
legsValid values are aleg, bleg or both. aleg will transfer calluuid. bleg will transfer the bridged leg of calluuid. both will transfer both aleg and bleg.Optional
aleg_urlThe URL to fetch XML from for the aleg. This need to be specified in case the legs parameter is either aleg or both.Optional
aleg_methodThe HTTP verb to invoke the aleg_url. This defaults to POST.Optional
bleg_urlThe HTTP verb to The URL to fetch XML from for the bleg. This need to be specified in case the legs parameter is either bleg or both the aleg_url. This defaults to POST.Optional
bleg_methodThe HTTP verb to invoke the bleg_url. This defaults to POST.Optional

Request Body

{"legs"=>"both", "aleg_url"=>"http://aleg.url", "aleg_method"=>"GET", "bleg_url"=>"http://bleg.url", "bleg_method"=>"GET"}