With the Cloud PBX API, you can create, update or query the configuration of Cloud PBX users.
Configuration of Cloud PBX users:
A method to retrieve a list of all Cloud PBX user accounts (of a customer).
POST | https://api.tenios.com/cloud-pbx/list |
Request Parameter:
access_key | The API access key. It can be found in the menu item General Settings, section API in the customer portal. |
page | The page of the configuration to be retrieved. |
page_size | The page size or maximum number of cloud PBX users to be returned. |
Response Parameter:
success | true if successful, otherwise error. |
items[] | A list of items where each is a Cloud PBX user account. Please note, that the “password” filed will not be included. |
total_items | Total amount of available items. |
page_size | Amount of items per page. |
page | Result page number (starts from 1) |
user_name | The user name of the Cloud PBX user. |
first_name | The first name of the Cloud PBX user. |
last_name | The last name of the Cloud PBX user. |
internal_extension | The internal extension of the Cloud PBX user. |
outbound_allowed | A flag indicating whether the Cloud PBX user is allowed to make outgoing calls. |
sip_login_enabled | A flag indicating whether the cloud PBX user is allowed to log in to the PBX portal (https://pbx.tenios.com). |
call_history_enabled | A flag indicating whether the call history should be displayed in the PBX portal (https://pbx.tenios.com). |
The email address of the Cloud PBX user. |
Example of a successful request:
Request:
{ "access_key": "XXXXX-XXXX-XXXXXX", "page": 1, "page_size": 2 }
API Response:
HTTP Status Code: 200 (OK)
{ "success": true, "items": [ { "user_name": "+49221234567", "first_name": "Toni", "last_name": "Tester", "internal_extension": "", "outbound_allowed": false, "sip_login_enabled": true, "call_history_enabled": true, "email": "tt@test.com" }, { "user_name": "+49221235655", "first_name": "Alice", "last_name": "Example", "internal_extension": "", "outbound_allowed": true, "sip_login_enabled": false, "call_history_enabled": false, "email": "ae@test.com" } ], "total_items": 10, "page_size": 2, "page": 1 }
Examples of invalid requests:
Change or create the configuration of Cloud PBX users:
A method to change or create the configuration of Cloud PBX users.
The parameter user_name must be a valid Cloud-PBX phone number.
POST | https://api.tenios.com/cloud-pbx/upsert/{user_name} |
Request Parameter:
access_key | The API access key. It can be found in the menu item General Settings, section API in the customer portal. |
user_name | User name is always the phone number of the user. Note, that this parameter is sent as a part of the URL. |
first_name | The user first name of the Cloud PBX user. Note, this parameter can also be empty. |
last_name | The last name of the Cloud PBX user. Note, this parameter can also be empty. |
internal_extension Optional | The internal extension of the Cloud PBX user. |
outbound_allowed | A flag indicating whether the Cloud PBX user is allowed to make outgoing calls. |
sip_login_enabled | A flag indicating whether the cloud PBX user is allowed to log in to the PBX portal (https://pbx.tenios.com). |
email Optional | The email address of the Cloud PBX user. |
call_history_enabled | A flag indicating whether the call history should be displayed in the PBX portal (https://pbx.tenios.com). |
Response Parameter:
success | true if successful, otherwise error. |
Example of a successful request:
Request:
Example: https://api.tenios.com/cloud-pbx/upsert/+49221000002
{ "access_key": "XXXXX-XXXX-XXXXXX", "password": "i7Lkm07", "outbound_allowed": "true", "sip_login_enabled": "true", "call_history_enabled": "true", "first_name": "Peter", "last_name": "Mustermann" }
API Response:
HTTP Status Code: 200 (OK)
{ "success": true }
Examples of invalid requests: