Logs user into the system by name and password

POST /account/credentials/verify
This API is used to verify the validity of user's credential. It returns HTTP 200 message code and access_token for the successful authentication of a certain PBX account; and a 400 error code and an error message if failed.
Path parameters
  • x-forwarded-for

    string

    optional

    host of request client.
Request body
application/json
  • language

    string

    required

  • name

    string

    required

    The name of the tenant or admin user. Admin user has access to details for his account and other tenantusers, whilst tenant user has access to his account info only.

    minLength: 64

    maxLength: 64

  • password

    string

    required

    By default, password for admin user is admin. For extension, the password should be the "Web Access Password" of extensioninstead of extension's SIP password.

    minLength: 64

    maxLength: 64

Sample Request

                      curl -v -X POST http://localhoost:8888/api/account/credentials/verify \
                        -H "Content-Type: application/json" \
                        -H "access_token: 4DFCF1D4C30B4D798ECE3AE43769F008" \
                          -d '{
    "name": "tenant",
    "password": "ABCabc123"
}'
                      
                    

Responses

200
Successful operation
application/json
  • expires

    integer

    Time interval for access token expiration, in seconds. If the access token is not refreshed before the expiry, the token will become invalid.
  • api_version

    string

    API version number.
  • id

    integer

    The userid of the tenant or admin user. Admin user has access to details for his account and other tenantusers, whilst tenant user has access to his account info only.
  • access_token

    string

    token to be passed as a header
  • name

    string

    The name of the tenant or admin user. Admin user has access to details for his account and other tenantusers, whilst tenant user has access to his account info only.
  • role

    string

    User type. It could be "administrator", "tenant" or "extension".

Sample Response

                      
{
    "expires": 3600,
    "api_version": "12.0",
    "id": 1231334,
    "access_token": "4DFCF1D4C30B4D798ECE3AE43769F008",
    "name": "tenant",
    "role": "tenant"
}
                      
                    

Update domain

POST /domain/update
Setup SIP domain
Path parameters
  • access_token

    string

    required

    token to be passed as a header

    minLength: 64

    maxLength: 64

Request body
application/json
  • domain

    string

    required

    Tenant's domain.

    minLength: 32

    maxLength: 32

Sample Request

                      curl -v -X POST http://localhoost:8888/api/domain/update \
                        -H "Content-Type: application/json" \
                        -H "access_token: 4DFCF1D4C30B4D798ECE3AE43769F008" \
                          -d '{
    "domain": "tenant.com"
}'
                      
                    

Responses

200
Successful operation

Sample Response

                      
                      
                    

Periodic refreshment of access token

POST /account/token/refresh
Path parameters
  • access_token

    string

    required

    token to be passed as a header

    minLength: 64

    maxLength: 64

Sample Request

                      curl -v -X POST http://localhoost:8888/api/account/token/refresh \
                        -H "Content-Type: application/json" \
                        -H "access_token: 4DFCF1D4C30B4D798ECE3AE43769F008" \
                      
                    

Responses

200
Successful operation
application/json
  • expires

    integer

    Time interval for access token expiration, in seconds. If the access token is not refreshed before the expiry, the token will become invalid.

Sample Response

                      
{
    "expires": 3600
}
                      
                    

Update tenant

POST /account/update
Set tenant object that already exists.
Path parameters
  • access_token

    string

    required

    token to be passed as a header

    minLength: 64

    maxLength: 64

Request body
application/json
  • domain

    string

    required

    Tenant's domain.

    minLength: 32

    maxLength: 32

  • cdr

    object

    required

    Show child attributes
  • extension_event

    object

    required

    Show child attributes
  • profile

    object

    required

    Show child attributes
  • name

    string

    required

    The name of the tenant or admin user. Admin user has access to details for his account and other tenantusers, whilst tenant user has access to his account info only.

    minLength: 64

    maxLength: 64

  • id

    integer

    required

    The userid of the tenant or admin user. Admin user has access to details for his account and other tenantusers, whilst tenant user has access to his account info only.
  • smtp

    object

    required

    Show child attributes
  • sms

    object

    required

    Show child attributes
  • enabled

    boolean

    required

    Indicates if it has been enabled for the new user.
  • quota

    object

    required

    Show child attributes
  • capability

    object

    required

    Show child attributes
  • password

    string

    required

    By default, password for admin user is admin. For extension, the password should be the "Web Access Password" of extensioninstead of extension's SIP password.

    minLength: 64

    maxLength: 64

  • office_hours

    object

    required

    Show child attributes

