Skip to main content
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
}
'
{
  "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": []
  }
}

Authorizations

Authorization
string
header
required

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

Body

application/json
connection_id
string<uuid>

Optional unless multiple active VoiceLink connections exist.

import_dids
boolean
default:true

When true or omitted, remote purchased DIDs are upserted into Vocobase local PhoneNumber inventory. Set false for a read-only readiness check.

Response

VoiceLink sync and readiness result.

success
boolean
required
data
object
required