Create a PBX
HTTP method and endpoint
POST /api/v1/pbx/instances
Request parameters
| Parameter | Importance | Type | Description | Restriction |
| name | Required | String | PBX name. | The following characters are NOT
allowed:
|
| extension | Required | Integer | The maximum number of extensions for the PBX. | Only numbers are allowed. |
| concurrentCall | Required | Integer | The maximum number of concurrent calls for the PBX. | Only numbers are allowed. |
| recordingCapacity | Optional | Integer |
|
|
| callRecording | Required | Boolean | Is the Call Recording feature enabled or not. |
|
| versionId | Required | Integer | The PBX version ID. | Only numbers are allowed. |
| customerIds | Required | Array<Integer> | The PBX customer(s). |
|
| domain | Required | String | PBX domain. |
|
| type | Required | String | PBX Type. | Permitted value:
|
| expireTime | Optional | String | The expiry date of PBX. Configure this parameter when PBX type is set totrial. |
Format: YYYY-MM-DD Example: 2019-06-11 |
| pbxApiAvailable | Optional | Integer | If the PBX user has option to enable API feature on PBX web interface. | Permitted value:
Note: If this parameter is not defined, the default value is
1. |
Response parameters
| Parameter | Type | Description |
| instance | Object | PBX instance. |
| sn | String | PBX Serial Number. |
| id | Integer | PBX ID. |
Examples
Request example
POST /api/v1/pbx/instances HTTP/1.1 Host: ympapi.yeastarcloud.com Authorization: Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJsb2dpbl9uYW1lIjoiY2VjaWxpYUB5ZWFzdGFyLmNvbSIsInNjb3BlIjpbInRydXN0Il0sImV4cCI6MTU0NzAxNDc4OSwiYXV0aG9yaXRpZXMiOlsiUk9MRV9hZG1pbiJdLCJqdGkiOiJiYWYxN2Q2Ny03NGYzLTRlNjQtODMxMi0wYWM1ZTkyZmViZjAiLCJjbGllbnRfaWQiOiI5Nzg5OTNmMDk2YzQ0MTFmYTljYzgwZWUyZTYyZjFmMiJ9.KriN9QENpnb2Vy5qw_ktut4ONrPz-LYhPCxl58jGqSc Content-Type: application/json Cache-Control: no-cache { "name": "apicreate001", "domain": "apicreate001", "customerIds": [52], "versionId": 164, "extension": 10, "concurrentCall":10, "recordingCapacity": 500, "callRecording": "true" , "type":"trial", "expireTime":"2019-5-4", "pbxApiAvailable":0 }
Response example
HTTP/1.1 200 OK { "status": "Success", "instance": { "id": 1421, "sn": "3682804SWHO345MJ" } }