Sample Request

                      curl -v -X POST http://localhoost:8888/api/account/update \
                        -H "Content-Type: application/json" \
                        -H "access_token: 4DFCF1D4C30B4D798ECE3AE43769F008" \
                          -d '{
    "password": "ABCabc123",
    "id": 1231334,
    "smtp": {
        "smtp_server_port": 5000,
        "smtp_reply_addr": "example.com",
        "smtp_server": "example.com",
        "smtp_username": "example",
        "smtp_passwd": "ABCabc123",
        "smtp_security_type": "NO_SECURITY"
    },
    "sms": {
        "username": "",
        "provider": "Twilio",
        "password": "",
        "token": "",
        "enabled": false
    },
    "enabled": true,
    "cdr": {
        "username": "",
        "enabled": false,
        "authentication_method": "",
        "password": "",
        "cdr_url": ""
    },
    "quota": {
        "disk_quota": 100,
        "auto_clean_recordings_days": 100,
        "auto_clean_voicemail_days": 100,
        "auto_clean_call_reports_days": 100
    },
    "extension_event": {
        "event_url": "",
        "username": "BASIC",
        "enabled": false,
        "authentication_method": "BASIC",
        "password": "BASIC"
    },
    "capability": {
        "max_concurrent_calls": 10,
        "max_call_queues": 1000,
        "max_conference_rooms": 1000,
        "max_ring_groups": 1000,
        "max_virtual_receptionists": 1000,
        "max_extensions": 1000
    },
    "domain": "tenant.com",
    "name": "tenant"
}'
                      
                    

Responses

200
Successful operation

Sample Response

                      
                      
                    

Logs user into the system by extension sip password

POST /account/extension/sip/verify
This API is used to verify the validity of user's credential. It returns HTTP 200 message code and access_token for the successful authentication of a certain PBX account; and a 400 error code and an error message if failed.
Path parameters
  • x-forwarded-for

    string

    optional

    host of request client.
Request body
application/json
  • language

    string

    required

  • domain

    string

    required

    Tenant's domain.

    minLength: 32

    maxLength: 32

  • extension_number

    string

    required

  • sip_password

    string

    required

    By default, password for admin user is admin. For extension, the password should be the "Web Access Password" of extensioninstead of extension's SIP password.

    minLength: 64

    maxLength: 64

Sample Request

                      curl -v -X POST http://localhoost:8888/api/account/extension/sip/verify \
                        -H "Content-Type: application/json" \
                        -H "access_token: 4DFCF1D4C30B4D798ECE3AE43769F008" \
                          -d '{
    "domain": "tenant.com",
    "sip_password": "ABCabc123"
}'
                      
                    

Responses

200
Successful operation
application/json
  • expires

    integer

    Time interval for access token expiration, in seconds. If the access token is not refreshed before the expiry, the token will become invalid.
  • api_version

    string

    API version number.
  • domain

    string

    Tenant's domain.
  • extension_password

    string

    By default, password for admin user is admin. For extension, the password should be the "Web Access Password" of extensioninstead of extension's SIP password.
  • indept_password

    string

    By default, password for admin user is admin. For extension, the password should be the "Web Access Password" of extensioninstead of extension's SIP password.
  • access_token

    string

    token to be passed as a header
  • extension_number

    string

  • transports

    array

    Show child attributes
  • id

    integer

    The userid of the tenant or admin user. Admin user has access to details for his account and other tenantusers, whilst tenant user has access to his account info only.
  • role

    string

    User type. It could be "administrator", "tenant" or "extension".
  • name

    string

    The name of the tenant or admin user. Admin user has access to details for his account and other tenantusers, whilst tenant user has access to his account info only.

Sample Response

                      
{
    "expires": 3600,
    "api_version": "12.0",
    "domain": "tenant.com",
    "indept_password": "ABCabc123",
    "id": 1231334,
    "access_token": "4DFCF1D4C30B4D798ECE3AE43769F008",
    "extension_password": "ABCabc123",
    "role": "tenant",
    "name": "tenant"
}
                      
                    

Show tenant

GET /account/show
Path parameters
  • access_token

    string

    required

    token to be passed as a header

    minLength: 64

    maxLength: 64

  • id

    integer

    required

    The tenant id of the tenant or admin user. Admin user has access to details for his account and other tenantusers, whilst tenant user has access to his account info only.

