Getting started
Getting Started
API Basics
APIs
Authentication
Blocklists
Call Channels
Call Center
Call Recordings
Devices
Pivot
Quickcall
Webhooks
Business SMS
VirtualText
Automation
Zapier
Use cases
Create Trello Card for Voicemails Received
Send Call Data to Google Sheets
Slack Notifications from Call Events
SMS Airtable Template
Trigger SMS Messages from Your CRM
Zapier Webinar Recording
About Call Channels
The Channels API allows queries to find active channels for an account, a user, or a device. Given a call-id for a channel, a limited set of commands can be executed against that channel (such as hangup, transfer, or play media).
List Channels for User
API
/v2/accounts/{ACCOUNT_ID}/users/{USER_ID}/channels
https://public-api.virtualpbx.com:8443/v2/accounts/{{account_id}}/users/{{user_id}}/channels
CURL Example
curl --location -g --request GET 'https://public-api.virtualpbx.com:8443/v2/accounts/{ACCOUNT_ID}/users/{USER_ID}/channels' \
--header 'X-Auth-Token: {AUTH_TOKEN}' \
--header 'Content-Type: application/json'
List Channels for Device
API
/v2/accounts/{ACCOUNT_ID}/devices/{DEVICE_ID}/channels
https://public-api.virtualpbx.com:8443/v2/accounts/{ACCOUNT_ID}/devices/{DEVICE_ID}/channels
CURL Example
curl --location -g --request GET 'https://public-api.virtualpbx.com:8443/v2/accounts/{ACCOUNT_ID}/devices/{DEVICE_ID}/channels' \
--header 'X-Auth-Token: {AUTH_TOKEN}' \
--header 'Content-Type: application/json'
Fetch a channel's details
API
GET /v2/accounts/{ACCOUNT_ID}/channels/{UUID}
https://public-api.virtualpbx.com:8443/v2/accounts/{ACCOUNT_ID}/channels/{UUID}
CURL Example
curl --location -g --request GET 'https://public-api.virtualpbx.com:8443/v2/accounts/{ACCOUNT_ID}/channels/{UUID}' \
--header 'X-Auth-Token: {AUTH_TOKEN}' \
--header 'Content-Type: application/json'
Execute an application against a Channel
POST /v2/accounts/{ACCOUNT_ID}/channels/{UUID}
Shell
curl -v -X POST \
-H "Content-Type: application/json" \
-H "X-Auth-Token: {AUTH_TOKEN}" \
-d '{"data": {"action": "transfer", "target": "345", "takeback_dtmf": "*1", "moh": "media_id" }}' \
https://api.virtualpbx.net/v2/accounts/{ACCOUNT_ID}/channels/{UUID}
Available action
values are transfer
, hangup
, break
, callflow
, and intercept
.
Transfer
Shell
curl --location -g --request POST 'https://public-api.virtualpbx.com:8443/v2/accounts/{ACCOUNT_ID}/channels/{UUID}' \
--header 'X-Auth-Token: {AUTH_TOKEN}' \
--header 'Content-Type: application/json' \
--data-raw '{
"data": {
"enabled": true,
"reties": 4
}
}'
Key | Description | Type | Default |
leg | Defines which leg of the call to take action against | `string('self' | 'bleg')` |
target | Extension/DID to transfer the {UUID} | string() | |
transfer-type | What type of transfer to perform | `string('attended' | 'blind')` |
moh | Music on hold to play while transferring | string() |
← Previous
Add link here
Next →
Add link here