Skip to main content
POST
/
voicelink
/
call-routing
Create VoiceLink call routing
curl --request POST \
  --url https://api.vocobase.com/api/v2/voicelink/call-routing \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "connection_id": "9b7f1c44-c87f-4f0c-9124-3c802a9c1a20",
  "did_id": 812,
  "for_inbound_call": 1,
  "for_outbound_call": 3,
  "outbound_websocket_bot_id": 93,
  "status": 1
}
'
{
  "success": true,
  "data": {}
}

Authorizations

Authorization
string
header
required

API key in format: rg_live_xxxx. Pass as a Bearer token in the Authorization header.

Body

application/json

Creates a call-routing record for a DID. Provide either did_id or did_number.

did_id
integer
required

VoiceLink DID ID. Provide either did_id or did_number.

Required range: x >= 1
for_inbound_call
integer
required

VoiceLink inbound mode: 1 mobile, 2 SIP, 3 WebSocket bot.

Required range: x >= 0
for_outbound_call
integer
required

VoiceLink outbound mode: 2 SIP, 3 WebSocket bot, 4 only-answer.

Required range: x >= 0
connection_id
string<uuid>

Optional unless multiple active VoiceLink connections exist. connectionId is accepted for backwards compatibility.

did_number
string

DID number. Used when did_id is not available.

inbound_websocket_bot_id
integer

VoiceLink bot ID when for_inbound_call is 3.

Required range: x >= 1
inbound_sip_trunk_id
integer

VoiceLink SIP trunk ID when for_inbound_call is 2.

Required range: x >= 1
outbound_websocket_bot_id
integer

VoiceLink bot ID when for_outbound_call is 3.

Required range: x >= 1
outbound_sip_trunk_id
integer

VoiceLink SIP trunk ID when for_outbound_call is 2.

Required range: x >= 1
status
enum<integer>
default:1

Routing status: 1 active (default), 0 inactive.

Available options:
0,
1

Response

VoiceLink call routing created.

A VoiceLink upstream response wrapped in the V2 success envelope. The data shape is forwarded from VoiceLink and may vary by endpoint.

success
boolean
required
data
required

VoiceLink upstream response body.