Sample Request

                      curl -v -X GET http://localhoost:8888/api/account/show \
                        -H "Content-Type: application/json" \
                        -H "access_token: 4DFCF1D4C30B4D798ECE3AE43769F008" \
                      
                    

Responses

200
Successful operation
application/json
  • profile

    object

    Show child attributes
  • cdr

    object

    Show child attributes
  • extension_event

    object

    Show child attributes
  • domain

    string

    Tenant's domain.
  • name

    string

    The name of the tenant or admin user. Admin user has access to details for his account and other tenantusers, whilst tenant user has access to his account info only.
  • id

    integer

    The userid of the tenant or admin user. Admin user has access to details for his account and other tenantusers, whilst tenant user has access to his account info only.
  • smtp

    object

    Show child attributes
  • sms

    object

    Show child attributes
  • enabled

    boolean

    Indicates if it has been enabled for the new user.
  • quota

    object

    Show child attributes
  • capability

    object

    Show child attributes
  • password

    string

    By default, password for admin user is admin. For extension, the password should be the "Web Access Password" of extensioninstead of extension's SIP password.
  • office_hours

    object

    Show child attributes

Sample Response

                      
{
    "password": "ABCabc123",
    "id": 1231334,
    "smtp": {
        "smtp_server_port": 5000,
        "smtp_reply_addr": "example.com",
        "smtp_server": "example.com",
        "smtp_username": "example",
        "smtp_passwd": "ABCabc123",
        "smtp_security_type": "NO_SECURITY"
    },
    "sms": {
        "username": "",
        "provider": "Twilio",
        "password": "",
        "token": "",
        "enabled": false
    },
    "enabled": true,
    "cdr": {
        "username": "",
        "enabled": false,
        "authentication_method": "",
        "password": "",
        "cdr_url": ""
    },
    "extension_event": {
        "event_url": "",
        "username": "BASIC",
        "enabled": false,
        "authentication_method": "BASIC",
        "password": "BASIC"
    },
    "capability": {
        "max_concurrent_calls": 10,
        "max_call_queues": 1000,
        "max_conference_rooms": 1000,
        "max_ring_groups": 1000,
        "max_virtual_receptionists": 1000,
        "max_extensions": 1000
    },
    "domain": "tenant.com",
    "name": "tenant"
}
                      
                    

Logs out current logged in user session

POST /account/sign_out
Path parameters
  • access_token

    string

    required

    token to be passed as a header

    minLength: 64

    maxLength: 64

Sample Request

                      curl -v -X POST http://localhoost:8888/api/account/sign_out \
                        -H "Content-Type: application/json" \
                        -H "access_token: 4DFCF1D4C30B4D798ECE3AE43769F008" \
                      
                    

Responses

200
Successful operation

Sample Response

                      
                      
                    

List tenants

GET /account/list
Only available to admin user.
Path parameters
  • access_token

    string

    required

    token to be passed as a header

    minLength: 64

    maxLength: 64

  • pagination

    integer

    required

    The pagination of paging.

    minimum: 1

    maximum: 100000

  • pagesize

    integer

    required

    The size of paging.

    minimum: 1

    maximum: 100

  • sort_by

    string

    required

    Values include "DEFAULT" and "Optional". Default value will be used when user does not specify value for this field.

Sample Request

                      curl -v -X GET http://localhoost:8888/api/account/list \
                        -H "Content-Type: application/json" \
                        -H "access_token: 4DFCF1D4C30B4D798ECE3AE43769F008" \
                      
                    

Responses

200
Successful operation
application/json
  • tenants

    array

    Show child attributes
  • pagination

    integer

  • count

    integer

  • sort_by

    string

  • pagesize

    integer

Sample Response

                      
{
    "tenants": {
        "company_name": "example Inc.",
        "max_concurrent_calls": 10,
        "domain": "tenant.com",
        "last_name": "Sparrow",
        "first_name": "Jack",
        "id": 1231334,
        "enabled": true,
        "name": "tenant",
        "max_extensions": 1000
    },
    "pagination": 8,
    "count": 100,
    "sort_by": "DEFAULT",
    "pagesize": 10
}
                      
                    

Retrive domain settings

GET /domain/show
Retrive domain settings
Path parameters
  • access_token

    string

    required

    token to be passed as a header

    minLength: 64

    maxLength: 64

