Transfer Active Call
curl --request POST \
--url https://api.bland.ai/v1/calls/active/transfer \
--header 'Content-Type: application/json' \
--header 'authorization: <authorization>' \
--data '
{
"call_id": "<string>",
"transfer_number": "<string>"
}
'import requests
url = "https://api.bland.ai/v1/calls/active/transfer"
payload = {
"call_id": "<string>",
"transfer_number": "<string>"
}
headers = {
"authorization": "<authorization>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {authorization: '<authorization>', 'Content-Type': 'application/json'},
body: JSON.stringify({call_id: '<string>', transfer_number: '<string>'})
};
fetch('https://api.bland.ai/v1/calls/active/transfer', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.bland.ai/v1/calls/active/transfer",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'call_id' => '<string>',
'transfer_number' => '<string>'
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"authorization: <authorization>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.bland.ai/v1/calls/active/transfer"
payload := strings.NewReader("{\n \"call_id\": \"<string>\",\n \"transfer_number\": \"<string>\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("authorization", "<authorization>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api.bland.ai/v1/calls/active/transfer")
.header("authorization", "<authorization>")
.header("Content-Type", "application/json")
.body("{\n \"call_id\": \"<string>\",\n \"transfer_number\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.bland.ai/v1/calls/active/transfer")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["authorization"] = '<authorization>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"call_id\": \"<string>\",\n \"transfer_number\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body{
"data": {
"message": "Call 29f01d00-5197-4b83-bc0f-161e14533a78 transferred to +12223334444 successfully"
},
"errors": null
}
{
"data": null,
"errors": [
{
"error": "VALIDATION_ERROR",
"message": "Call ID is required"
}
]
}
{
"data": null,
"errors": [
{
"error": "NOT_FOUND",
"message": "Call with id 29f01d00-5197-4b83-bc0f-161e14533a78 not found or has already been completed."
}
]
}
{
"data": null,
"errors": [
{
"error": "FORBIDDEN",
"message": "Transfer blocked by international restrictions for your account type."
}
]
}
Calls
Transfer Active Call
Transfer an in-progress call to a different phone number.
POST
/
v1
/
calls
/
active
/
transfer
Transfer Active Call
curl --request POST \
--url https://api.bland.ai/v1/calls/active/transfer \
--header 'Content-Type: application/json' \
--header 'authorization: <authorization>' \
--data '
{
"call_id": "<string>",
"transfer_number": "<string>"
}
'import requests
url = "https://api.bland.ai/v1/calls/active/transfer"
payload = {
"call_id": "<string>",
"transfer_number": "<string>"
}
headers = {
"authorization": "<authorization>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {authorization: '<authorization>', 'Content-Type': 'application/json'},
body: JSON.stringify({call_id: '<string>', transfer_number: '<string>'})
};
fetch('https://api.bland.ai/v1/calls/active/transfer', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.bland.ai/v1/calls/active/transfer",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'call_id' => '<string>',
'transfer_number' => '<string>'
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"authorization: <authorization>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.bland.ai/v1/calls/active/transfer"
payload := strings.NewReader("{\n \"call_id\": \"<string>\",\n \"transfer_number\": \"<string>\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("authorization", "<authorization>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api.bland.ai/v1/calls/active/transfer")
.header("authorization", "<authorization>")
.header("Content-Type", "application/json")
.body("{\n \"call_id\": \"<string>\",\n \"transfer_number\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.bland.ai/v1/calls/active/transfer")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["authorization"] = '<authorization>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"call_id\": \"<string>\",\n \"transfer_number\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body{
"data": {
"message": "Call 29f01d00-5197-4b83-bc0f-161e14533a78 transferred to +12223334444 successfully"
},
"errors": null
}
{
"data": null,
"errors": [
{
"error": "VALIDATION_ERROR",
"message": "Call ID is required"
}
]
}
{
"data": null,
"errors": [
{
"error": "NOT_FOUND",
"message": "Call with id 29f01d00-5197-4b83-bc0f-161e14533a78 not found or has already been completed."
}
]
}
{
"data": null,
"errors": [
{
"error": "FORBIDDEN",
"message": "Transfer blocked by international restrictions for your account type."
}
]
}
Overview
Transfers an active call to a different phone number while the call is in progress. The current call leg is replaced with a<Dial> to the new number, no announcement is played to either party.
Only calls in queue_status: "started" are eligible. Once transferred, the call record’s transferred_to field is updated so the new number appears in call details.
Headers
Your API key for authentication.
Body Parameters
ID of the active call to transfer. Must currently be in progress.
Destination phone number in E.164 format (for example
+12223334444). Parsed against the US region by default, so 10-digit US numbers also work.Response
Confirmation message including the
call_id and the destination number.null on success.{
"data": {
"message": "Call 29f01d00-5197-4b83-bc0f-161e14533a78 transferred to +12223334444 successfully"
},
"errors": null
}
{
"data": null,
"errors": [
{
"error": "VALIDATION_ERROR",
"message": "Call ID is required"
}
]
}
{
"data": null,
"errors": [
{
"error": "NOT_FOUND",
"message": "Call with id 29f01d00-5197-4b83-bc0f-161e14533a78 not found or has already been completed."
}
]
}
{
"data": null,
"errors": [
{
"error": "FORBIDDEN",
"message": "Transfer blocked by international restrictions for your account type."
}
]
}
Docs for agents: llms.txt
Was this page helpful?
⌘I