Authentication
curl --insecure --data 'username=YOUR_USER&password=YOUR_PASS' /apibv.bvoip.net/auth.php

Response:
{
"access_token":"xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
"expires_in":"12"
}

Errors:
  1. {"error":"invalid_grant","error_description":"Bad credentials"}
  2. {"error":"invalid_grant","error_description":"Params not found"}
  3. {"error":"invalid_grant","error_description":"Internal error"}
 
Get Groups
curl --insecure --data "authToken=XXXXXXXXXXXXXXX" /apibv.bvoip.net/info/get_groups.php

Response:
[
{
"group_id":"1",
"name":"group name",
"location":"group location",
"available_clouds":"1"
},{
"group_id":"2",
"name":"group name",
"location":"group location",
"available_clouds":"1"
}
]
Errors:
  1. {"error":"not_found","error_description":"Not found"}
  2. {"error":"invalid_grant","error_description":"Bad credentials"}
  3. {"error":"invalid_params","error_description":"Params not found"}
 
Get Clouds
curl --insecure --data "authToken=XXXXXXXXXXXXXXX&group_id=1" /apibv.bvoip.net/info/get_clouds.php

Response:
[
{
"cloud_id":"1",
"name":"cloud name"
}
]
Errors:
  1. {"error":"not_found","error_description":"Not found"}
  2. {"error":"invalid_grant","error_description":"Bad credentials"}
  3. {"error":"invalid_params","error_description":"Params not found"}
 
Get Available Plans
curl --insecure --data "authToken=XXXXXXXXXXXXXXX" /apibv.bvoip.net/info/get_plans.php

Response:
[
{
"plan_id":"193",
"name":"4 Simcalls",
"cores":"1",
"ram":"1",
"hard_disks":[
{"name":"os","size":"15"},
{"name":"recordings","size":"4"},
{"name":"voicemails","size":"4"}
]
},{
"plan_id":"194",
"name":"8 Simcalls",
"cores":"2",
"ram":"1",
"hard_disks":[
{"name":"os","size":"15"},
{"name":"recordings","size":"8"},
{"name":"voicemails","size":"8"}
]
}
]
Errors:
  1. {"error":"not_found","error_description":"Not found"}
  2. {"error":"invalid_grant","error_description":"Bad credentials"}
  3. {"error":"invalid_params","error_description":"Params not found"}
 
Get 3CX License Countries
curl --insecure --data "authToken=XXXXXXXXXXXXXXX" /apibv.bvoip.net/info/get_pbx_license_countries.php

Response:
[
{
"pbx_license_country_id":"1",
"name":"time zone name"
}
]
Errors:
  1. {"error":"not_found","error_description":"Not found"}
  2. {"error":"invalid_grant","error_description":"Bad credentials"}
  3. {"error":"invalid_params","error_description":"Params not found"}
 
Get 3CX Regions
curl --insecure --data "authToken=XXXXXXXXXXXXXXX" /apibv.bvoip.net/info/get_pbx_regions.php

Response:
[
{
"pbx_region_id":"1",
"name":"region name"
}
]
Errors:
  1. {"error":"not_found","error_description":"Not found"}
  2. {"error":"invalid_grant","error_description":"Bad credentials"}
  3. {"error":"invalid_params","error_description":"Params not found"}
 
Get 3CX Countries
curl --insecure --data "authToken=XXXXXXXXXXXXXXX&pbx_region_id=3" /apibv.bvoip.net/info/get_pbx_countries.php

Response:
[
{
"pbx_country_id":"1",
"name":"country name"
}
]
Errors:
  1. {"error":"not_found","error_description":"Not found"}
  2. {"error":"invalid_grant","error_description":"Bad credentials"}
  3. {"error":"invalid_params","error_description":"Params not found"}
 
Get 3CX Time Zones
curl --insecure --data "authToken=XXXXXXXXXXXXXXX" /apibv.bvoip.net/info/get_pbx_time_zones.php

Response:
[
{
"pbx_time_zone_id":"1",
"name":"time zone name"
}
]
Errors:
  1. {"error":"not_found","error_description":"Not found"}
  2. {"error":"invalid_grant","error_description":"Bad credentials"}
  3. {"error":"invalid_params","error_description":"Params not found"}
 
Get 3CX Prompt Sets
curl --insecure --data "authToken=XXXXXXXXXXXXXXX" /apibv.bvoip.net/info/get_pbx_prompt_sets.php