Sample Request

                      curl -v -X GET http://localhoost:8888/api/domain/show \
                        -H "Content-Type: application/json" \
                        -H "access_token: 4DFCF1D4C30B4D798ECE3AE43769F008" \
                      
                    

Responses

200
Successful operation
application/json
  • domain

    string

    Tenant's domain.

Sample Response

                      
{
    "domain": "tenant.com"
}
                      
                    

Delete tenant

POST /account/destroy
Path parameters
  • access_token

    string

    required

    token to be passed as a header

    minLength: 64

    maxLength: 64

Request body
application/json
  • id

    integer

    required

    The userid of the tenant or admin user. Admin user has access to details for his account and other tenantusers, whilst tenant user has access to his account info only.

Sample Request

                      curl -v -X POST http://localhoost:8888/api/account/destroy \
                        -H "Content-Type: application/json" \
                        -H "access_token: 4DFCF1D4C30B4D798ECE3AE43769F008" \
                          -d '{
    "id": 1231334
}'
                      
                    

Responses

400
Invalid name supplied
404
User not found
200
Successful operation

Sample Response

                      
                      
                    

Logs user into the system by email

POST /account/email/verify
This API is used to verify the validity of user's credential. It returns HTTP 200 message code and access_token for the successful authentication of a certain PBX account; and a 400 error code and an error message if failed.
Path parameters
  • x-forwarded-for

    string

    optional

    host of request client.
Request body
application/json
  • language

    string

    required

  • domain

    string

    required

    Tenant's domain.

    minLength: 32

    maxLength: 32

  • web_password

    string

    required

    By default, password for admin user is admin. For extension, the password should be the "Web Access Password" of extensioninstead of extension's SIP password.

    minLength: 64

    maxLength: 64

  • email

    string

    required

    The email address of tenant or admin user.

    minLength: 6

    maxLength: 64

Sample Request

                      curl -v -X POST http://localhoost:8888/api/account/email/verify \
                        -H "Content-Type: application/json" \
                        -H "access_token: 4DFCF1D4C30B4D798ECE3AE43769F008" \
                          -d '{
    "domain": "tenant.com",
    "web_password": "ABCabc123",
    "email": "example@example.com"
}'
                      
                    

Responses

200
Successful operation
application/json
  • expires

    integer

    Time interval for access token expiration, in seconds. If the access token is not refreshed before the expiry, the token will become invalid.
  • api_version

    string

    API version number.
  • domain

    string

    Tenant's domain.
  • extension_password

    string

    By default, password for admin user is admin. For extension, the password should be the "Web Access Password" of extensioninstead of extension's SIP password.
  • access_token

    string

    token to be passed as a header
  • extension_number

    string

  • transports

    array

    Show child attributes
  • id

    integer

    The userid of the tenant or admin user. Admin user has access to details for his account and other tenantusers, whilst tenant user has access to his account info only.
  • role

    string

    User type. It could be "administrator", "tenant" or "extension".
  • name

    string

    The name of the tenant or admin user. Admin user has access to details for his account and other tenantusers, whilst tenant user has access to his account info only.

Sample Response

                      
{
    "expires": 3600,
    "api_version": "12.0",
    "domain": "tenant.com",
    "id": 1231334,
    "access_token": "4DFCF1D4C30B4D798ECE3AE43769F008",
    "extension_password": "ABCabc123",
    "role": "tenant",
    "name": "tenant"
}
                      
                    

Add a new tenant to the system.

POST /account/create
A maximum of five tenant users could be created. This feature is available to admin user only.
Path parameters
  • access_token

    string

    required

    token to be passed as a header

    minLength: 64

    maxLength: 64

Request body
application/json
  • profile

    object

    required

    Show child attributes
  • cdr

    object

    required

    Show child attributes
  • extension_event

    object

    required

    Show child attributes
  • domain

    string

    required

    Tenant's domain.

    minLength: 32

    maxLength: 32

  • name

    string

    required

    The name of the tenant or admin user. Admin user has access to details for his account and other tenantusers, whilst tenant user has access to his account info only.

    minLength: 64

    maxLength: 64

  • smtp

    object

    required

    Show child attributes
  • sms

    object

    required

    Show child attributes
  • enabled

    boolean

    required

    Indicates if it has been enabled for the new user.
  • quota

    object

    required

    Show child attributes
  • capability

    object

    required

    Show child attributes
  • password

    string

    required

    By default, password for admin user is admin. For extension, the password should be the "Web Access Password" of extensioninstead of extension's SIP password.

    minLength: 64

    maxLength: 64

  • office_hours

    object

    required

    Show child attributes

