VoiceLink Management
Update a VoiceLink client
Updates a client in VoiceLink. Fields omitted from the request are omitted from the forwarded VoiceLink update body.
POST
/
voicelink
/
clients
/
{client_id}
Update a VoiceLink client
curl --request POST \
--url https://api.vocobase.com/api/v2/voicelink/clients/{client_id} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"connection_id": "9b7f1c44-c87f-4f0c-9124-3c802a9c1a20",
"first_name": "Acme",
"last_name": "Support",
"email": "support@example.com",
"channel_count": 10,
"is_active": 1
}
'import requests
url = "https://api.vocobase.com/api/v2/voicelink/clients/{client_id}"
payload = {
"connection_id": "9b7f1c44-c87f-4f0c-9124-3c802a9c1a20",
"first_name": "Acme",
"last_name": "Support",
"email": "support@example.com",
"channel_count": 10,
"is_active": 1
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
connection_id: '9b7f1c44-c87f-4f0c-9124-3c802a9c1a20',
first_name: 'Acme',
last_name: 'Support',
email: 'support@example.com',
channel_count: 10,
is_active: 1
})
};
fetch('https://api.vocobase.com/api/v2/voicelink/clients/{client_id}', 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.vocobase.com/api/v2/voicelink/clients/{client_id}",
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([
'connection_id' => '9b7f1c44-c87f-4f0c-9124-3c802a9c1a20',
'first_name' => 'Acme',
'last_name' => 'Support',
'email' => 'support@example.com',
'channel_count' => 10,
'is_active' => 1
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$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.vocobase.com/api/v2/voicelink/clients/{client_id}"
payload := strings.NewReader("{\n \"connection_id\": \"9b7f1c44-c87f-4f0c-9124-3c802a9c1a20\",\n \"first_name\": \"Acme\",\n \"last_name\": \"Support\",\n \"email\": \"support@example.com\",\n \"channel_count\": 10,\n \"is_active\": 1\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
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.vocobase.com/api/v2/voicelink/clients/{client_id}")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"connection_id\": \"9b7f1c44-c87f-4f0c-9124-3c802a9c1a20\",\n \"first_name\": \"Acme\",\n \"last_name\": \"Support\",\n \"email\": \"support@example.com\",\n \"channel_count\": 10,\n \"is_active\": 1\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.vocobase.com/api/v2/voicelink/clients/{client_id}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"connection_id\": \"9b7f1c44-c87f-4f0c-9124-3c802a9c1a20\",\n \"first_name\": \"Acme\",\n \"last_name\": \"Support\",\n \"email\": \"support@example.com\",\n \"channel_count\": 10,\n \"is_active\": 1\n}"
response = http.request(request)
puts response.read_body{
"success": true,
"data": {}
}{
"success": false,
"error": {
"code": "VALIDATION_ERROR",
"message": "agent_name is required and must be max 50 characters"
}
}{
"success": false,
"error": {
"code": "UNAUTHORIZED",
"message": "Invalid or missing API key"
}
}{
"success": false,
"error": {
"code": "NOT_FOUND",
"message": "Resource not found"
}
}{
"success": false,
"error": {
"code": "INTERNAL_ERROR",
"message": "An unexpected error occurred"
}
}Authorizations
API key in format: rg_live_xxxx. Pass as a Bearer token in the Authorization header.
Path Parameters
VoiceLink client ID.
Body
application/json
Optional unless multiple active VoiceLink connections exist.
Required range:
x >= 1Available options:
0, 1 Previous
List purchased VoiceLink DIDsLists DIDs already purchased or assigned in VoiceLink. This endpoint is read-only and does not purchase, renew, KYC, or allocate wallet credit.
Next
⌘I
Update a VoiceLink client
curl --request POST \
--url https://api.vocobase.com/api/v2/voicelink/clients/{client_id} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"connection_id": "9b7f1c44-c87f-4f0c-9124-3c802a9c1a20",
"first_name": "Acme",
"last_name": "Support",
"email": "support@example.com",
"channel_count": 10,
"is_active": 1
}
'import requests
url = "https://api.vocobase.com/api/v2/voicelink/clients/{client_id}"
payload = {
"connection_id": "9b7f1c44-c87f-4f0c-9124-3c802a9c1a20",
"first_name": "Acme",
"last_name": "Support",
"email": "support@example.com",
"channel_count": 10,
"is_active": 1
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
connection_id: '9b7f1c44-c87f-4f0c-9124-3c802a9c1a20',
first_name: 'Acme',
last_name: 'Support',
email: 'support@example.com',
channel_count: 10,
is_active: 1
})
};
fetch('https://api.vocobase.com/api/v2/voicelink/clients/{client_id}', 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.vocobase.com/api/v2/voicelink/clients/{client_id}",
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([
'connection_id' => '9b7f1c44-c87f-4f0c-9124-3c802a9c1a20',
'first_name' => 'Acme',
'last_name' => 'Support',
'email' => 'support@example.com',
'channel_count' => 10,
'is_active' => 1
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$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.vocobase.com/api/v2/voicelink/clients/{client_id}"
payload := strings.NewReader("{\n \"connection_id\": \"9b7f1c44-c87f-4f0c-9124-3c802a9c1a20\",\n \"first_name\": \"Acme\",\n \"last_name\": \"Support\",\n \"email\": \"support@example.com\",\n \"channel_count\": 10,\n \"is_active\": 1\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
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.vocobase.com/api/v2/voicelink/clients/{client_id}")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"connection_id\": \"9b7f1c44-c87f-4f0c-9124-3c802a9c1a20\",\n \"first_name\": \"Acme\",\n \"last_name\": \"Support\",\n \"email\": \"support@example.com\",\n \"channel_count\": 10,\n \"is_active\": 1\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.vocobase.com/api/v2/voicelink/clients/{client_id}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"connection_id\": \"9b7f1c44-c87f-4f0c-9124-3c802a9c1a20\",\n \"first_name\": \"Acme\",\n \"last_name\": \"Support\",\n \"email\": \"support@example.com\",\n \"channel_count\": 10,\n \"is_active\": 1\n}"
response = http.request(request)
puts response.read_body{
"success": true,
"data": {}
}{
"success": false,
"error": {
"code": "VALIDATION_ERROR",
"message": "agent_name is required and must be max 50 characters"
}
}{
"success": false,
"error": {
"code": "UNAUTHORIZED",
"message": "Invalid or missing API key"
}
}{
"success": false,
"error": {
"code": "NOT_FOUND",
"message": "Resource not found"
}
}{
"success": false,
"error": {
"code": "INTERNAL_ERROR",
"message": "An unexpected error occurred"
}
}