Account login
Request
username
string
required
Username for admin, tenant or extension account. When executing verification against extension's account, it must be in the format of extension_number@sipdomain, e.g. 101@yourcompany.com.password
string
required
By default, password for admin user is admin. For extension, the password should be the "Web Access Password" of extension instead of extension's SIP password.
Sample Request
{
"username": "admin",
"password": "admin"
}
Response
access_token
string
required
Access token is a 32-byte string with validity of 30 seconds.expires
integer
required
Time interval for access token expiration, in seconds. If the access token is not refreshed before the expiry, the token will become invalid.role
string
required
User type. It could be "administrator", "tenant" or "extension".api_version
string
required
API version number.
Sample Response
{
"access_token": "196ACE20C6F34027895F7F95402BB164",
"expires": 600,
"role": "tenant",
"api_version": "2.0.0"
}
Account login by email
Request
email
string
required
Email for Extension.password
string
required
"Web Access Password" of extension instead of extension's SIP password.
Sample Request
{
"email": "sample@sample.com",
"password": "sample access password"
}
Response
access_token
string
required
Access token is a 32-byte string with validity of 30 seconds.expires
integer
required
Time interval for access token expiration, in seconds. If the access token is not refreshed before the expiry, the token will become invalid.role
string
required
User type. It could be "administrator", "tenant" or "extension".api_version
string
required
API version number.extension_number
string
required
Extension's extension number.extension_password
string
required
Extension's sip password.domain
string
required
Tenant's domain.transports
array
required
Show child attributesCollection of call session objects.
Sample Response
{
"access_token": "196ACE20C6F34027895F7F95402BB164",
"expires": 600,
"role": "tenant",
"api_version": "2.0.0",
"extension_number": 10001,
"extension_password": 123456,
"domain": "sampledomain.com",
"transports": [
{
"protocol": "UDP",
"port": 5060
}
]
}
Create account
Request
access_token
string
required
Access token is a 32-byte string with validity of 30 seconds.username
string
required
The name of tenant or admin user. It's used for logging into PortSIP PBX.domain
string
required
Tenant's domain.password
string
required
The password for new user.enabled
boolean
required
Indicates if it has been enabled for the new user.profile
object
required
Show child attributesProfile settings for tenant.office_hours
object
required
Show child attributesOffice hours settings for tenant.capability
object
required
Show child attributesCapability settings for tenant.smtp
object
required
Show child attributesSMTP settings for tenant.quota
object
required
Show child attributesQuota settings for tenant.cdr
object
required
Show child attributesCDR event settings for tenant.extension_event
object
required
Show child attributesExtension event settings for tenant.sms
object
required
Show child attributesSMS settings for tenant.
Sample Request
{
"access_token": "196ACE20C6F34027895F7F95402BB164",
"username": "tenant",
"domain": "example.com",
"password": "Aasd21123",
"enabled": true,
"profile": {
"first_name": "first name",
"last_name": "last name",
"email": "example@example.com",
"company_name": "example company name",
"company_website": "example website",
"region": "China",
"timezone": "(UTC+08:00) Beijing, Chongqing, Hong Kong, Urumqi",
"currency": "USD",
"billing_for_outbound_calls": false,
"billing_for_inbound_calls": false,
"enable_extension_change_password": true,
"enable_extension_video_recording": false,
"enable_extension_audio_recording": false
},
"office_hours": {
"monday_from": "09:00",
"monday_to": "17:00",
"tuesday_from": "09:00",
"tuesday_to": "17:00",
"wednesday_from": "09:00",
"wednesday_to": "17:00",
"thursday_from": "09:00",
"thursday_to": "17:00",
"friday_from": "09:00",
"friday_to": "17:00",
"saturday_from": "09:00",
"saturday_to": "17:00",
"sunday_from": "09:00",
"sunday_to": "17:00"
},
"capability": {
"max_extensions": -1,
"max_concurrent_calls": -1,
"max_ring_groups": -1,
"max_virtual_receptionists": -1,
"max_call_queues": -1,
"max_conference_rooms": -1
},
"smtp": {
"smtp_server": "sample.com",
"smtp_server_port": 12345,
"smtp_reply_addr": "sample@sample.com",
"smtp_username": "sample name",
"smtp_passwd": "sample password",
"smtp_security_type": "NO_SECURITY"
},
"quota": {
"max_recordings_quota": 0,
"max_voicemail_quota": 0,
"max_call_report_quota": 0,
"auto_clean_recordings_days": 7,
"auto_clean_voicemail_days": 7,
"auto_clean_call_reports_days": 7
},
"cdr": {
"enabled": true,
"authentication_method": "GET",
"username": "username",
"password": "password",
"cdr_url": "http://www.cdr-url.com"
},
"extension_event": {
"enabled": true,
"auth_method": "GET",
"username": "username",
"password": "password",
"event_url": "http://www.extension-event-url.com"
},
"sms": {
"enabled": true,
"provider": "clickatell",
"token": "example token"
}
}
Response
Sample Response
List accounts
Request
access_token
string
required
Access token is a 32-byte string with validity of 30 seconds.pagination
integer
required
The pagination of paging.pagesize
integer
optional
The size of paging.sort_by
enum
optional
Values include "DEFAULT" and "Optional". Default value will be used when user does not specify value for this field.
Sample Request
https://example.com/api/account/list?access_token=196ACE20C6F34027895F7F95402BB164&pagesize=100&pagination=1&sort_by=DEFAULT
Response
pagination
integer
required
The pagination of paging.pagesize
integer
optional
The size of paging.sort_by
enum
optional
Values include "DEFAULT" and "Optional". Default value will be used when user does not specify value for this field.page_count
integer
required
The total count of pages.count
integer
required
Current pagesize.tenants
array
required
Show child attributesAPI version.
Sample Response
{
"pagination": 1,
"pagesize": 100,
"sort_by": "DEFAULT",
"page_count": 100,
"count": 100,
"tenants": [
{
"username": "tenant",
"first_name": "Sample name",
"last_name": "Sample name",
"company_name": "Sample name",
"domain": "sample.com",
"max_extensions": 100,
"max_concurrent_calls": 100,
"enabled": true
}
]
}
Show account details
Request
access_token
string
required
Access token is a 32-byte string with validity of 30 seconds.username
string
required
The username of the tenant or admin user. Admin user has access to details for his account and other tenant users', whilst tenant user has access to his account info only.
Sample Request
Response
username
string
required
The name of tenant or admin user. It's used for logging into PortSIP PBX.domain
string
required
The domain of tenant or admin user.enabled
boolean
required
Indicates if it has been enabled for the new user.profile
object
required
Show child attributesProfile settings for tenant.office_hours
object
required
Show child attributesOffice hours settings for tenant.capability
object
required
Show child attributesCapability settings for tenant.mail_server
object
required
Show child attributesSMTP settings for tenant.quota
object
required
Show child attributesQuota for tenant.cdr
object
required
Show child attributesCDR settings for tenant.extension_event
object
required
Show child attributesExtension event for tenant.sms
object
required
Show child attributesSMS for tenant.
Sample Response
{
"username": "tenant",
"domain": "example.com",
"enabled": true,
"profile": {
"first_name": "first name",
"last_name": "last name",
"email": "example@example.com",
"company_name": "example company name",
"company_website": "example website",
"region": "China",
"timezone": "(UTC+08:00) Beijing, Chongqing, Hong Kong, Urumqi",
"currency": "USD",
"billing_for_outbound_calls": false,
"billing_for_inbound_calls": false,
"enable_extension_change_password": true,
"enable_extension_video_recording": false,
"enable_extension_audio_recording": false
},
"office_hours": {
"monday_from": "09:00",
"monday_to": "17:00",
"tuesday_from": "09:00",
"tuesday_to": "17:00",
"wednesday_from": "09:00",
"wednesday_to": "17:00",
"thursday_from": "09:00",
"thursday_to": "17:00",
"friday_from": "09:00",
"friday_to": "17:00",
"saturday_from": "09:00",
"saturday_to": "17:00",
"sunday_from": "09:00",
"sunday_to": "17:00"
},
"capability": {
"max_extensions": -1,
"max_concurrent_calls": -1,
"max_ring_groups": -1,
"max_virtual_receptionists": -1,
"max_call_queues": -1,
"max_conference_rooms": -1
},
"mail_server": {
"smtp_server": "sample.com",
"smtp_server_port": 12345,
"smtp_reply_addr": "sample@sample.com",
"smtp_username": "sample name",
"smtp_passwd": "sample password",
"smtp_security_type": "NO_SECURITY"
},
"quota": {
"max_recordings_quota": 0,
"max_voicemail_quota": 0,
"max_call_report_quota": 0,
"auto_clean_recordings_days": 7,
"auto_clean_voicemail_days": 7,
"auto_clean_call_reports_days": 7,
"used_recordings_quota": 100,
"used_voicemail_quota": 100,
"used_call_report_quota": 100
},
"cdr": {
"enabled": true,
"authentication_method": "GET",
"username": "username",
"password": "password",
"cdr_url": "http://www.cdr-url.com"
},
"extension_event": {
"enabled": true,
"auth_method": "GET",
"username": "username",
"password": "password",
"event_url": "http://www.extension-event-url.com"
},
"sms": {
"enabled": true,
"provider": "clickatell",
"token": "example token"
}
}
Update account
Request
access_token
string
required
Access token is a 32-byte string with validity of 30 seconds.username
string
required
The name of tenant or admin user. It's used for logging into PortSIP PBX.domain
string
required
The domain of tenant or admin user.enabled
boolean
required
Indicates if it has been enabled for the new user.profile
object
required
Show child attributesProfile settings for tenant.office_hours
object
required
Show child attributesOffice hours settings for tenant.capability
object
required
Show child attributesCapability settings for tenant.mail_server
object
required
Show child attributesSMTP settings for tenant.quota
object
required
Show child attributesQuota for tenant.cdr
object
required
Show child attributesCDR settings for tenant.extension_event
object
required
Show child attributesExtension event for tenant.sms
object
required
Show child attributesSMS for tenant.
Sample Request
{
"access_token": "196ACE20C6F34027895F7F95402BB164",
"username": "tenant",
"domain": "example.com",
"enabled": true,
"profile": {
"first_name": "first name",
"last_name": "last name",
"email": "example@example.com",
"company_name": "example company name",
"company_website": "example website",
"region": "China",
"timezone": "(UTC+08:00) Beijing, Chongqing, Hong Kong, Urumqi",
"currency": "USD",
"billing_for_outbound_calls": false,
"billing_for_inbound_calls": false,
"enable_extension_change_password": true,
"enable_extension_video_recording": false,
"enable_extension_audio_recording": false
},
"office_hours": {
"monday_from": "09:00",
"monday_to": "17:00",
"tuesday_from": "09:00",
"tuesday_to": "17:00",
"wednesday_from": "09:00",
"wednesday_to": "17:00",
"thursday_from": "09:00",
"thursday_to": "17:00",
"friday_from": "09:00",
"friday_to": "17:00",
"saturday_from": "09:00",
"saturday_to": "17:00",
"sunday_from": "09:00",
"sunday_to": "17:00"
},
"capability": {
"max_extensions": -1,
"max_concurrent_calls": -1,
"max_ring_groups": -1,
"max_virtual_receptionists": -1,
"max_call_queues": -1,
"max_conference_rooms": -1
},
"mail_server": {
"smtp_server": "sample.com",
"smtp_server_port": 12345,
"smtp_reply_addr": "sample@sample.com",
"smtp_username": "sample name",
"smtp_passwd": "sample password",
"smtp_security_type": "NO_SECURITY"
},
"quota": {
"max_recordings_quota": 0,
"max_voicemail_quota": 0,
"max_call_report_quota": 0,
"auto_clean_recordings_days": 7,
"auto_clean_voicemail_days": 7,
"auto_clean_call_reports_days": 7
},
"cdr": {
"enabled": true,
"authentication_method": "GET",
"username": "username",
"password": "password",
"cdr_url": "http://www.cdr-url.com"
},
"extension_event": {
"enabled": true,
"auth_method": "GET",
"username": "username",
"password": "password",
"event_url": "http://www.extension-event-url.com"
},
"sms": {
"enabled": true,
"provider": "clickatell",
"token": "example token"
}
}
Response
Sample Response
Delete account
Request
access_token
string
required
Access token is a 32-byte string with validity of 30 seconds.username
string
required
The username of the tenant to be deleted.
Sample Request
{
"access_token": "196ACE20C6F34027895F7F95402BB164",
"username": "tenant"
}
Response
Sample Response
Account sign out
Request
access_token
string
required
Access token is a 32-byte string with validity of 30 seconds.
Sample Request
{
"access_token": "196ACE20C6F34027895F7F95402BB164"
}
Response
Sample Response
Periodic refreshment of access token
Request
access_token
string
required
Access token is a 32-byte string with validity of 30 seconds.
Sample Request
{
"access_token": "196ACE20C6F34027895F7F95402BB164"
}
Response
expires
integer
required
Time interval for access token expiration, in seconds. The access token will be invalid if it is not refreshed before the expiration.
Sample Response
{
"expires": 600
}