Sample Request

                      curl -v -X POST http://localhoost:8888/api/account/create \
                        -H "Content-Type: application/json" \
                        -H "access_token: 4DFCF1D4C30B4D798ECE3AE43769F008" \
                          -d '{
    "domain": "tenant.com",
    "smtp": {
        "smtp_server_port": 5000,
        "smtp_reply_addr": "example.com",
        "smtp_server": "example.com",
        "smtp_username": "example",
        "smtp_passwd": "ABCabc123",
        "smtp_security_type": "NO_SECURITY"
    },
    "sms": {
        "username": "",
        "provider": "Twilio",
        "password": "",
        "token": "",
        "enabled": false
    },
    "enabled": true,
    "cdr": {
        "username": "",
        "enabled": false,
        "authentication_method": "",
        "password": "",
        "cdr_url": ""
    },
    "quota": {
        "disk_quota": 100,
        "auto_clean_recordings_days": 100,
        "auto_clean_voicemail_days": 100,
        "auto_clean_call_reports_days": 100
    },
    "extension_event": {
        "event_url": "",
        "username": "BASIC",
        "enabled": false,
        "authentication_method": "BASIC",
        "password": "BASIC"
    },
    "capability": {
        "max_concurrent_calls": 10,
        "max_call_queues": 1000,
        "max_conference_rooms": 1000,
        "max_ring_groups": 1000,
        "max_virtual_receptionists": 1000,
        "max_extensions": 1000
    },
    "name": "tenant",
    "password": "ABCabc123"
}'
                      
                    

Responses

200
Created tenant object
application/json
  • id

    integer

    The userid of the tenant or admin user. Admin user has access to details for his account and other tenantusers, whilst tenant user has access to his account info only.

Sample Response

                      
{
    "id": 1231334
}
                      
                    

Logs user into the system by extension web password

POST /account/extension/web/verify
This API is used to verify the validity of user's credential. It returns HTTP 200 message code and access_token for the successful authentication of a certain PBX account; and a 400 error code and an error message if failed.
Path parameters
  • x-forwarded-for

    string

    optional

    host of request client.
Request body
application/json
  • web_password

    string

    required

    By default, password for admin user is admin. For extension, the password should be the "Web Access Password" of extensioninstead of extension's SIP password.

    minLength: 64

    maxLength: 64

  • language

    string

    required

  • domain

    string

    required

    Tenant's domain.

    minLength: 32

    maxLength: 32

  • extension_number

    string

    required

Sample Request

                      curl -v -X POST http://localhoost:8888/api/account/extension/web/verify \
                        -H "Content-Type: application/json" \
                        -H "access_token: 4DFCF1D4C30B4D798ECE3AE43769F008" \
                          -d '{
    "domain": "tenant.com",
    "web_password": "ABCabc123"
}'
                      
                    

Responses

200
Successful operation
application/json
  • expires

    integer

    Time interval for access token expiration, in seconds. If the access token is not refreshed before the expiry, the token will become invalid.
  • api_version

    string

    API version number.
  • domain

    string

    Tenant's domain.
  • extension_password

    string

    By default, password for admin user is admin. For extension, the password should be the "Web Access Password" of extensioninstead of extension's SIP password.
  • indept_password

    string

    By default, password for admin user is admin. For extension, the password should be the "Web Access Password" of extensioninstead of extension's SIP password.
  • access_token

    string

    token to be passed as a header
  • extension_number

    string

  • transports

    array

    Show child attributes
  • id

    integer

    The userid of the tenant or admin user. Admin user has access to details for his account and other tenantusers, whilst tenant user has access to his account info only.
  • role

    string

    User type. It could be "administrator", "tenant" or "extension".
  • name

    string

    The name of the tenant or admin user. Admin user has access to details for his account and other tenantusers, whilst tenant user has access to his account info only.

Sample Response

                      
{
    "expires": 3600,
    "api_version": "12.0",
    "domain": "tenant.com",
    "indept_password": "ABCabc123",
    "id": 1231334,
    "access_token": "4DFCF1D4C30B4D798ECE3AE43769F008",
    "extension_password": "ABCabc123",
    "role": "tenant",
    "name": "tenant"
}