Skip to main content
POST
/
voicelink
/
call-ready
Make a VoiceLink DID call-ready
curl --request POST \
  --url https://api.vocobase.com/api/v2/voicelink/call-ready \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "connection_id": "9b7f1c44-c87f-4f0c-9124-3c802a9c1a20",
  "did_id": 812,
  "client_id": 415,
  "agent_id": "f4df9f8c-df95-46d8-bb0e-6f9f83fd4f55",
  "bot_name": "Vocobase +918011223344"
}
'
{
  "success": true,
  "data": {
    "phone_number": "+918011223344",
    "key": "918011223344",
    "ready": true,
    "steps": [
      {
        "step": "resolve_did",
        "status": "done",
        "detail": "Resolved DID +918011223344",
        "data": {
          "did_id": 812,
          "client_id": 415
        }
      },
      {
        "step": "ensure_routing",
        "status": "done",
        "detail": "Updated routing for DID +918011223344 to outbound bot_id=93",
        "data": {
          "routing_id": 120
        }
      }
    ],
    "readiness_before": {
      "key": "918011223344",
      "phone_number": "+918011223344",
      "state": "NO_BOT",
      "issues": [
        "NO_BOT",
        "ROUTING_MISSING"
      ],
      "remote_did": {
        "id": 812,
        "did_id": 812,
        "did_number": "918011223344",
        "phone_number": "+918011223344",
        "client_id": 415,
        "status": "active",
        "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"
      ],
      "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"
        }
      ]
    },
    "readiness": {
      "key": "918011223344",
      "phone_number": "+918011223344",
      "state": "READY",
      "issues": [],
      "remote_did": {
        "id": 812,
        "did_id": 812,
        "did_number": "918011223344",
        "phone_number": "+918011223344",
        "client_id": 415,
        "status": "active",
        "is_expired": false,
        "raw": {}
      },
      "local_phone_number": {
        "id": "0be141f3-f72c-4630-b3bc-a0a5f59bf970",
        "phone_number": "+918011223344",
        "friendly_name": "918011223344",
        "status": "ACTIVE",
        "is_default": false,
        "inbound_enabled": true,
        "agent": {
          "id": "f4df9f8c-df95-46d8-bb0e-6f9f83fd4f55",
          "name": "Sales Agent"
        },
        "created_at": "2026-06-09T10:30:00.000Z",
        "updated_at": "2026-06-09T10:35:00.000Z"
      },
      "routing": {
        "id": 120,
        "phone_number": "+918011223344",
        "for_inbound_call": 1,
        "for_outbound_call": 3,
        "outbound_websocket_bot_id": 93,
        "raw": {}
      },
      "bot": {
        "id": 93,
        "name": "Vocobase +918011223344",
        "status": 1,
        "raw": {}
      },
      "actions": [],
      "action_items": []
    }
  }
}

Authorizations

Authorization
string
header
required

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

Body

application/json

Request for the safe outbound call-ready workflow. Provide either did_id or did_number. connection_id is optional unless multiple active VoiceLink connections exist.

did_id
integer
required

VoiceLink DID ID from /voicelink/dids/purchased.

connection_id
string<uuid>

Optional unless multiple active VoiceLink connections exist.

did_number
string

Purchased DID number. Used when did_id is not available.

client_id
integer

Optional VoiceLink client ID. Maps the DID to this client only when the DID is currently unmapped — a DID already mapped to a different client is never re-mapped, and clients are never auto-created. Composer-initiated mapping uses call_recording=0.

Required range: x >= 1
agent_id
string<uuid>

Optional Vocobase agent ID to assign to the imported local PhoneNumber row. Ownership is enforced by Vocobase.

bot_name
string

Optional name to use if a new VoiceLink WebSocket bot must be created.

websocket_url
string<uri>

Optional WebSocket URL override for bot creation. Omit to use the backend default.

Response

Call-ready workflow result.

success
boolean
required
data
object
required