VoiceLink Management
Sync VoiceLink state and readiness
Fetches remote VoiceLink clients, DIDs, available DIDs, bots, and routing, then compares them with Vocobase local PhoneNumber rows. By default, remote DIDs are imported into Vocobase local inventory; pass import_dids: false for a read-only readiness check. Sync does not silently delete local data.
POST
/
voicelink
/
sync
Sync VoiceLink state and readiness
curl --request POST \
--url https://api.vocobase.com/api/v2/voicelink/sync \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"connection_id": "9b7f1c44-c87f-4f0c-9124-3c802a9c1a20",
"import_dids": true
}
'import requests
url = "https://api.vocobase.com/api/v2/voicelink/sync"
payload = {
"connection_id": "9b7f1c44-c87f-4f0c-9124-3c802a9c1a20",
"import_dids": True
}
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', import_dids: true})
};
fetch('https://api.vocobase.com/api/v2/voicelink/sync', 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/sync",
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',
'import_dids' => true
]),
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/sync"
payload := strings.NewReader("{\n \"connection_id\": \"9b7f1c44-c87f-4f0c-9124-3c802a9c1a20\",\n \"import_dids\": true\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/sync")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"connection_id\": \"9b7f1c44-c87f-4f0c-9124-3c802a9c1a20\",\n \"import_dids\": true\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.vocobase.com/api/v2/voicelink/sync")
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 \"import_dids\": true\n}"
response = http.request(request)
puts response.read_body{
"success": true,
"data": {
"clients": [],
"dids": [
{
"id": 812,
"did_id": 812,
"did_number": "918011223344",
"phone_number": "+918011223344",
"client_id": 415,
"status": "active",
"is_expired": false,
"raw": {}
}
],
"available_dids": [],
"bots": [],
"routing": [],
"local_phone_numbers": [],
"readiness": [
{
"key": "918011223344",
"phone_number": "+918011223344",
"state": "NO_BOT",
"issues": [
"NO_BOT",
"ROUTING_MISSING",
"NO_VOCOBASE_AGENT"
],
"remote_did": {
"did_id": 812,
"did_number": "918011223344",
"phone_number": "+918011223344",
"client_id": 415,
"is_expired": false,
"raw": {}
},
"local_phone_number": null,
"routing": null,
"bot": null,
"actions": [
"Create an active VoiceLink WebSocket bot for the mapped client",
"Create VoiceLink call routing for this DID",
"Assign a Vocobase agent to the local PhoneNumber row"
],
"action_items": [
{
"code": "NO_BOT",
"label": "Create an active VoiceLink WebSocket bot for the mapped client"
},
{
"code": "ROUTING_MISSING",
"label": "Create VoiceLink call routing for this DID"
},
{
"code": "NO_VOCOBASE_AGENT",
"label": "Assign a Vocobase agent to the local PhoneNumber row"
}
]
}
],
"drift": [
{
"key": "918011223344",
"phone_number": "+918011223344",
"state": "NO_BOT",
"action": "Create an active VoiceLink WebSocket bot for the mapped client",
"did_id": 812,
"client_id": 415
}
],
"warnings": []
}
}{
"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.
Body
application/json
Previous
Make a VoiceLink DID call-readyRuns the safe outbound call-ready workflow for a purchased VoiceLink DID: import the DID into Vocobase if missing, optionally map an unmapped DID to an explicitly supplied `client_id`, ensure an active VoiceLink WebSocket bot for the mapped client, and ensure outbound routing points to that bot. Existing inbound routing is preserved on routing updates. DID mapping happens only with an explicit `client_id` and only when the DID is currently unmapped — a DID mapped to a different client is never re-mapped, and clients are never auto-created. This endpoint does not purchase, renew, run KYC, or allocate wallet credit. Pass `connection_id` when the partner has more than one active VoiceLink connection.
Next
⌘I
Sync VoiceLink state and readiness
curl --request POST \
--url https://api.vocobase.com/api/v2/voicelink/sync \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"connection_id": "9b7f1c44-c87f-4f0c-9124-3c802a9c1a20",
"import_dids": true
}
'import requests
url = "https://api.vocobase.com/api/v2/voicelink/sync"
payload = {
"connection_id": "9b7f1c44-c87f-4f0c-9124-3c802a9c1a20",
"import_dids": True
}
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', import_dids: true})
};
fetch('https://api.vocobase.com/api/v2/voicelink/sync', 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/sync",
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',
'import_dids' => true
]),
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/sync"
payload := strings.NewReader("{\n \"connection_id\": \"9b7f1c44-c87f-4f0c-9124-3c802a9c1a20\",\n \"import_dids\": true\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/sync")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"connection_id\": \"9b7f1c44-c87f-4f0c-9124-3c802a9c1a20\",\n \"import_dids\": true\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.vocobase.com/api/v2/voicelink/sync")
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 \"import_dids\": true\n}"
response = http.request(request)
puts response.read_body{
"success": true,
"data": {
"clients": [],
"dids": [
{
"id": 812,
"did_id": 812,
"did_number": "918011223344",
"phone_number": "+918011223344",
"client_id": 415,
"status": "active",
"is_expired": false,
"raw": {}
}
],
"available_dids": [],
"bots": [],
"routing": [],
"local_phone_numbers": [],
"readiness": [
{
"key": "918011223344",
"phone_number": "+918011223344",
"state": "NO_BOT",
"issues": [
"NO_BOT",
"ROUTING_MISSING",
"NO_VOCOBASE_AGENT"
],
"remote_did": {
"did_id": 812,
"did_number": "918011223344",
"phone_number": "+918011223344",
"client_id": 415,
"is_expired": false,
"raw": {}
},
"local_phone_number": null,
"routing": null,
"bot": null,
"actions": [
"Create an active VoiceLink WebSocket bot for the mapped client",
"Create VoiceLink call routing for this DID",
"Assign a Vocobase agent to the local PhoneNumber row"
],
"action_items": [
{
"code": "NO_BOT",
"label": "Create an active VoiceLink WebSocket bot for the mapped client"
},
{
"code": "ROUTING_MISSING",
"label": "Create VoiceLink call routing for this DID"
},
{
"code": "NO_VOCOBASE_AGENT",
"label": "Assign a Vocobase agent to the local PhoneNumber row"
}
]
}
],
"drift": [
{
"key": "918011223344",
"phone_number": "+918011223344",
"state": "NO_BOT",
"action": "Create an active VoiceLink WebSocket bot for the mapped client",
"did_id": 812,
"client_id": 415
}
],
"warnings": []
}
}{
"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"
}
}