Create a Cloud PBX

Create a Cloud PBX.

Request URL

POST {base_url}/dm/open_api/v1/cloud_pbx/instances

Request parameters

Headers
Parameter Required Type Description
Authorization Yes String Pass the access token in the header.

Format: Bearer {access_token}.

Body
Parameter Required Type Description
name Yes String PBX name.
plan Yes String PBX Plan.

Valid value:

  • Enterprise Plan
  • Ultimate Plan
extensionCapacity Yes Long The number of extensions for the Cloud PBX.
concurrentCallCapacity Yes Long The number of concurrent calls for the Cloud PBX.
recordingStatus Yes String Whether to enable the call recording feature for the Cloud PBX.
Valid value:
  • Enabled
  • Disabled
recordingCapacity Yes Long The number of call recording minutes.
Note: If you set the parameter to 0, the call recording feature of the Cloud PBX will be disabled.
regionId Yes Integer The ID of the region where the Cloud PBX will be launched.
Note: You can query the region ID using Query Available Regions.
subDomain Yes String The sub-domain of the Cloud PBX.
Note:
  • The Cloud PBX URL is composed of a custom sub-domain and a specific domain name.
  • Only allowed to enter numbers, letters, and hyphens - in this parameter.
domainId Yes Integer The ID of the desired domain name.
Note: You can query the domain ID using Query Available Domain Names.
type Yes String PBX Type.

Valid value:

  • Trial
  • Commercial
expirationDate No Long PBX expiration date.
Note: Enter the timestamp of the desired expiration date in this field.
versionId Yes Integer The ID of the PBX firmware version.
Note: You can query the version ID using Query Available Firmwares.
customerIds Yes Array <Long> The ID(s) of the customer(s) that will be associated with the Cloud PBX.
Note:
upgradeInPbx Yes String Whether to enable firmware upgrading on PBX side.
Valid value:
  • Enabled
  • Disabled
im Yes String Whether to enable internal chat feature (IM) of the Cloud PBX.
Note: The setting can be applied to the P-Series Cloud PBXs with a firmware version of 84.12.0.32 or later.
Valid value:
  • Enabled
  • Disabled
passwordlessLogin Yes String Whether to enable passwordless login to the Cloud PBX.
Valid value:
  • Enabled
  • Disabled
allowSuperiorPasswordlessLogin Yes String Whether to enable passwordless login to the Cloud PBX for your superior account.
Note: The setting of this parameter only takes effect when passwordlessLogin is set to Enabled.
Valid value:
  • Enabled
  • Disabled
provisioningViaTemplate No String Whether to allow the Cloud PBX to be provisioned via a template.

Valid value:

  • Enabled
  • Disabled

Response parameters

Parameter Type Description
data Object <Details> The detailed information.
requestId String The unique ID of the request, which can be used to quickly locate the request.
status String Request result:
  • Success
  • Failed
time Long The response time.
Note: The YCM API response returns a timestamp, you can convert the timestamp to detailed date and time as needed. For more information, see Convert Timestamp to Local Date and Time.
Details
Parameter Type Description
cloudPbxId Long The ID of the Cloud PBX.

Example

Request example

Create a Cloud PBX:
  • URL: cloud.test4.yeastarcloud.com;
  • Region: Asia Pacific(Singapore) (ID: 4);
  • Domain name: test4.yeastarcloud.com (ID: 4);
  • Firmware: 84.8.0.25 (ID: 764).
POST /dm/open_api/v1/cloud_pbx/instances HTTP/1.1
Host: ycm.yeastar.com
Authorization: Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJjdXN0b21Kd3RQYXlsb2FkSW5mbyI6eyJncmFudFR5cGUiOiJjbGllbnRfY3JlZGVudGlhbHMiLCJ5c0lkIjoxNzg5NjM2MDM5MDg1MDI1NjY0NSwidmVyc2lvbiI6MTY2Mzc0MTEyNSwicmVmcmVzaFZlcnNpb24iOjE2NjQ0NTAxOTh9LCJzY29wZSI6WyJhbGwiXSwiZXhwIjoxNjY0NDUxOTk4LCJhdXRob3JpdGllcyI6WyJST0xFX0NMSUVOVCJdLCJqdGkiOiJmNzAzYjk0Ni1kMzk4LTQxZWEtOTgwZi1hOGZmNWYxODhiNDAiLCJjbGllbnRfaWQiOiJ5QXN4ZzdITkRFczNxSHprQk1aUU5Pblo2NTBPRUNNWSJ9.N9R6s5ttSah3LRdDBowQYdYw8URWhzyJYiD5cdVm2ZM
Content-Type: application/json
{
  "name": "Yeastar P-Series Cloud PBX",
  "plan": "Enterprise Plan",
  "extensionCapacity": 20,
  "concurrentCallCapacity": 10,
  "recordingStatus": "Enabled",
  "recordingCapacity": 500,
  "regionId": 4,
  "subDomain": "cloud",
  "domainId": 4,
  "type": "Commercial",
  "expirationDate": 1667059200,
  "versionId": 764,
  "customerIds": [50086182,50429564],
  "upgradeInPbx": "Enabled",
  "im": "Enabled",
  "passwordlessLogin": "Enabled",
  "allowSuperiorPasswordlessLogin": "Enabled",
  "provisioningViaTemplate":"Enabled"
}
Response example
HTTP/1.1 200 OK
{
  "data": {
    "cloudPbxId": 42100
  },
  "requestId": "44151421047434e0ef817a10fc5331a5",
  "status": "Success",
  "time": 1664450755
}