Getting started
APIs
Business SMS
Automation
Use cases
Create Trello Card for Voicemails Received
Send Call Data to Google Sheets
Slack Notifications from Call Events
Trigger SMS Messages from Your CRM
Devices are the endpoints assigned to an account that serve that account's needs.
Devices like fax machines, SIP phones, softphone clients, and cell phones (via call forwarding), among others, can be represented by devices.
List all devices on the account.
Method: GET
<https://public-api.virtualpbx.com:8443/v2/accounts/{{account_id}>}/devices
curl --location -g --request GET '<https://public-api.virtualpbx.com:8443/v2/accounts/{ACCOUNT_ID}/devices>' \\
--header 'X-Auth-Token: {AUTH_TOKEN}' \\
--header 'Content-Type: application/json'
Returns a device configuration.
Method: GET
<https://public-api.virtualpbx.com:8443/v2/accounts/{ACCOUNT_ID}/devices/{DEVICE_ID}>
{
"auth_token": "{AUTH_TOKEN}",
"data": {
"call_restriction": {},
"caller_id": {},
"contact_list": {},
"dial_plan": {},
"enabled": true,
"exclude_from_queues": false,
"id": "{DEVICE_ID}",
"media": {
"audio": {
"codecs": [
"PCMU"
]
},
"encryption": {
"enforce_security": false,
"methods": []
},
"video": {
"codecs": []
}
},
"music_on_hold": {},
"mwi_unsolicitated_updates": true,
"name": "New Device",
"register_overwrite_notify": false,
"ringtones": {},
"sip": {
"invite_format": "username",
"method": "password",
"registration_expiration": 300
},
"suppress_unregister_notifications": false
},
"request_id": "{REQUEST_ID}",
"revision": "{REVISION}",
"status": "success"
}
curl --location -g --request GET '<https://public-api.virtualpbx.com:8443/v2/accounts/{ACCOUNT_ID}/devices/{DEVICE_ID}>' \\
--header 'X-Auth-Token: {AUTH_TOKEN}' \\
--header 'Content-Type: application/json'
Changes a device configuration. Including "sync": true in the "data" will attempt to reboot the phone.
Method: POST
<https://public-api.virtualpbx.com:8443/v2/accounts/{ACCOUNT_ID}/devices/{DEVICE_ID}>
curl --location -g --request POST '<https://public-api.virtualpbx.com:8443/v2/accounts/{ACCOUNT_ID}/devices/{DEVICE_ID}>' \\
--header 'X-Auth-Token: {AUTH_TOKEN}' \\
--header 'Content-Type: application/json'
This will fetch the current registrations of any devices. If no devices are registered, an empty list will be returned.
Method: DELETE
<https://public-api.virtualpbx.com:8443/v2/accounts/{ACCOUNT_ID}/devices/status>
{
"auth_token": "{AUTH_TOKEN}",
"data": [
{
"device_id": "{DEVICE_ID}",
"registered": true
}
],
"request_id": "{REQUEST_ID}",
"revision": "{REVISION}",
"status": "success"
}
Some devices support receiving SIP NOTIFY packets with event = check-sync. This is typically used to reboot the phone if the configuration has changed. VirtualPBX will generate the NOTIFY packet if the device is registered.
Method: POST
<https://public-api.virtualpbx.com:8443/v2/accounts/{ACCOUNT_ID}/devices/{DEVICE_ID}/sync>
curl --location -g --request POST '<https://public-api.virtualpbx.com:8443/v2/accounts/{ACCOUNT_ID}/devices/{DEVICE_ID}/sync>' \\
--header 'X-Auth-Token: {AUTH_TOKEN}' \\
--header 'Content-Type: application/json'
← Previous
Add link here
Next →
Add link here