Response:
[
{
"pbx_prompt_sets_id":"1",
"name":"prompt set name"
}
]
Errors:
  1. {"error":"not_found","error_description":"Not found"}
  2. {"error":"invalid_grant","error_description":"Bad credentials"}
  3. {"error":"invalid_params","error_description":"Params not found"}
 
Provision instance
curl --insecure --data 'authToken=XXXXXXXXXXXXXXX&data={
"Group": "1",
"Cloud": "19",
"Plan": "195",
"PBX_FQDN": "fqdn",
"PBX_DOMAIN": "bvoip.net",
"PBX_EXT_LENGTH": "3",
"PBX_USER": "admin",
"PBX_PASS": "admin",
"PBX_REGION": "1",
"PBX_COUNTRY": "1",
"PBX_TIMEZONE": "17",
"PBX_PROMPT_SET": "1",
"SMTP_ADDRESS": "",
"SMTP_USER": "",
"SMTP_PASS": "",
"SMTP_REPLY_TO": "",
"SMTP_ENABLED": "",
"LICENSE_KEY": "",
"LICENSE_COMPANY_NAME": "",
"LICENSE_CONTACT_NAME": "",
"LICENSE_COUNTRY": "",
"LICENSE_EMAIL": "",
"LICENSE_PHONE": "",
"LICENSE_RESELLER": "",
"Extensions": [
{
"Number": "100",
"FirstName": "Operator",
"LastName": "Extension",
"EmailAddress": "noreply@somewhere.com",
"MobileNumber": "99999999",
"OutboundCallerId": "99999999",
"AllowLanOnly": "false",
"RecordCalls": "false"
},
{
"Number": "101",
"FirstName": "Operator",
"LastName": "Extension",
"EmailAddress": "noreply@somewhere.com",
"MobileNumber": "99999999",
"OutboundCallerId": "99999999",
"AllowLanOnly": "false",
"RecordCalls": "false"
}
],
"SIPTrunks": [
{
"Name": "",
"TemplateFilename": "",
"Host": "",
"Port": "",
"ProxyHost": "",
"ProxyPort": "",
"SimultaneousCalls": "",
"RequireRegistrationFor": "",
"AuthID": "",
"AuthPassword": "",
"Use3WayAuth": "",
"SeparateAuthPassword": "",
"ExternalNumber": "",
"OfficeHoursDestinationType": "",
"OfficeHoursDestination": "",
"OutOfOfficeHoursDestinationType": "",
"OutOfOfficeHoursDestination": "",
"DIDNumbers": "",
"OutboundCallerID": "",
"Direction": "",
"DeliverAudio": "",
"TimeBetweenReg": "",
"Codecs": [
{
"codec": ""
},{
"codec": ""
}
],
"InboundRules": [
{
"Name": "",
"DID": "",
"OfficeHoursDestinationType": "",
"OfficeHoursDestination": "",
"OutOfOfficeHoursDestinationType": "",
"OutOfOfficeHoursDestination": ""
},{
"Name": "",
"DID": "",
"OfficeHoursDestinationType": "",
"OfficeHoursDestination": "",
"OutOfOfficeHoursDestinationType": "",
"OutOfOfficeHoursDestination": ""
}
]
}
],
"OutboundRules": [
{
"Name": "",
"Prefix": "",
"Extensions": "",
"NumberLengthRanges": "",
"OutboundRoutes": [
{
"Gateway": "",
"StripDigits": "",
"Prepend": ""
},{
"Gateway": "",
"StripDigits": "",
"Prepend": ""
}
]
}
]
}' /apibv.bvoip.net/instance/provision_instance.php


Response:
{
"id": 15,
"instance": {
"group_id": "1",
"cloud_id":" 1",
"plan_id": "1"
},
"network": {
"fqdn": "fqdn.bvoip.net",
"ip_address": "xxx.xxx.xxx.xxx"
},
"created" : "yyyy-mm-dd H:i:s",
"success" : true
}
Errors:
  1. {"error":"invalid_params","error_description":"Params not found"}
  2. {"error":"invalid_grant","error_description":"Bad credentials"}
  3. {"error":"invalid_json","error_description":"Invalid JSON string"}
  4. {"error":"invalid_value","error_description":"Invalid Group ID"}
  5. {"error":"invalid_parameter","error_description":"GROUP not found"}
  6. {"error":"invalid_value","error_description":"Invalid Cloud ID"}
  7. {"error":"invalid_parameter","error_description":"Cloud not found"}
  8. {"error":"invalid_value","error_description":"Invalid Plan ID"}
  9. {"error":"invalid_parameter","error_description":"Plan not found"}
  10. {"error":"invalid_parameter","error_description":"FQDN not found"}
  11. {"error":"invalid_value","error_description":"PBX_EXT_LENGTH valid values are , , or 5"}
  12. {"error":"invalid_parameter","error_description":"PBX_EXT_LENGTH not found"}
  13. {"error":"invalid_value","error_description":"PBX_USER is required"}
  14. {"error":"invalid_parameter","error_description":"PBX_USER not found"}
  15. {"error":"invalid_value","error_description":"PBX_PASS is required"}
  16. {"error":"invalid_parameter","error_description":"PBX_PASS not found"}
  17. {"error":"invalid_value","error_description":"Invalid PBX Region ID."}
  18. {"error":"invalid_parameter","error_description":"PBX_REGION not found"}
  19. {"error":"invalid_value","error_description":"Invalid PBX Region ID."}
  20. {"error":"invalid_parameter","error_description":"PBX_COUNTRY not found"}
  21. {"error":"invalid_value","error_description":"Invalid PBX Time Zone ID."}
  22. {"error":"invalid_parameter","error_description":"PBX_TIMEZONE not found"}
  23. {"error":"invalid_value","error_description":"Invalid PBX Prompt Set ID."}
  24. {"error":"invalid_parameter","error_description":"PBX_PROMPT_SET not found"}
  25. {"error":"invalid_value","error_description":"SMTP_ADDRESS is required"}
  26. {"error":"invalid_parameter","error_description":"SMTP_ADDRESS not found"}
  27. {"error":"invalid_value","error_description":"SMTP_USER is required"}
  28. {"error":"invalid_parameter","error_description":"SMTP_USER not found"}
  29. {"error":"invalid_value","error_description":"SMTP_PASS is required"}
  30. {"error":"invalid_parameter","error_description":"SMTP_PASS not found"}
  31. {"error":"invalid_value","error_description":"SMTP_REPLY_TO is required"}
  32. {"error":"invalid_parameter","error_description":"SMTP_REPLY_TO not found"}
  33. {"error":"invalid_value","error_description":"SMTP_ENABLED valid values are -Disabled, -Enabled"}
  34. {"error":"invalid_parameter","error_description":"SMTP_ENABLED not found"}
  35. {"error":"invalid_value","error_description":"LICENSE_KEY is required"}
  36. {"error":"invalid_parameter","error_description":"LICENSE_KEY not found"}
  37. {"error":"invalid_value","error_description":"LICENSE_COMPANY_NAME is required"}
  38. {"error":"invalid_parameter","error_description":"LICENSE_COMPANY_NAME not found"}
  39. {"error":"invalid_value","error_description":"LICENSE_CONTACT_NAME is required"}
  40. {"error":"invalid_parameter","error_description":"LICENSE_CONTACT_NAME not found"}
  41. {"error":"invalid_value","error_description":"Invalid PBX License Country ID."}
  42. {"error":"invalid_parameter","error_description":"LICENSE_COUNTRY not found"}
  43. {"error":"invalid_value","error_description":"LICENSE_EMAIL is required"}
  44. {"error":"invalid_parameter","error_description":"LICENSE_EMAIL not found"}
  45. {"error":"invalid_value","error_description":"LICENSE_PHONE is required"}
  46. {"error":"invalid_parameter","error_description":"LICENSE_PHONE not found"}
  47. {"error":"invalid_value","error_description":"LICENSE_RESELLER is required"}
  48. {"error":"invalid_parameter","error_description":"LICENSE_RESELLER not found"}
  49. {"error":"invalid_value","error_description":"There must be at least one extension."}
  50. {"error":"invalid_parameter","error_description":"Extensions not found"}
  51. {"error":"invalid_value","error_description":"The FQDN must be between and 5 characters"}
  52. {"error":"invalid_value","error_description":"The FQDN already exists"}
  53. {"error":"internal","error_description":"There is no available IP addresses for the selected cloud"}
  54. {"error":"internal","error_description":"IP address cannot be updated "}
  55. {"error":"internal","error_description":"IP address cannot be updated "}
  56. {"error":"invalid_fqdn","error_description":"There is no available IP addresses for the selected cloud"}
  57. {"error":"invalid_fqdn","error_description":"Error creating FQDN F"}
  58. {"error":"invalid_fqdn","error_description":"The FQDN already exists"}
  59. {"error":"internal","error_description":"There is no available IP addresses for the selected cloud F"}
  60. {"error":"internal","error_description":"There is no available IP addresses for the selected cloud F"}
  61. {"error":"inernal_error","error_description":"Error 500"}