For the complete documentation index, see llms.txt. This page is also available as Markdown.

Administrations

Manage PBX System.

Retrieve network configurations

get

Get network configurations.

Authorizations
AuthorizationstringRequired
Bearer authentication header of the form Bearer <token>.
Responses
200

OK

application/json
web_domainstringOptional

The web domain for PortSIP PBX

private_ipv4stringOptional

The private IPv4 of system.

public_ipv4stringOptional

The public IPv4 of system.

enable_ipv6booleanOptional

Indicates if IPv6 would be enabled.

Default: true
private_ipv6stringOptional

The private IPv6 of system.

public_ipv6stringOptional

The public IPv6 of system.

primary_dns_serverstringOptional

The primary DNS server.

secondary_dns_serverstringOptional

The secondary DNS server.

sbc_domainstringOptional

The SBC domain.

get/network
GET /api/network HTTP/1.1
Host: HOSTNAME:8887
Authorization: Bearer YOUR_SECRET_TOKEN
Accept: */*
{
  "web_domain": "example.com",
  "private_ipv4": "127.0.0.1",
  "public_ipv4": "192.0.2.0",
  "enable_ipv6": true,
  "private_ipv6": "::1",
  "public_ipv6": "2001:0db8:0a0b:12f0::1",
  "primary_dns_server": "",
  "secondary_dns_server": "",
  "sbc_domain": "example.com"
}

Update network configurations

post

Update network configurations for PortSIP PBX.

Authorizations
AuthorizationstringRequired
Bearer authentication header of the form Bearer <token>.
Body
web_domainstringOptional

The web domain for PortSIP PBX

private_ipv4stringOptional

The private IPv4 of system.

public_ipv4stringOptional

The public IPv4 of system.

enable_ipv6booleanOptional

Indicates if IPv6 would be enabled.

Default: true
private_ipv6stringOptional

The private IPv6 of system.

public_ipv6stringOptional

The public IPv6 of system.

primary_dns_serverstringOptional

The primary DNS server.

secondary_dns_serverstringOptional

The secondary DNS server.

Responses
200

OK

No content

post/network
POST /api/network HTTP/1.1
Host: HOSTNAME:8887
Authorization: Bearer YOUR_SECRET_TOKEN
Content-Type: application/json
Accept: */*
Content-Length: 210

{
  "web_domain": "example.com",
  "private_ipv4": "127.0.0.1",
  "public_ipv4": "192.0.2.0",
  "enable_ipv6": true,
  "private_ipv6": "::1",
  "public_ipv6": "2001:0db8:0a0b:12f0::1",
  "primary_dns_server": "",
  "secondary_dns_server": ""
}

No content

List users

get

List a collection of users.

Authorizations
AuthorizationstringRequired
Bearer authentication header of the form Bearer <token>.
Query parameters
filterstringOptional

Use the filter query parameter to retrieve just a subset of a collection.

searchstringOptional

Use the search query parameter to restrict the results of a request to match a search criterion.

orderbystringOptional

Use the orderby query parameter to specify the sort order of the items returned from server.
The default order is ascending order.

skipinteger · int32Optional

Use the skip query parameter to set the number of items to skip at the start of a collection.

Default: 0
topinteger · int32 · min: 1 · max: 100Optional

Use the top query parameter to specify the page size of the result set.

Default: 100
Responses
200

OK

application/json
countinteger · int64Optional

Total number of resource.

Example: 100
get/admin/users
GET /api/admin/users HTTP/1.1
Host: HOSTNAME:8887
Authorization: Bearer YOUR_SECRET_TOKEN
Accept: */*
{
  "count": 1,
  "items": [
    {
      "id": "xxxxxx",
      "name": "example",
      "enabled": true,
      "protected": false,
      "email": "example@example.com",
      "display_name": "example",
      "role_id": "xxxxxx",
      "role_name": "example",
      "mobile_phone": "",
      "work_phone": "",
      "home_phone": "",
      "address": "",
      "department": "",
      "website": "https://example.com",
      "timezone": "UTC",
      "created_at": "2020-01-01T00:00:00Z",
      "login_at": "2020-01-01T00:00:00Z",
      "logout_at": "2020-01-01T00:00:00Z",
      "avatar_file_name": "example",
      "avatar_file_size": 123,
      "avatar_file_url": ""
    }
  ]
}

Create a user

post

Create a user.

Authorizations
AuthorizationstringRequired
Bearer authentication header of the form Bearer <token>.
Body
namestring · min: 1 · max: 64Required

The user's account name.
Only letters, numbers, and the following special characters can be added: underscore, dash, single quote, and period (_, -, ', and .).
Username cannot start or end with period (.).
admin, system, administrator, and root are reserved names for system admin only with case ignored.

passwordstringRequired

The password of user.

emailstring · max: 128Required

The email address.

Example: example@example.com
display_namestring · min: 1 · max: 128Required

The display name of user.

enabledbooleanOptional

Whether user is enabled.

Default: true
rolestring · min: 1 · max: 64Required

Roles include built-in roles and custom roles.
Built-in roles roles cannot be modified.
Also, the names of built-in roles are reserved words,
custom roles are not allowed to use these names to avoid unnecessary confusion.
Built-in roles include:

  • SystemAdmin: the system administrator has almost all permissions.
  • OperationsAdmin: the operations administrator.
  • SiteAdmin: the site administrator.
  • Dealer: the sales manager has all sold tenant resource permissions.
  • Admin: the admin has all tenant-wide resource permissions.
  • StandardUser: the user all user-wide resource permissions.
  • StandardInternationalUser: the user all user-wide resource permissions with international call permissions.
  • QueueManager: The call queue manager.
Example: User
mobile_phonestring · max: 32Optional

The mobile phone number of user.

work_phonestring · max: 32Optional

The office phone number of user.

home_phonestring · max: 32Optional

The home phone number of user.

addressstring · max: 128Optional

The address.

departmentstring · max: 128Optional

The department of user.

websitestringOptional

The website of user.

timezonestringRequired

The IANA Time Zone names, such as "Asia/Shanghai".

Responses
201

Created

application/json
idstringOptionalExample: NzAwNTUxOTA5NzczMTQ4MTYw
post/admin/users
POST /api/admin/users HTTP/1.1
Host: HOSTNAME:8887
Authorization: Bearer YOUR_SECRET_TOKEN
Content-Type: application/json
Accept: */*
Content-Length: 241

{
  "name": "xxxxxx",
  "password": "xxxxxx",
  "email": "example@example.com",
  "display_name": "example",
  "enabled": true,
  "role": "OperationsAdmin",
  "mobile_phone": "",
  "work_phone": "",
  "home_phone": "",
  "address": "",
  "department": "",
  "website": "",
  "timezone": "UTC"
}
{
  "id": "xxxxxxxx"
}

Get a user

get

Retrieves information of a user.

Authorizations
AuthorizationstringRequired
Bearer authentication header of the form Bearer <token>.
Path parameters
idstringRequiredExample: NzAwNTUxOTA5NzczMTQ4MTYw
Responses
200

OK

application/json
idstringOptionalExample: NzAwNTUxOTA5NzczMTQ4MTYw
namestring · min: 1 · max: 64Optional

The user's account name.
Only letters, numbers, and the following special characters can be added: underscore, dash, single quote, and period (_, -, ', and .).
Username cannot start or end with period (.).
admin, system, administrator, and root are reserved names for system admin only with case ignored.

emailstring · max: 128Optional

The email address.

Example: example@example.com
display_namestring · min: 1 · max: 128Optional

The display name of user.

role_idstringOptionalExample: NzAwNTUxOTA5NzczMTQ4MTYw
role_namestring · min: 1 · max: 64Optional

Roles include built-in roles and custom roles.
Built-in roles roles cannot be modified.
Also, the names of built-in roles are reserved words,
custom roles are not allowed to use these names to avoid unnecessary confusion.
Built-in roles include:

  • SystemAdmin: the system administrator has almost all permissions.
  • OperationsAdmin: the operations administrator.
  • SiteAdmin: the site administrator.
  • Dealer: the sales manager has all sold tenant resource permissions.
  • Admin: the admin has all tenant-wide resource permissions.
  • StandardUser: the user all user-wide resource permissions.
  • StandardInternationalUser: the user all user-wide resource permissions with international call permissions.
  • QueueManager: The call queue manager.
Example: User
enabledbooleanOptional

Whether user is enabled.

Default: true
protectedbooleanRead-onlyOptional

Whether user is protected.

Default: false
mobile_phonestring · max: 32Optional

The mobile phone number of user.

work_phonestring · max: 32Optional

The office phone number of user.

home_phonestring · max: 32Optional

The home phone number of user.

addressstring · max: 128Optional

The address.

departmentstring · max: 128Optional

The department of user.

websitestringOptional

The website of user.

timezonestringOptional

The IANA Time Zone names, such as "Asia/Shanghai".

created_atstring · date_timeOptional

The RFC 3339 format is defined by The date_time notation as defined by RFC 3339, section 5.6, for example, 2017-07-21T17:32:28Z

Example: 2017-07-21T17:32:28Z
login_atstring · date_timeOptional

The RFC 3339 format is defined by The date_time notation as defined by RFC 3339, section 5.6, for example, 2017-07-21T17:32:28Z

Example: 2017-07-21T17:32:28Z
logout_atstring · date_timeOptional

The RFC 3339 format is defined by The date_time notation as defined by RFC 3339, section 5.6, for example, 2017-07-21T17:32:28Z

Example: 2017-07-21T17:32:28Z
avatar_file_namestringOptional

The name of the file.

avatar_file_sizeinteger · int64Optional

The file size in bytes.

Example: 0
avatar_file_urlstringRead-onlyOptional

The relative path to file url for file downloading.

Example: /api/blobs/WexWdABcd5D4PDgzTKV3gAAAEu00WcK
get/admin/users/{id}
GET /api/admin/users/{id} HTTP/1.1
Host: HOSTNAME:8887
Authorization: Bearer YOUR_SECRET_TOKEN
Accept: */*
{
  "id": "xxxxxx",
  "name": "user",
  "email": "example@example.com",
  "display_name": "example",
  "role_id": "xxxxxx",
  "role_name": "OperationsAdmin",
  "enabled": true,
  "protected": false,
  "mobile_phone": "",
  "work_phone": "",
  "home_phone": "",
  "address": "",
  "department": "",
  "website": "https://example.com",
  "timezone": "UTC",
  "created_at": "2020-01-01T00:00:00Z",
  "login_at": "2020-01-01T00:00:00Z",
  "logout_at": "2020-01-01T00:00:00Z",
  "avatar_file_name": "example",
  "avatar_file_size": 123,
  "avatar_file_url": ""
}

Update a user

post

Change configurations of user.

Authorizations
AuthorizationstringRequired
Bearer authentication header of the form Bearer <token>.
Path parameters
idstringRequiredExample: NzAwNTUxOTA5NzczMTQ4MTYw
Body
emailstring · max: 128Optional

The email address.

Example: example@example.com
display_namestring · min: 1 · max: 128Optional

The display name of user.

enabledbooleanOptional

Whether user is enabled.

Default: true
mobile_phonestring · max: 32Optional

The mobile phone number of user.

work_phonestring · max: 32Optional

The office phone number of user.

home_phonestring · max: 32Optional

The home phone number of user.

addressstring · max: 128Optional

The address.

departmentstring · max: 128Optional

The department of user.

websitestringOptional

The website of user.

timezonestringOptional

The IANA Time Zone names, such as "Asia/Shanghai".

Responses
200

OK

No content

post/admin/users/{id}
POST /api/admin/users/{id} HTTP/1.1
Host: HOSTNAME:8887
Authorization: Bearer YOUR_SECRET_TOKEN
Content-Type: application/json
Accept: */*
Content-Length: 199

{
  "email": "example@example.com",
  "display_name": "example",
  "enabled": true,
  "mobile_phone": "",
  "work_phone": "",
  "home_phone": "",
  "address": "",
  "department": "",
  "website": "https://example.com",
  "timezone": "UTC"
}

No content

Change username

post

Change admin user username.

Authorizations
AuthorizationstringRequired
Bearer authentication header of the form Bearer <token>.
Path parameters
idstringRequiredExample: NzAwNTUxOTA5NzczMTQ4MTYw
Body
namestring · min: 1 · max: 64Required

The user's account name.
Only letters, numbers, and the following special characters can be added: underscore, dash, single quote, and period (_, -, ', and .).
Username cannot start or end with period (.).
admin, system, administrator, and root are reserved names for system admin only with case ignored.

Responses
200

OK

No content

post/admin/users/{id}/username
POST /api/admin/users/{id}/username HTTP/1.1
Host: HOSTNAME:8887
Authorization: Bearer YOUR_SECRET_TOKEN
Content-Type: application/json
Accept: */*
Content-Length: 18

{
  "name": "example"
}

No content

Change user password

post

Change admin user password.

Authorizations
AuthorizationstringRequired
Bearer authentication header of the form Bearer <token>.
Path parameters
idstringRequiredExample: NzAwNTUxOTA5NzczMTQ4MTYw
Body
passwordstringRequired

The password of system admin.

Responses
200

OK

No content

post/admin/users/{id}/password
POST /api/admin/users/{id}/password HTTP/1.1
Host: HOSTNAME:8887
Authorization: Bearer YOUR_SECRET_TOKEN
Content-Type: application/json
Accept: */*
Content-Length: 27

{
  "password": "xxxxxxxxxxxx"
}

No content

Change user role

post

Change admin user role.

Authorizations
AuthorizationstringRequired
Bearer authentication header of the form Bearer <token>.
Path parameters
idstringRequiredExample: NzAwNTUxOTA5NzczMTQ4MTYw
Body
rolestring · min: 1 · max: 64Optional

Roles include built-in roles and custom roles.
Built-in roles roles cannot be modified.
Also, the names of built-in roles are reserved words,
custom roles are not allowed to use these names to avoid unnecessary confusion.
Built-in roles include:

  • SystemAdmin: the system administrator has almost all permissions.
  • OperationsAdmin: the operations administrator.
  • SiteAdmin: the site administrator.
  • Dealer: the sales manager has all sold tenant resource permissions.
  • Admin: the admin has all tenant-wide resource permissions.
  • StandardUser: the user all user-wide resource permissions.
  • StandardInternationalUser: the user all user-wide resource permissions with international call permissions.
  • QueueManager: The call queue manager.
Example: User
Responses
200

OK

No content

post/admin/users/{id}/role
POST /api/admin/users/{id}/role HTTP/1.1
Host: HOSTNAME:8887
Authorization: Bearer YOUR_SECRET_TOKEN
Content-Type: application/json
Accept: */*
Content-Length: 26

{
  "role": "OperationsAdmin"
}

No content

Delete a user

post

Delete a user.

Authorizations
AuthorizationstringRequired
Bearer authentication header of the form Bearer <token>.
Path parameters
idstringRequiredExample: NzAwNTUxOTA5NzczMTQ4MTYw
Responses
204

No Content

No content

post/admin/users/{id}/destroy
POST /api/admin/users/{id}/destroy HTTP/1.1
Host: HOSTNAME:8887
Authorization: Bearer YOUR_SECRET_TOKEN
Accept: */*

No content

Get current user

get

Retrieves information about the currently logged-in administrator user.

Authorizations
AuthorizationstringRequired
Bearer authentication header of the form Bearer <token>.
Responses
200

OK

application/json
idstringOptionalExample: NzAwNTUxOTA5NzczMTQ4MTYw
namestring · min: 1 · max: 64Optional

The user's account name.
Only letters, numbers, and the following special characters can be added: underscore, dash, single quote, and period (_, -, ', and .).
Username cannot start or end with period (.).
admin, system, administrator, and root are reserved names for system admin only with case ignored.

emailstring · max: 128Optional

The email address.

Example: example@example.com
display_namestring · min: 1 · max: 128Optional

The display name of user.

role_idstringOptionalExample: NzAwNTUxOTA5NzczMTQ4MTYw
role_namestring · min: 1 · max: 64Optional

Roles include built-in roles and custom roles.
Built-in roles roles cannot be modified.
Also, the names of built-in roles are reserved words,
custom roles are not allowed to use these names to avoid unnecessary confusion.
Built-in roles include:

  • SystemAdmin: the system administrator has almost all permissions.
  • OperationsAdmin: the operations administrator.
  • SiteAdmin: the site administrator.
  • Dealer: the sales manager has all sold tenant resource permissions.
  • Admin: the admin has all tenant-wide resource permissions.
  • StandardUser: the user all user-wide resource permissions.
  • StandardInternationalUser: the user all user-wide resource permissions with international call permissions.
  • QueueManager: The call queue manager.
Example: User
enabledbooleanOptional

Whether user is enabled.

Default: true
protectedbooleanRead-onlyOptional

Whether user is protected.

Default: false
mobile_phonestring · max: 32Optional

The mobile phone number of user.

work_phonestring · max: 32Optional

The office phone number of user.

home_phonestring · max: 32Optional

The home phone number of user.

addressstring · max: 128Optional

The address.

departmentstring · max: 128Optional

The department of user.

websitestringOptional

The website of user.

created_atstring · date_timeOptional

The RFC 3339 format is defined by The date_time notation as defined by RFC 3339, section 5.6, for example, 2017-07-21T17:32:28Z

Example: 2017-07-21T17:32:28Z
login_atstring · date_timeOptional

The RFC 3339 format is defined by The date_time notation as defined by RFC 3339, section 5.6, for example, 2017-07-21T17:32:28Z

Example: 2017-07-21T17:32:28Z
logout_atstring · date_timeOptional

The RFC 3339 format is defined by The date_time notation as defined by RFC 3339, section 5.6, for example, 2017-07-21T17:32:28Z

Example: 2017-07-21T17:32:28Z
avatar_file_namestringOptional

The name of the file.

avatar_file_sizeinteger · int64Optional

The file size in bytes.

Example: 0
avatar_file_urlstringRead-onlyOptional

The relative path to file url for file downloading.

Example: /api/blobs/WexWdABcd5D4PDgzTKV3gAAAEu00WcK
get/admin/user
GET /api/admin/user HTTP/1.1
Host: HOSTNAME:8887
Authorization: Bearer YOUR_SECRET_TOKEN
Accept: */*
{
  "id": "xxxxxx",
  "name": "user",
  "email": "example@example.com",
  "display_name": "example",
  "role_id": "xxxxxx",
  "role_name": "SystemAdmin",
  "enabled": true,
  "protected": true,
  "mobile_phone": "",
  "work_phone": "",
  "home_phone": "",
  "address": "",
  "department": "",
  "website": "https://example.com",
  "created_at": "2020-01-01T00:00:00Z",
  "login_at": "2020-01-01T00:00:00Z",
  "logout_at": "2020-01-01T00:00:00Z",
  "avatar_file_name": "example",
  "avatar_file_size": 123,
  "avatar_file_url": ""
}

Update current user

post

Change configurations of currently logged-in administrator user.

Authorizations
AuthorizationstringRequired
Bearer authentication header of the form Bearer <token>.
Body
emailstring · max: 128Optional

The email address.

Example: example@example.com
display_namestring · min: 1 · max: 128Optional

The display name of user.

mobile_phonestring · max: 32Optional

The mobile phone number of user.

work_phonestring · max: 32Optional

The office phone number of user.

home_phonestring · max: 32Optional

The home phone number of user.

addressstring · max: 128Optional

The address.

departmentstring · max: 128Optional

The department of user.

websitestringOptional

The website of user.

Responses
200

OK

No content

post/admin/user
POST /api/admin/user HTTP/1.1
Host: HOSTNAME:8887
Authorization: Bearer YOUR_SECRET_TOKEN
Content-Type: application/json
Accept: */*
Content-Length: 167

{
  "email": "example@example.com",
  "display_name": "example",
  "mobile_phone": "",
  "work_phone": "",
  "home_phone": "",
  "address": "",
  "department": "",
  "website": "https://example.com"
}

No content

Change current user username

post

Change current admin user username.

Authorizations
AuthorizationstringRequired
Bearer authentication header of the form Bearer <token>.
Body
namestring · min: 1 · max: 64Required

The user's account name.
Only letters, numbers, and the following special characters can be added: underscore, dash, single quote, and period (_, -, ', and .).
Username cannot start or end with period (.).
admin, system, administrator, and root are reserved names for system admin only with case ignored.

Responses
200

OK

No content

post/admin/user/username
POST /api/admin/user/username HTTP/1.1
Host: HOSTNAME:8887
Authorization: Bearer YOUR_SECRET_TOKEN
Content-Type: application/json
Accept: */*
Content-Length: 18

{
  "name": "example"
}

No content

Change current user password

post

Change current admin user password.

Authorizations
AuthorizationstringRequired
Bearer authentication header of the form Bearer <token>.
Body
old_passwordstringRequired

The password of system admin.

new_passwordstringRequired

The password of system admin.

Responses
200

OK

No content

post/admin/user/password
POST /api/admin/user/password HTTP/1.1
Host: HOSTNAME:8887
Authorization: Bearer YOUR_SECRET_TOKEN
Content-Type: application/json
Accept: */*
Content-Length: 49

{
  "old_password": "xxxxxx",
  "new_password": "xxxxxx"
}

No content

Retrieve current system status

get

Get current status of system.

Authorizations
AuthorizationstringRequired
Bearer authentication header of the form Bearer <token>.
Responses
200

OK

application/json
versionstringOptional

The version information of PortSIP PBX.

newsstringOptional

The news information of PortSIP PBX.

license_keystringOptional

The license key of PortSIP PBX. It may be an empty string for a node or floating result representing an installation without a Key. A modular result always contains a Key.

license_typestringOptional

The effective License type (node, floating, or modular). The value is read from the shared system License snapshot when available. Only modular enables module quotas.

maintenance_expires_atstring · date_timeOptional

The RFC 3339 format is defined by The date_time notation as defined by RFC 3339, section 5.6, for example, 2017-07-21T17:32:28Z

Example: 2017-07-21T17:32:28Z
max_concurrent_callsinteger · int32Optional

The number of authorized concurrent calls purchased by the user.

licensed_usersinteger · int32Optional

The maximum number of authorized users purchased by the system admin. For a modular License this is the user limit from the committed shared License snapshot; runtime telemetry remains sourced from CallManager.

current_usersinteger · int32Optional

The number of current users of the system.

online_usersinteger · int32Optional

The number of current online users of the system.

current_tenantsinteger · int32Optional

The number of current tenants of the system.

current_dealersinteger · int32Optional

The number of current dealers of the system.

current_callsinteger · int32Optional

The current number of calls.

current_trunksinteger · int32Optional

The current number of trunks.

current_conference_serversinteger · int32Optional

The current number of conference servers.

current_media_serversinteger · int32Optional

The current number of media servers.

current_call_queue_serversinteger · int32Optional

The current number of call queue servers.

current_ivr_serversinteger · int32Optional

The current number of ivr servers.

get/admin/status
GET /api/admin/status HTTP/1.1
Host: HOSTNAME:8887
Authorization: Bearer YOUR_SECRET_TOKEN
Accept: */*
{
  "version": "",
  "news": "",
  "license_key": "",
  "license_type": "modular",
  "maintenance_expires_at": "2020-01-01T00:00:00Z",
  "max_concurrent_calls": 100,
  "licensed_users": 100,
  "current_users": 100,
  "online_users": 100,
  "current_tenants": 100,
  "current_dealers": 10,
  "current_calls": 100,
  "current_trunks": 100,
  "current_conference_servers": 10,
  "current_media_servers": 10,
  "current_call_queue_servers": 10,
  "current_ivr_servers": 10,
  "license_usage": {
    "base": {
      "max": 100,
      "allocated": 80,
      "used": 75
    },
    "cc": {
      "max": 50,
      "allocated": 30,
      "used": 25
    },
    "advanced": {
      "max": 20,
      "allocated": 10,
      "used": 8
    }
  }
}

Retrieve system settings

get

Retrieve settings for PortSIP PBX.

Authorizations
AuthorizationstringRequired
Bearer authentication header of the form Bearer <token>.
Responses
200

OK

application/json
user_agentstring · min: 1 · max: 1024Optional

User agent.

Default: PortSIP UC
blocked_user_agentsstringOptional

The semicolon separated list of blocked user agents.

enable_shared_address_space_address_rangebooleanOptional

Enable Shared Address Space Address Range or not (RFC 6598).

Default: true
enable_digest_authbooleanOptional

Indicates if DIGEST authentication would be enabled.

Default: true
enable_auth_mid_dialogbooleanOptional

Indicates if PortSIP PBX requires authentication against all subsequent requests originated from one calling.

Default: false
enable_digest_auth_intbooleanOptional

Indicates if auth-int DIGEST authentication mode would be enabled.

Default: false
enable_external_recordingbooleanOptional

Allow external calls recording.

Default: true
enable_reject_bad_noncebooleanOptional

When a client sends a bad nonce in their credentials, return 403 message if this parameter is true, or send a new challenge if this parameter is false.

Default: false
statistics_log_intervalinteger · int32Optional

Interval for statistics logs, in seconds.

Default: 600
dead_session_timeoutinteger · int32Optional

Close the session if no RTP packets received within specified duration, in seconds.

Default: 600
enable_session_timerbooleanOptional

Indicates if session timer (RFC 4028) would be enabled. This also requires client support.

Default: true
session_timer_durationinteger · int32 · min: 90 · max: 3600Optional

Duration recorded by Session timer. Precondition: "enable_session_timer" MUST be set to true.

Default: 3600
enable_to_tag_in_registerbooleanOptional

Indicates if "to" tag is allowed in REGISTER message.

Default: false
enable_two_factor_authenticationbooleanOptional

Enable two factor authentication for users.

Default: false
enable_verify_phone_auto_provisioningbooleanOptional

Enable voicemail PIN verification for IP phone auto-provisioning.
When enabled, IP phones must provide voicemail PIN to download configuration files.

Default: false
verify_phone_auto_provisioning_excludestring[]Optional

JSON array of phone vendor names excluded from voicemail PIN verification during auto-provisioning. If a phone's vendor is in this list, it will skip PIN verification when downloading configuration files.

enable_congestion_managementbooleanOptional

Indicates if congestion management would be enabled.

Default: true
congestion_management_metricstring · enumOptional

Precondition: "enable_congestion_management" parameter MUST be set to true. The recommended is WAIT_TIME based on the expected wait time for each FIFO.

  • WAIT_TIME:
  • TIME_DEPTH:
  • SIZE:
Possible values:
congestion_management_toleranceinteger · int32Optional

Precondition: "enable_congestion_management" parameter MUST be set to true. Congestion management tolerance for the given metric. This parameter determines when the Rejection Behavior changes.

Default: 600
enable_create_non_exist_extensionbooleanOptional

Indicates if the extension would be automatically created when a non-existent extension try to register. If it is set to true, when a non-included extension tries to send registry message to PBX, the PBX will create the extension with default password "portsip" automatically.

Default: false
enable_prackbooleanOptional

Enable prack or not.

Default: false
enable_tenant_level_trunkbooleanOptional

Whether to enable tenant-level trunk.

Default: true
enable_diversion_supportbooleanOptional

Enable Diversion support or not (RFC 5806).

Default: false
enable_history_info_supportbooleanOptional

Enable History-Info support (RFC 7044).

Default: false
enable_outbound_supportbooleanOptional

Enable Outbound Support or not (RFC 5626).

Default: true
flow_timerinteger · int32Optional

The flow timer interval in seconds.

Default: 0
register_expiration_timeinteger · min: 90 · max: 3600Optional

The register expiration time in seconds.

Default: 300
enable_auto_answer_alert_info_headerbooleanOptional

Enable call-info header for auto answer or not.

Default: false
auto_answer_alert_info_headerstring · enumOptional

Alert-info header to be added in INVITE message when PBX is forwarding the page/intercom. Values includes:

  • INTERCOM: info=intercom.
  • ALERT_AUTO_ANSWER: Alert-Info:;info=alert-autoanswer;delay=0.
  • AUTO_ANSWER: info=Auto Answer.
Possible values:
enable_auto_answer_call_info_headerbooleanOptional

Enable call-info header for auto answer. The value is "sip:portsip.com;answer-after=0".

Default: true
enable_require_answer_modebooleanOptional

Enable Require Answer Mode (RFC 5373) for auto answer.

Default: false
enable_www_authbooleanOptional

Enable WWW authentication or not.

Default: false
user_equal_required_for_auth_namebooleanOptional

User equal required for authentication name.

Default: true
trace_server_hoststringOptional

Tracer server host.

trace_server_portinteger · int32 · max: 65535Optional

A port number is a 16-bit unsigned integer, thus ranging from 0 to 65535. For TCP, port number 0 is reserved and cannot be used, while for UDP, the source port is optional and a value of zero means no port

Example: 80
web_failed_auth_amountinteger · int32Optional

Block if failed to login PortSIP PBX Web more than this times.

Default: 5
web_blacklist_time_intervalinteger · int32Optional

The web blocked time in seconds.

Default: 3600
sip_failed_auth_amountinteger · int32Optional

The number of authentication failures.

Default: 50
sip_failed_challenge_requests_amountinteger · int32Optional

DOS attacks can send REGISTER/INVITE requests but do not reply to Challenge (407). Configure the amount of "fake" requests that PortSIP PBX will accept per IP Address. If this value is exceeded in "Detection Period" interval the source IP address is put in the Blacklist. IP will remain blacklisted till "SIP Blacklist time interval" expires.

Default: 1000
sip_blacklist_time_intervalinteger · int32Optional

The sip blocked time in seconds.

Default: 3600
sip_detection_periodinteger · int32Optional

The detection period in seconds.

Default: 10
sip_barrier_1_packetsinteger · int32Optional

If the amount of packets is exceeded, the PBX will block the source IP for "Level 1 blacklist time interval" seconds.

Default: 5000
sip_barrier_1_blocking_timeinteger · int32Optional

This is the time interval in seconds that an abusive IP Address remains in the blacklist

Default: 3600
sip_barrier_2_packetsinteger · int32Optional

If the amount of packets is exceeded, the PBX will block the source IP for "Level 2 blacklist time interval" seconds.

Default: 2000
sip_barrier_2_blocking_timeinteger · int32Optional

This is the time interval in seconds that an abusive IP Address remains in the blacklist

Default: 30
stir_shaken_certstringOptional

Content of this certificate file for STIR/SHAKEN support.

stir_shaken_keystringOptional

Content of this private certificate file for STIR/SHAKEN support.

custom_optionsstringOptional

Some custom configuration options serialized as json string.

enable_sip603_reason_headerbooleanOptional

Controls whether the PBX includes an enhanced Reason header in SIP 603 (Decline) responses. When enabled:

  • For extension calls, the PBX responds with SIP 603 and includes a Reason header with analytics information and location set to "LPN".
  • For trunk calls, the PBX responds with SIP 603 and includes a Reason header with analytics information and location set to "RPN". When disabled:
  • The PBX responds with standard SIP 603 without a Reason header.
Default: true
hide_pbx_private_ipbooleanOptional

Hide private network information or not.

Default: false
hide_not_deployed_server_warningsbooleanOptional

Hide warnings when some server is not deployed.

Default: false
get/admin/settings
GET /api/admin/settings HTTP/1.1
Host: HOSTNAME:8887
Authorization: Bearer YOUR_SECRET_TOKEN
Accept: */*
{
  "user_agent": "example",
  "blocked_user_agents": "",
  "enable_shared_address_space_address_range": true,
  "enable_digest_auth": true,
  "enable_auth_mid_dialog": true,
  "enable_digest_auth_int": true,
  "enable_external_recording": true,
  "enable_reject_bad_nonce": true,
  "statistics_log_interval": 600,
  "dead_session_timeout": 600,
  "enable_session_timer": true,
  "session_timer_duration": 3600,
  "enable_to_tag_in_register": true,
  "enable_congestion_management": true,
  "congestion_management_metric": "WAIT_TIME",
  "congestion_management_tolerance": 600,
  "enable_create_non_exist_extension": true,
  "enable_verify_phone_auto_provisioning": true,
  "verify_phone_auto_provisioning_exclude": [
    "Snom",
    "Yealink"
  ],
  "enable_two_factor_authentication": true,
  "enable_prack": true,
  "enable_tenant_level_trunk": true,
  "enable_diversion_support": true,
  "enable_history_info_support": true,
  "enable_outbound_support": true,
  "flow_timer": 0,
  "register_expiration_time": 300,
  "enable_auto_answer_alert_info_header": true,
  "auto_answer_alert_info_header": "INTERCOM",
  "enable_auto_answer_call_info_header": true,
  "enable_require_answer_mode": true,
  "enable_www_auth": true,
  "user_equal_required_for_auth_name": true,
  "trace_server_host": "",
  "trace_server_port": 1000,
  "web_failed_auth_amount": 5,
  "web_blacklist_time_interval": 3600,
  "sip_failed_auth_amount": 50,
  "sip_failed_challenge_requests_amount": 1000,
  "sip_blacklist_time_interval": 3600,
  "sip_detection_period": 10,
  "sip_barrier_1_packets": 5000,
  "sip_barrier_1_blocking_time": 3600,
  "sip_barrier_2_packets": 2000,
  "sip_barrier_2_blocking_time": 30,
  "stir_shaken_cert": "",
  "stir_shaken_key": "",
  "custom_options": "",
  "enable_sip603_reason_header": true,
  "hide_pbx_private_ip": false,
  "hide_not_deployed_server_warnings": false
}

Update system settings

post

Update settings for PortSIP PBX

Authorizations
AuthorizationstringRequired
Bearer authentication header of the form Bearer <token>.
Body
user_agentstring · min: 1 · max: 1024Optional

User agent.

Default: PortSIP UC
blocked_user_agentsstringOptional

The semicolon separated list of blocked user agents.

enable_shared_address_space_address_rangebooleanOptional

Enable Shared Address Space Address Range or not (RFC 6598).

Default: true
enable_digest_authbooleanOptional

Indicates if DIGEST authentication would be enabled.

Default: true
enable_auth_mid_dialogbooleanOptional

Indicates if PortSIP PBX requires authentication against all subsequent requests originated from one calling.

Default: false
enable_digest_auth_intbooleanOptional

Indicates if auth-int DIGEST authentication mode would be enabled.

Default: false
enable_external_recordingbooleanOptional

Allow external calls recording.

Default: true
enable_reject_bad_noncebooleanOptional

When a client sends a bad nonce in their credentials, return 403 message if this parameter is true, or send a new challenge if this parameter is false.

Default: false
statistics_log_intervalinteger · int32Optional

Interval for statistics logs, in seconds.

Default: 600
dead_session_timeoutinteger · int32Optional

Close the session if no RTP packets received within specified duration, in seconds.

Default: 600
enable_session_timerbooleanOptional

Indicates if session timer (RFC 4028) would be enabled. This also requires client support.

Default: true
session_timer_durationinteger · int32 · min: 90 · max: 3600Optional

Duration recorded by Session timer. Precondition: "enable_session_timer" MUST be set to true.

Default: 3600
enable_to_tag_in_registerbooleanOptional

Indicates if "to" tag is allowed in REGISTER message.

Default: false
enable_two_factor_authenticationbooleanOptional

Enable two factor authentication for users.

Default: false
enable_verify_phone_auto_provisioningbooleanOptional

Enable voicemail PIN verification for IP phone auto-provisioning.
When enabled, IP phones must provide voicemail PIN to download configuration files.

Default: false
verify_phone_auto_provisioning_excludestring[]Optional

JSON array of phone vendor names excluded from voicemail PIN verification during auto-provisioning. If a phone's vendor is in this list, it will skip PIN verification when downloading configuration files.

enable_congestion_managementbooleanOptional

Indicates if congestion management would be enabled.

Default: true
congestion_management_metricstring · enumOptional

Precondition: "enable_congestion_management" parameter MUST be set to true. The recommended is WAIT_TIME based on the expected wait time for each FIFO.

  • WAIT_TIME:
  • TIME_DEPTH:
  • SIZE:
Possible values:
congestion_management_toleranceinteger · int32Optional

Precondition: "enable_congestion_management" parameter MUST be set to true. Congestion management tolerance for the given metric. This parameter determines when the Rejection Behavior changes.

Default: 600
enable_create_non_exist_extensionbooleanOptional

Indicates if the extension would be automatically created when a non-existent extension try to register. If it is set to true, when a non-included extension tries to send registry message to PBX, the PBX will create the extension with default password "portsip" automatically.

Default: false
enable_prackbooleanOptional

Enable prack or not.

Default: false
enable_tenant_level_trunkbooleanOptional

Whether to enable tenant-level trunk.

Default: true
enable_diversion_supportbooleanOptional

Enable Diversion support or not (RFC 5806).

Default: false
enable_history_info_supportbooleanOptional

Enable History-Info support (RFC 7044).

Default: false
enable_outbound_supportbooleanOptional

Enable Outbound Support or not (RFC 5626).

Default: true
flow_timerinteger · int32Optional

The flow timer interval in seconds.

Default: 0
register_expiration_timeinteger · min: 90 · max: 3600Optional

The register expiration time in seconds.

Default: 300
enable_auto_answer_alert_info_headerbooleanOptional

Enable call-info header for auto answer or not.

Default: false
auto_answer_alert_info_headerstring · enumOptional

Alert-info header to be added in INVITE message when PBX is forwarding the page/intercom. Values includes:

  • INTERCOM: info=intercom.
  • ALERT_AUTO_ANSWER: Alert-Info:;info=alert-autoanswer;delay=0.
  • AUTO_ANSWER: info=Auto Answer.
Possible values:
enable_auto_answer_call_info_headerbooleanOptional

Enable call-info header for auto answer. The value is "sip:portsip.com;answer-after=0".

Default: true
enable_require_answer_modebooleanOptional

Enable Require Answer Mode (RFC 5373) for auto answer.

Default: false
enable_www_authbooleanOptional

Enable WWW authentication or not.

Default: false
user_equal_required_for_auth_namebooleanOptional

User equal required for authentication name.

Default: true
trace_server_hoststringOptional

Tracer server host.

trace_server_portinteger · int32 · max: 65535Optional

A port number is a 16-bit unsigned integer, thus ranging from 0 to 65535. For TCP, port number 0 is reserved and cannot be used, while for UDP, the source port is optional and a value of zero means no port

Example: 80
web_failed_auth_amountinteger · int32Optional

Block if failed to login PortSIP PBX Web more than this times.

Default: 5
web_blacklist_time_intervalinteger · int32Optional

The web blocked time in seconds.

Default: 3600
sip_failed_auth_amountinteger · int32Optional

The number of authentication failures.

Default: 50
sip_failed_challenge_requests_amountinteger · int32Optional

DOS attacks can send REGISTER/INVITE requests but do not reply to Challenge (407). Configure the amount of "fake" requests that PortSIP PBX will accept per IP Address. If this value is exceeded in "Detection Period" interval the source IP address is put in the Blacklist. IP will remain blacklisted till "SIP Blacklist time interval" expires.

Default: 1000
sip_blacklist_time_intervalinteger · int32Optional

The sip blocked time in seconds.

Default: 3600
sip_detection_periodinteger · int32Optional

The detection period in seconds.

Default: 10
sip_barrier_1_packetsinteger · int32Optional

If the amount of packets is exceeded, the PBX will block the source IP for "Level 1 blacklist time interval" seconds.

Default: 5000
sip_barrier_1_blocking_timeinteger · int32Optional

This is the time interval in seconds that an abusive IP Address remains in the blacklist

Default: 3600
sip_barrier_2_packetsinteger · int32Optional

If the amount of packets is exceeded, the PBX will block the source IP for "Level 2 blacklist time interval" seconds.

Default: 2000
sip_barrier_2_blocking_timeinteger · int32Optional

This is the time interval in seconds that an abusive IP Address remains in the blacklist

Default: 30
stir_shaken_certstringOptional

Content of this certificate file for STIR/SHAKEN support.

stir_shaken_keystringOptional

Content of this private certificate file for STIR/SHAKEN support.

custom_optionsstringOptional

Some custom configuration options serialized as json string.

enable_sip603_reason_headerbooleanOptional

Controls whether the PBX includes an enhanced Reason header in SIP 603 (Decline) responses. When enabled:

  • For extension calls, the PBX responds with SIP 603 and includes a Reason header with analytics information and location set to "LPN".
  • For trunk calls, the PBX responds with SIP 603 and includes a Reason header with analytics information and location set to "RPN". When disabled:
  • The PBX responds with standard SIP 603 without a Reason header.
Default: true
hide_pbx_private_ipbooleanOptional

Hide private network information or not.

Default: false
hide_not_deployed_server_warningsbooleanOptional

Hide warnings when some server is not deployed.

Default: false
Responses
200

OK

No content

post/admin/settings
POST /api/admin/settings HTTP/1.1
Host: HOSTNAME:8887
Authorization: Bearer YOUR_SECRET_TOKEN
Content-Type: application/json
Accept: */*
Content-Length: 1664

{
  "user_agent": "example",
  "blocked_user_agents": "",
  "enable_shared_address_space_address_range": true,
  "enable_digest_auth": true,
  "enable_auth_mid_dialog": true,
  "enable_digest_auth_int": true,
  "enable_external_recording": true,
  "enable_reject_bad_nonce": true,
  "statistics_log_interval": 600,
  "dead_session_timeout": 600,
  "enable_session_timer": true,
  "session_timer_duration": 3600,
  "enable_to_tag_in_register": true,
  "enable_congestion_management": true,
  "congestion_management_metric": "WAIT_TIME",
  "congestion_management_tolerance": 600,
  "enable_create_non_exist_extension": true,
  "enable_verify_phone_auto_provisioning": true,
  "verify_phone_auto_provisioning_exclude": [
    "Snom",
    "Yealink"
  ],
  "enable_two_factor_authentication": true,
  "enable_prack": true,
  "enable_tenant_level_trunk": true,
  "enable_diversion_support": true,
  "enable_history_info_support": true,
  "enable_outbound_support": true,
  "flow_timer": 0,
  "register_expiration_time": 300,
  "enable_auto_answer_alert_info_header": true,
  "auto_answer_alert_info_header": "INTERCOM",
  "enable_auto_answer_call_info_header": true,
  "enable_require_answer_mode": true,
  "enable_www_auth": true,
  "user_equal_required_for_auth_name": true,
  "trace_server_host": "",
  "trace_server_port": 1000,
  "web_failed_auth_amount": 1000,
  "web_blacklist_time_interval": 3600,
  "sip_failed_auth_amount": 50,
  "sip_failed_challenge_requests_amount": 1000,
  "sip_blacklist_time_interval": 3600,
  "sip_detection_period": 10,
  "sip_barrier_1_packets": 5000,
  "sip_barrier_1_blocking_time": 3600,
  "sip_barrier_2_packets": 2000,
  "sip_barrier_2_blocking_time": 30,
  "stir_shaken_cert": "",
  "stir_shaken_key": "",
  "custom_options": "",
  "enable_sip603_reason_header": true,
  "hide_pbx_private_ip": false,
  "hide_not_deployed_server_warnings": false
}

No content

Retrieve system notification settings

get

Retrieve details of system notification settings.

Authorizations
AuthorizationstringRequired
Bearer authentication header of the form Bearer <token>.
Responses
200

OK

application/json
typestring · enumOptional

The email server type.
Can be either:

  • SMTP: Use generic SMTP server.
  • MS365 Use Microsoft 365 email service.
  • GMAIL Use Google Gmail service.
Possible values:
serverstringOptional

SMTP server used for sending mails.

portinteger · int32 · max: 65535Optional

A port number is a 16-bit unsigned integer, thus ranging from 0 to 65535. For TCP, port number 0 is reserved and cannot be used, while for UDP, the source port is optional and a value of zero means no port

Example: 80
reply_tostringOptional

A Reply-To address is identified by inserting the Reply-To header in your email.
It is the email address that the reply message is sent when you want the reply to go to an email address that is different than the From: address.

usernamestring · max: 128Optional

Username or email address.

authstring · enumOptional

The authentication protocols.
Can be either:

  • DISABLE: Skip authentication mechanism.
  • AUTO: Use auto-selected authentication algorithms by server (Currently only supports LOGIN and PLAIN).
  • LOGIN: Use LOGIN authentication mechanism.
  • PLAIN Use PLAIN authentication mechanism.
Default: AUTOPossible values:
enable_tls_sslbooleanOptional

Whether to enable TLS/SSL.

Default: true
enable_starttls_autobooleanOptional

Whether StartTLS is automatically enabled.

Default: false
recipientsstringOptional

Comma-separated list of email address that should receive notifications.
Allow up to 15 email addresses.

enable_tenant_accessbooleanOptional

Apply the email server settings to all tenants.

Default: true
hard_disk_thresholdnumber · doubleOptional

The hard disk threshold for email warning.

Example: 0.9
notify_hard_disk_exceeded_thresholdbooleanOptional

Send a notification email when specified hard disk threshold is exceeded.

Default: true
cpu_thresholdnumber · doubleOptional

The CPU threshold for email warning.

Example: 0.9
notify_cpu_exceeded_thresholdbooleanOptional

Send a notification email when specified CPU threshold is exceeded.

Default: true
memory_thresholdnumber · doubleOptional

The memory threshold for email warning.

Example: 0.9
notify_memory_exceeded_thresholdbooleanOptional

Send an email notification when specified memory threshold is exceeded.

Default: true
notify_ip_blockedbooleanOptional

Send a notification email when ip blocked.

Default: true
notify_license_limitedbooleanOptional

Send a notification email when license limit reached.

Default: true
notify_service_status_changedbooleanOptional

Send a notification email when some service status changed.

Default: true
notify_push_certs_update_failedbooleanOptional

Send a notification email when push notification certificates update failed.

Default: true
notify_trunk_status_changedbooleanOptional

Send a notification email when trunk status changed.

Default: false
get/admin/notification
GET /api/admin/notification HTTP/1.1
Host: HOSTNAME:8887
Authorization: Bearer YOUR_SECRET_TOKEN
Accept: */*
{
  "type": "SMTP",
  "server": "",
  "port": 1000,
  "reply_to": "",
  "username": "example",
  "auth": "AUTO",
  "enable_tls_ssl": true,
  "enable_starttls_auto": true,
  "recipients": "",
  "enable_tenant_access": false,
  "hard_disk_threshold": 90,
  "notify_hard_disk_exceeded_threshold": true,
  "cpu_threshold": 90,
  "notify_cpu_exceeded_threshold": true,
  "memory_threshold": 90,
  "notify_memory_exceeded_threshold": true,
  "notify_ip_blocked": true,
  "notify_license_limited": true,
  "notify_service_status_changed": true,
  "notify_push_certs_update_failed": true,
  "notify_trunk_status_changed": true
}

Update system notification settings

post

Update system notification settings.

Authorizations
AuthorizationstringRequired
Bearer authentication header of the form Bearer <token>.
Body
typestring · enumRequired

The email server type.
Can be either:

  • SMTP: Use generic SMTP server.
  • MS365 Use Microsoft 365 email service.
  • GMAIL Use Google Gmail service.
Possible values:
serverstringOptional

SMTP server used for sending mails.

portinteger · int32 · max: 65535Optional

A port number is a 16-bit unsigned integer, thus ranging from 0 to 65535. For TCP, port number 0 is reserved and cannot be used, while for UDP, the source port is optional and a value of zero means no port

Example: 80
reply_tostringOptional

A Reply-To address is identified by inserting the Reply-To header in your email.
It is the email address that the reply message is sent when you want the reply to go to an email address that is different than the From: address.

usernamestring · max: 128Required

Username or email address.

passwordstringOptional

Password for email account.

authstring · enumOptional

The authentication protocols.
Can be either:

  • DISABLE: Skip authentication mechanism.
  • AUTO: Use auto-selected authentication algorithms by server (Currently only supports LOGIN and PLAIN).
  • LOGIN: Use LOGIN authentication mechanism.
  • PLAIN Use PLAIN authentication mechanism.
Default: AUTOPossible values:
enable_tls_sslbooleanOptional

Whether to enable TLS/SSL.

Default: true
enable_starttls_autobooleanOptional

Whether StartTLS is automatically enabled.

Default: false
recipientsstringOptional

Comma-separated list of email address that should receive notifications.
Allow up to 15 email addresses.

enable_tenant_accessbooleanOptional

Apply the email server settings to all tenants.

Default: true
hard_disk_thresholdnumber · doubleOptional

The hard disk threshold for email warning.

Example: 0.9
notify_hard_disk_exceeded_thresholdbooleanOptional

Send a notification email when specified hard disk threshold is exceeded.

Default: true
cpu_thresholdnumber · doubleOptional

The CPU threshold for email warning.

Example: 0.9
notify_cpu_exceeded_thresholdbooleanOptional

Send a notification email when specified CPU threshold is exceeded.

Default: true
memory_thresholdnumber · doubleOptional

The memory threshold for email warning.

Example: 0.9
notify_memory_exceeded_thresholdbooleanOptional

Send an email notification when specified memory threshold is exceeded.

Default: true
notify_ip_blockedbooleanOptional

Send a notification email when ip blocked.

Default: true
notify_license_limitedbooleanOptional

Send a notification email when license limit reached.

Default: true
notify_service_status_changedbooleanOptional

Send a notification email when some service status changed.

Default: true
notify_push_certs_update_failedbooleanOptional

Send a notification email when push notification certificates update failed.

Default: true
notify_trunk_status_changedbooleanOptional

Send a notification email when trunk status changed.

Default: false
Responses
200

OK

No content

post/admin/notification
POST /api/admin/notification HTTP/1.1
Host: HOSTNAME:8887
Authorization: Bearer YOUR_SECRET_TOKEN
Content-Type: application/json
Accept: */*
Content-Length: 552

{
  "type": "SMTP",
  "server": "",
  "port": 1000,
  "reply_to": "",
  "username": "example",
  "password": "",
  "auth": "AUTO",
  "enable_tls_ssl": true,
  "enable_starttls_auto": true,
  "recipients": "",
  "enable_tenant_access": false,
  "hard_disk_threshold": 90,
  "notify_hard_disk_exceeded_threshold": false,
  "cpu_threshold": 90,
  "notify_cpu_exceeded_threshold": false,
  "memory_threshold": 90,
  "notify_memory_exceeded_threshold": false,
  "notify_ip_blocked": true,
  "notify_license_limited": true,
  "notify_service_status_changed": true,
  "notify_push_certs_update_failed": true,
  "notify_trunk_status_changed": true
}

No content

Test email

post

Check email server configurations by sending testing email.

Authorizations
AuthorizationstringRequired
Bearer authentication header of the form Bearer <token>.
Body
recipientstringRequired

The recipient's e-mail address.

subjectstringRequired

Mail subject.

contentstringRequired

Mail content.

Responses
200

OK

No content

post/admin/notification/test_email
POST /api/admin/notification/test_email HTTP/1.1
Host: HOSTNAME:8887
Authorization: Bearer YOUR_SECRET_TOKEN
Content-Type: application/json
Accept: */*
Content-Length: 49

{
  "recipient": "",
  "subject": "example",
  "content": ""
}

No content

Generate Google authorization URL for admin

post

Generate Google authorization URL for admin

Authorizations
AuthorizationstringRequired
Bearer authentication header of the form Bearer <token>.
Body
client_idstringRequired

Google client ID

client_secretstringRequired

Google client secret

callback_urlstringOptional

Callback URL after authorization

Responses
200

OK

application/json
auth_consent_uristringOptional

Google authorization URL

post/admin/google/authorization
POST /api/admin/google/authorization HTTP/1.1
Host: HOSTNAME:8887
Authorization: Bearer YOUR_SECRET_TOKEN
Content-Type: application/json
Accept: */*
Content-Length: 65

{
  "client_id": "text",
  "client_secret": "text",
  "callback_url": "text"
}
{
  "auth_consent_uri": "text"
}

Get System Password Policy

get

Get the system password policy for administrators

Authorizations
AuthorizationstringRequired
Bearer authentication header of the form Bearer <token>.
Responses
200

OK

application/json
min_lengthinteger · int32 · min: 6 · max: 32Required

The password must contains at least min_length characters.
Must be less than or equal the value of max_length.

Default: 6
max_lengthinteger · int32 · min: 6 · max: 32Required

The password must contains at most max_length characters.
Must be greater than or equal the value of min_length.

Default: 32
contains_lettersbooleanRequired

The password must contains at least one letter (latin characters).

Default: true
contains_numbersbooleanRequired

The password must contains at least one number (0-9).

Default: true
contains_special_lettersbooleanRequired

The password must contains at least one upper case letter or special character (e.g. ~,!,@,#,$,%,^,&,*,(,),_,+,=).

Default: true
disable_sequential_charactersbooleanRequired

The password must not contains sequential_characters.

Default: true
disable_repeating_charactersbooleanRequired

The password must not contains repeating_characters.

Default: true
disable_account_informationbooleanRequired

The password must not similar to the account information.

Default: true
get/admin/password_policy
GET /api/admin/password_policy HTTP/1.1
Host: HOSTNAME:8887
Authorization: Bearer YOUR_SECRET_TOKEN
Accept: */*
{
  "min_length": 6,
  "max_length": 32,
  "contains_letters": true,
  "contains_numbers": true,
  "contains_special_letters": true,
  "disable_sequential_characters": true,
  "disable_repeating_characters": true,
  "disable_account_information": true
}

Update System Password Policy

post

Update the system password policy for administrators

Authorizations
AuthorizationstringRequired
Bearer authentication header of the form Bearer <token>.
Body
min_lengthinteger · int32 · min: 6 · max: 32Optional

The password must contains at least min_length characters.
Must be less than or equal the value of max_length.

max_lengthinteger · int32 · min: 6 · max: 32Optional

The password must contains at most max_length characters.
Must be greater than or equal the value of min_length.

contains_lettersbooleanOptional

The password must contains at least one letter (latin characters).

contains_numbersbooleanOptional

The password must contains at least one number (0-9).

contains_special_lettersbooleanOptional

The password must contains at least one upper case letter or special character (e.g. ~,!,@,#,$,%,^,&,*,(,),_,+,=).

disable_sequential_charactersbooleanOptional

The password must not contains sequential_characters.

disable_repeating_charactersbooleanOptional

The password must not contains repeating_characters.

disable_account_informationbooleanOptional

The password must not similar to the account information.

Responses
200

OK

No content

post/admin/password_policy
POST /api/admin/password_policy HTTP/1.1
Host: HOSTNAME:8887
Authorization: Bearer YOUR_SECRET_TOKEN
Content-Type: application/json
Accept: */*
Content-Length: 219

{
  "min_length": 1,
  "max_length": 1,
  "contains_letters": true,
  "contains_numbers": true,
  "contains_special_letters": true,
  "disable_sequential_characters": true,
  "disable_repeating_characters": true,
  "disable_account_information": true
}

No content

Retrieve SBC configuration

get

Retrieve settings for SBC.

Authorizations
AuthorizationstringRequired
Bearer authentication header of the form Bearer <token>.
Responses
200

OK

application/json
domainstringOptional

The SBC domain.

http_portinteger · int32 · max: 65535Optional

A port number is a 16-bit unsigned integer, thus ranging from 0 to 65535. For TCP, port number 0 is reserved and cannot be used, while for UDP, the source port is optional and a value of zero means no port

Example: 80
https_portinteger · int32 · max: 65535Optional

A port number is a 16-bit unsigned integer, thus ranging from 0 to 65535. For TCP, port number 0 is reserved and cannot be used, while for UDP, the source port is optional and a value of zero means no port

Example: 80
get/sbc
GET /api/sbc HTTP/1.1
Host: HOSTNAME:8887
Authorization: Bearer YOUR_SECRET_TOKEN
Accept: */*
{
  "domain": "example.com",
  "http_port": 80,
  "https_port": 443,
  "transports": [
    {
      "protocol": "UDP",
      "port": 1000
    }
  ]
}

Update SBC configuration

post

Update SBC configuration.

Authorizations
AuthorizationstringRequired
Bearer authentication header of the form Bearer <token>.
Body
domainstringOptional

The SBC domain.

http_portinteger · int32 · max: 65535Optional

A port number is a 16-bit unsigned integer, thus ranging from 0 to 65535. For TCP, port number 0 is reserved and cannot be used, while for UDP, the source port is optional and a value of zero means no port

Example: 80
https_portinteger · int32 · max: 65535Optional

A port number is a 16-bit unsigned integer, thus ranging from 0 to 65535. For TCP, port number 0 is reserved and cannot be used, while for UDP, the source port is optional and a value of zero means no port

Example: 80
Responses
200

OK

No content

post/sbc
POST /api/sbc HTTP/1.1
Host: HOSTNAME:8887
Authorization: Bearer YOUR_SECRET_TOKEN
Content-Type: application/json
Accept: */*
Content-Length: 102

{
  "domain": "example.com",
  "http_port": 80,
  "https_port": 443,
  "transports": [
    {
      "protocol": "UDP",
      "port": 1000
    }
  ]
}

No content

Retrieve SBC token

get

Retrieve SBC token

Authorizations
AuthorizationstringRequired
Bearer authentication header of the form Bearer <token>.
Responses
200

OK

application/json
tokenstringOptional

The access token for SBC.

get/sbc/token
GET /api/sbc/token HTTP/1.1
Host: HOSTNAME:8887
Authorization: Bearer YOUR_SECRET_TOKEN
Accept: */*
{
  "token": "xxxxxxxxxxxxxxxxxxxxxxxxx"
}

Regenerate SBC token

post

Regenerate SBC token

Authorizations
AuthorizationstringRequired
Bearer authentication header of the form Bearer <token>.
Responses
200

OK

application/json
tokenstringOptional

The access token for SBC.

post/sbc/token
POST /api/sbc/token HTTP/1.1
Host: HOSTNAME:8887
Authorization: Bearer YOUR_SECRET_TOKEN
Accept: */*
{
  "token": "xxxxxxxxxxxxxxxxxxxxx"
}

Destroy SBC Token

post

Destroy SBC Token.

Authorizations
AuthorizationstringRequired
Bearer authentication header of the form Bearer <token>.
Responses
204

No Content

No content

post/sbc/token/destroy
POST /api/sbc/token/destroy HTTP/1.1
Host: HOSTNAME:8887
Authorization: Bearer YOUR_SECRET_TOKEN
Accept: */*

No content

Retrieve IM server configuration

get

Retrieve settings of IM server.

Authorizations
AuthorizationstringRequired
Bearer authentication header of the form Bearer <token>.
Responses
200

OK

application/json
private_ipv4stringOptional

Host IPV4 address.

private_ipv6stringOptional

Host IPV6 address.

public_ipv4stringOptional

Host IPV4 address.

public_ipv6stringOptional

Host IPV6 address.

get/im
GET /api/im HTTP/1.1
Host: HOSTNAME:8887
Authorization: Bearer YOUR_SECRET_TOKEN
Accept: */*
{
  "private_ipv4": "127.0.0.1",
  "private_ipv6": "::1",
  "public_ipv4": "192.0.2.0",
  "public_ipv6": "2001:0db8:0a0b:12f0::1"
}

Update IM server configuration

post

Update IM server configuration.

Authorizations
AuthorizationstringRequired
Bearer authentication header of the form Bearer <token>.
Body
private_ipv4stringOptional

Host IPV4 address.

private_ipv6stringOptional

Host IPV6 address.

public_ipv4stringOptional

Host IPV4 address.

public_ipv6stringOptional

Host IPV6 address.

Responses
200

OK

No content

post/im
POST /api/im HTTP/1.1
Host: HOSTNAME:8887
Authorization: Bearer YOUR_SECRET_TOKEN
Content-Type: application/json
Accept: */*
Content-Length: 114

{
  "private_ipv4": "127.0.0.1",
  "private_ipv6": "::1",
  "public_ipv4": "192.0.2.0",
  "public_ipv6": "2001:0db8:0a0b:12f0::1"
}

No content

Query IM server status

get

Query the current status of the IM server. If the IM server configuration is incomplete or the status request fails, the status is returned as OFFLINE.

Authorizations
AuthorizationstringRequired
Bearer authentication header of the form Bearer <token>.
Responses
200

OK

application/json
statusstring · enumRead-onlyRequired

The current status of the IM server:

  • ONLINE: the IM server is online.
  • OFFLINE: the IM server is offline or its status cannot be determined.
Possible values:
get/im/status
GET /api/im/status HTTP/1.1
Host: HOSTNAME:8887
Authorization: Bearer YOUR_SECRET_TOKEN
Accept: */*
{
  "status": "ONLINE"
}

Retrieve IM Server token

get

Retrieve IM server token

Authorizations
AuthorizationstringRequired
Bearer authentication header of the form Bearer <token>.
Responses
200

OK

application/json
tokenstringOptional

The access token for IM Server.

get/im/token
GET /api/im/token HTTP/1.1
Host: HOSTNAME:8887
Authorization: Bearer YOUR_SECRET_TOKEN
Accept: */*
{
  "token": "xxxxxxxxxxxxxxxxxxxxxx"
}

Regenerate IM server token

post

Regenerate IM server token

Authorizations
AuthorizationstringRequired
Bearer authentication header of the form Bearer <token>.
Responses
200

OK

application/json
tokenstringOptional

The access token for IM Server.

post/im/token
POST /api/im/token HTTP/1.1
Host: HOSTNAME:8887
Authorization: Bearer YOUR_SECRET_TOKEN
Accept: */*
{
  "token": "xxxxxxxxxxxxxxxxx"
}

Destroy IM server Token

post

Destroy IM server Token.

Authorizations
AuthorizationstringRequired
Bearer authentication header of the form Bearer <token>.
Responses
204

No Content

No content

post/im/token/destroy
POST /api/im/token/destroy HTTP/1.1
Host: HOSTNAME:8887
Authorization: Bearer YOUR_SECRET_TOKEN
Accept: */*

No content

List dealers

get

List a collection of dealers.

Authorizations
AuthorizationstringRequired
Bearer authentication header of the form Bearer <token>.
Responses
200

OK

application/json
countinteger · int64Optional

Total number of resource.

Example: 100
get/dealers
GET /api/dealers HTTP/1.1
Host: HOSTNAME:8887
Authorization: Bearer YOUR_SECRET_TOKEN
Accept: */*
{
  "count": 1,
  "items": [
    {
      "id": "xxxxxx",
      "enabled": true,
      "level": "DISTRIBUTOR",
      "name": "example",
      "email": "",
      "display_name": "example",
      "website": "https://example.com",
      "phone": "",
      "address": "",
      "description": "",
      "max_tenants": 100,
      "max_extensions": 1000,
      "max_cc_users": 300,
      "max_advanced_users": 100,
      "tenant_full_access": false,
      "timezone": "UTC"
    }
  ]
}

Create a dealer

post

Create a Dealer. In Modular mode, a System administrator may assign top-level Dealer limits greater than the shared System License totals. Child Dealers remain constrained by their parent Dealer.

Authorizations
AuthorizationstringRequired
Bearer authentication header of the form Bearer <token>.
Body
enabledbooleanOptional

Enable this dealer or not.

Default: true
levelstring · enumRequired

Dealer level includes:

  • DISTRIBUTOR: the first level of dealers.
  • SUB_DISTRIBUTOR: the second level of dealers.
  • RESELLER: the third level of dealers.
Possible values:
namestring · min: 1 · max: 64Required

The user's account name.
Only letters, numbers, and the following special characters can be added: underscore, dash, single quote, and period (_, -, ', and .).
Username cannot start or end with period (.).
admin, system, administrator, and root are reserved names for system admin only with case ignored.

passwordstringRequired

The password of dealer.

emailstring · max: 128Required

The email address.

Example: example@example.com
display_namestring · min: 1 · max: 128Required

The display name of user.

websitestringOptional

The website of user.

phonestring · max: 32Optional

The mobile phone number of user.

addressstring · max: 128Optional

The address.

descriptionstringOptional

The description of dealer.

max_tenantsinteger · int32Required

The maximum number of tenants that the dealer is allowed to create.

Default: 100
max_extensionsinteger · int32Required

Maximum Base quota that this Dealer can allocate to direct children. In Modular mode this is the Dealer's Base allocation; 0 means no Base quota and never means unlimited. A top-level Dealer limit assigned by the System administrator may exceed the System License total; enabled Tenant allocation is still constrained by the shared System License.

Default: 50000
max_cc_usersinteger · int32Optional

Maximum CC quota that this Dealer can allocate to direct children in Modular mode. 0 means no CC quota. A top-level Dealer limit assigned by the System administrator may exceed the System License total.

Default: 0
max_advanced_usersinteger · int32Optional

Maximum Advanced quota that this Dealer can allocate to direct children in Modular mode. 0 means no Advanced quota. A top-level Dealer limit assigned by the System administrator may exceed the System License total.

Default: 0
tenant_full_accessbooleanOptional

Whether or not the reseller is allowed to have full control over the tenant.
This attribute is not valid if not modified by first level dealer.

Default: true
timezonestringRequired

The IANA Time Zone names, such as "Asia/Shanghai".

Responses
201

Success

application/json
idstringOptionalExample: NzAwNTUxOTA5NzczMTQ4MTYw
post/dealers
POST /api/dealers HTTP/1.1
Host: HOSTNAME:8887
Authorization: Bearer YOUR_SECRET_TOKEN
Content-Type: application/json
Accept: */*
Content-Length: 331

{
  "enabled": true,
  "level": "DISTRIBUTOR",
  "name": "example",
  "password": "xxxxxx",
  "email": "example@example.com",
  "display_name": "example",
  "website": "https://example.com",
  "phone": "",
  "address": "",
  "description": "",
  "max_tenants": 100,
  "max_extensions": 1000,
  "max_cc_users": 300,
  "max_advanced_users": 100,
  "tenant_full_access": false,
  "timezone": "UTC"
}
{
  "id": "xxxxxxxx"
}

Retrieve a dealer

get

Get details of the dealer by it's unique ID.

Authorizations
AuthorizationstringRequired
Bearer authentication header of the form Bearer <token>.
Path parameters
idstringRequiredExample: NzAwNTUxOTA5NzczMTQ4MTYw
Responses
200

OK

application/json
idstringOptionalExample: NzAwNTUxOTA5NzczMTQ4MTYw
enabledbooleanOptional

Enable this dealer or not.

Default: true
levelstring · enumOptional

Dealer level includes:

  • DISTRIBUTOR: the first level of dealers.
  • SUB_DISTRIBUTOR: the second level of dealers.
  • RESELLER: the third level of dealers.
Possible values:
namestring · min: 1 · max: 64Optional

The user's account name.
Only letters, numbers, and the following special characters can be added: underscore, dash, single quote, and period (_, -, ', and .).
Username cannot start or end with period (.).
admin, system, administrator, and root are reserved names for system admin only with case ignored.

emailstring · max: 128Optional

The email address.

Example: example@example.com
display_namestring · min: 1 · max: 128Optional

The display name of user.

websitestringOptional

The website of user.

phonestring · max: 32Optional

The mobile phone number of user.

addressstring · max: 128Optional

The address.

descriptionstringOptional

The description of dealer.

max_tenantsinteger · int32Optional

The maximum number of tenants that the dealer is allowed to create.

Default: 100
max_extensionsinteger · int32Optional

Maximum Base quota that this Dealer can allocate to direct children. In Modular mode this is the Dealer's Base allocation; 0 means no Base quota and never means unlimited. A top-level Dealer limit assigned by the System administrator may exceed the System License total; enabled Tenant allocation is still constrained by the shared System License.

Default: 50000
max_cc_usersinteger · int32Optional

Maximum CC quota that this Dealer can allocate to direct children in Modular mode. 0 means no CC quota. A top-level Dealer limit assigned by the System administrator may exceed the System License total.

Default: 0
max_advanced_usersinteger · int32Optional

Maximum Advanced quota that this Dealer can allocate to direct children in Modular mode. 0 means no Advanced quota. A top-level Dealer limit assigned by the System administrator may exceed the System License total.

Default: 0
tenant_full_accessbooleanOptional

Whether or not the reseller is allowed to have full control over the tenant.
This attribute is not valid if not modified by first level dealer.

Default: true
timezonestringOptional

The IANA Time Zone names, such as "Asia/Shanghai".

get/dealers/{id}
GET /api/dealers/{id} HTTP/1.1
Host: HOSTNAME:8887
Authorization: Bearer YOUR_SECRET_TOKEN
Accept: */*
{
  "id": "xxxxxx",
  "enabled": true,
  "level": "DISTRIBUTOR",
  "name": "example",
  "email": "example@example.com",
  "display_name": "example",
  "website": "https://example.com",
  "phone": "",
  "address": "",
  "description": "",
  "max_tenants": 100,
  "max_extensions": 1000,
  "max_cc_users": 300,
  "max_advanced_users": 100,
  "tenant_full_access": false,
  "timezone": "UTC"
}

Update a dealer

post

Modify the settings of the Dealer. In Modular mode, top-level Dealer limits are not capped by the shared System License. Child Dealer limits remain constrained by their parent Dealer.

Authorizations
AuthorizationstringRequired
Bearer authentication header of the form Bearer <token>.
Path parameters
idstringRequiredExample: NzAwNTUxOTA5NzczMTQ4MTYw
Body
enabledbooleanOptional

Enable this dealer or not.

Default: true
emailstring · max: 128Optional

The email address.

Example: example@example.com
display_namestring · min: 1 · max: 128Optional

The display name of user.

websitestringOptional

The website of user.

phonestring · max: 32Optional

The mobile phone number of user.

addressstring · max: 128Optional

The address.

descriptionstringOptional

The description of dealer.

max_tenantsinteger · int32Optional

The maximum number of tenants that the dealer is allowed to create.

Default: 100
max_extensionsinteger · int32Optional

Maximum Base quota that this Dealer can allocate to direct children. In Modular mode this is the Dealer's Base allocation; 0 means no Base quota and never means unlimited. A top-level Dealer limit assigned by the System administrator may exceed the System License total; enabled Tenant allocation is still constrained by the shared System License.

Default: 50000
max_cc_usersinteger · int32Optional

Maximum CC quota that this Dealer can allocate to direct children in Modular mode. 0 means no CC quota. A top-level Dealer limit assigned by the System administrator may exceed the System License total.

Default: 0
max_advanced_usersinteger · int32Optional

Maximum Advanced quota that this Dealer can allocate to direct children in Modular mode. 0 means no Advanced quota. A top-level Dealer limit assigned by the System administrator may exceed the System License total.

Default: 0
tenant_full_accessbooleanOptional

Whether or not the reseller is allowed to have full control over the tenant.
This attribute is not valid if not modified by first level dealer.

Default: true
timezonestringOptional

The IANA Time Zone names, such as "Asia/Shanghai".

Responses
200

OK

No content

post/dealers/{id}
POST /api/dealers/{id} HTTP/1.1
Host: HOSTNAME:8887
Authorization: Bearer YOUR_SECRET_TOKEN
Content-Type: application/json
Accept: */*
Content-Length: 272

{
  "enabled": true,
  "email": "example@example.com",
  "display_name": "example",
  "website": "https://example.com",
  "phone": "",
  "address": "",
  "description": "",
  "max_tenants": 100,
  "max_extensions": 1000,
  "max_cc_users": 300,
  "max_advanced_users": 100,
  "tenant_full_access": false,
  "timezone": "UTC"
}

No content

Reset dealer password

post

Reset dealer's password.

Authorizations
AuthorizationstringRequired
Bearer authentication header of the form Bearer <token>.
Path parameters
idstringRequiredExample: NzAwNTUxOTA5NzczMTQ4MTYw
Body
passwordstringOptional

The password of dealer.

Responses
200

OK

No content

post/dealers/{id}/password
POST /api/dealers/{id}/password HTTP/1.1
Host: HOSTNAME:8887
Authorization: Bearer YOUR_SECRET_TOKEN
Content-Type: application/json
Accept: */*
Content-Length: 21

{
  "password": "xxxxxx"
}

No content

Delete a dealer

post

Delete a dealer by it's unique ID.

Authorizations
AuthorizationstringRequired
Bearer authentication header of the form Bearer <token>.
Path parameters
idstringRequiredExample: NzAwNTUxOTA5NzczMTQ4MTYw
Responses
204

No Content

No content

post/dealers/{id}/destroy
POST /api/dealers/{id}/destroy HTTP/1.1
Host: HOSTNAME:8887
Authorization: Bearer YOUR_SECRET_TOKEN
Accept: */*

No content

List IP rules

get

Retrieve a collection of IP blacklist entries or whitelist entries.

Authorizations
AuthorizationstringRequired
Bearer authentication header of the form Bearer <token>.
Query parameters
filterstringOptional

Use the filter query parameter to retrieve just a subset of a collection.

searchstringOptional

Use the search query parameter to restrict the results of a request to match a search criterion.

orderbystringOptional

Use the orderby query parameter to specify the sort order of the items returned from server.
The default order is ascending order.

skipinteger · int32Optional

Use the skip query parameter to set the number of items to skip at the start of a collection.

Default: 0
topinteger · int32 · min: 1 · max: 100Optional

Use the top query parameter to specify the page size of the result set.

Default: 100
Responses
200

OK

application/json
countinteger · int64Optional

Total number of resource.

Example: 100
get/ip_filters
GET /api/ip_filters HTTP/1.1
Host: HOSTNAME:8887
Authorization: Bearer YOUR_SECRET_TOKEN
Accept: */*
{
  "count": 1,
  "items": [
    {
      "id": "xxxxxx",
      "cidr": "",
      "target": "DENY",
      "expire_at": "2020-01-01T00:00:00Z",
      "description": ""
    }
  ]
}

Create an IP rule

post

Add a new IP blacklist entry or whitelist entry to the system.

Authorizations
AuthorizationstringRequired
Bearer authentication header of the form Bearer <token>.
Body
cidrstringRequired

The CIDR notation IP address and prefix length, like "192.0.2.0/24" or "2001:db8::/32", as defined in RFC 4632 and RFC 4291.

targetstring · enumRequired

IP rule's target:

  • ACCEPT: An accepted rule.
  • DENY: A rejection rule.
Possible values:
expire_atstring · date_timeOptional

The RFC 3339 format is defined by The date_time notation as defined by RFC 3339, section 5.6, for example, 2017-07-21T17:32:28Z

Example: 2017-07-21T17:32:28Z
descriptionstring · max: 255Optional

Remarks for the IP rule.

Responses
200

OK

application/json
idstringOptionalExample: NzAwNTUxOTA5NzczMTQ4MTYw
post/ip_filters
POST /api/ip_filters HTTP/1.1
Host: HOSTNAME:8887
Authorization: Bearer YOUR_SECRET_TOKEN
Content-Type: application/json
Accept: */*
Content-Length: 79

{
  "cidr": "",
  "target": "DENY",
  "expire_at": "2020-01-01T00:00:00Z",
  "description": ""
}
{
  "id": "xxxxxxxx"
}

Retrieve an IP rule

get

Retrieve IP blacklist entry or whitelist entry.

Authorizations
AuthorizationstringRequired
Bearer authentication header of the form Bearer <token>.
Path parameters
idstringRequiredExample: NzAwNTUxOTA5NzczMTQ4MTYw
Responses
200

OK

application/json
idstringOptionalExample: NzAwNTUxOTA5NzczMTQ4MTYw
cidrstringOptional

The CIDR notation IP address and prefix length, like "192.0.2.0/24" or "2001:db8::/32", as defined in RFC 4632 and RFC 4291.

targetstring · enumOptional

IP rule's target:

  • ACCEPT: An accepted rule.
  • DENY: A rejection rule.
Possible values:
expire_atstring · date_timeOptional

The RFC 3339 format is defined by The date_time notation as defined by RFC 3339, section 5.6, for example, 2017-07-21T17:32:28Z

Example: 2017-07-21T17:32:28Z
descriptionstring · max: 255Optional

Remarks for the IP rule.

get/ip_filters/{id}
GET /api/ip_filters/{id} HTTP/1.1
Host: HOSTNAME:8887
Authorization: Bearer YOUR_SECRET_TOKEN
Accept: */*
{
  "id": "xxxxxx",
  "cidr": "",
  "target": "DENY",
  "expire_at": "2020-01-01T00:00:00Z",
  "description": ""
}

Update an IP rule

post

Update IP blacklist entry or whitelist entry that already exists.

Authorizations
AuthorizationstringRequired
Bearer authentication header of the form Bearer <token>.
Path parameters
idstringRequiredExample: NzAwNTUxOTA5NzczMTQ4MTYw
Body
cidrstringOptional

The CIDR notation IP address and prefix length, like "192.0.2.0/24" or "2001:db8::/32", as defined in RFC 4632 and RFC 4291.

targetstring · enumOptional

IP rule's target:

  • ACCEPT: An accepted rule.
  • DENY: A rejection rule.
Possible values:
expire_atstring · date_timeOptional

The RFC 3339 format is defined by The date_time notation as defined by RFC 3339, section 5.6, for example, 2017-07-21T17:32:28Z

Example: 2017-07-21T17:32:28Z
descriptionstring · max: 255Optional

Remarks for the IP rule.

Responses
200

OK

No content

post/ip_filters/{id}
POST /api/ip_filters/{id} HTTP/1.1
Host: HOSTNAME:8887
Authorization: Bearer YOUR_SECRET_TOKEN
Content-Type: application/json
Accept: */*
Content-Length: 79

{
  "cidr": "",
  "target": "DENY",
  "expire_at": "2020-01-01T00:00:00Z",
  "description": ""
}

No content

Delete an IP rule

post

Destroy a certain IP rule.

Authorizations
AuthorizationstringRequired
Bearer authentication header of the form Bearer <token>.
Path parameters
idstringRequiredExample: NzAwNTUxOTA5NzczMTQ4MTYw
Responses
204

No Content

No content

post/ip_filters/{id}/destroy
POST /api/ip_filters/{id}/destroy HTTP/1.1
Host: HOSTNAME:8887
Authorization: Bearer YOUR_SECRET_TOKEN
Accept: */*

No content

Export IP rules

get

Export a collection of IP rules to file.

Authorizations
AuthorizationstringRequired
Bearer authentication header of the form Bearer <token>.
Responses
200

OK

application/octet-stream
Responsestring · binary
get/ip_filters/export
GET /api/ip_filters/export HTTP/1.1
Host: HOSTNAME:8887
Authorization: Bearer YOUR_SECRET_TOKEN
Accept: */*
binary

List transports

get

Retrieve a collection of transports

Authorizations
AuthorizationstringRequired
Bearer authentication header of the form Bearer <token>.
Query parameters
filterstringOptional

Use the filter query parameter to retrieve just a subset of a collection.

searchstringOptional

Use the search query parameter to restrict the results of a request to match a search criterion.

orderbystringOptional

Use the orderby query parameter to specify the sort order of the items returned from server.
The default order is ascending order.

skipinteger · int32Optional

Use the skip query parameter to set the number of items to skip at the start of a collection.

Default: 0
topinteger · int32 · min: 1 · max: 100Optional

Use the top query parameter to specify the page size of the result set.

Default: 100
Responses
200

OK

application/json
countinteger · int64Optional

Total number of resource.

Example: 100
get/transports
GET /api/transports HTTP/1.1
Host: HOSTNAME:8887
Authorization: Bearer YOUR_SECRET_TOKEN
Accept: */*
{
  "count": 1,
  "items": [
    {
      "id": "xxxxxx",
      "protocol": "UDP",
      "port": 1000,
      "verification": "DISABLE"
    }
  ]
}

Create a transport

post

Add a new transport.

Authorizations
AuthorizationstringRequired
Bearer authentication header of the form Bearer <token>.
Body
protocolstring · enumRequired

The transport protocol:
Can be either:

  • UDP:
  • TCP:
  • TLS:
Possible values:
portinteger · int32 · max: 65535Required

A port number is a 16-bit unsigned integer, thus ranging from 0 to 65535. For TCP, port number 0 is reserved and cannot be used, while for UDP, the source port is optional and a value of zero means no port

Example: 80
verificationstring · enumOptional

Indicates if PBX wishes (Optional) or requires (Mandatory) TLS clients to present a client certificate:

  • DISABLE: disable client certificate.
  • OPTIONAL: client authentication optional.
  • MANDATORY: force client authentication.
Possible values:
Responses
201

Created transport

application/json
idstringOptionalExample: NzAwNTUxOTA5NzczMTQ4MTYw
post/transports
POST /api/transports HTTP/1.1
Host: HOSTNAME:8887
Authorization: Bearer YOUR_SECRET_TOKEN
Content-Type: application/json
Accept: */*
Content-Length: 55

{
  "protocol": "UDP",
  "port": 1000,
  "verification": "DISABLE"
}
{
  "id": "xxxxxxxx"
}

Retrieve a transport

get

Retrieve a transport by it's unique ID.

Authorizations
AuthorizationstringRequired
Bearer authentication header of the form Bearer <token>.
Path parameters
idstringRequired

The unique ID of the transport.

Example: NzAwNTUxOTA5NzczMTQ4MTYw
Responses
200

OK

application/json
idstringOptionalExample: NzAwNTUxOTA5NzczMTQ4MTYw
protocolstring · enumOptional

The transport protocol:
Can be either:

  • UDP:
  • TCP:
  • TLS:
Possible values:
portinteger · int32 · max: 65535Optional

A port number is a 16-bit unsigned integer, thus ranging from 0 to 65535. For TCP, port number 0 is reserved and cannot be used, while for UDP, the source port is optional and a value of zero means no port

Example: 80
verificationstring · enumOptional

Indicates if PBX wishes (Optional) or requires (Mandatory) TLS clients to present a client certificate:

  • DISABLE: disable client certificate.
  • OPTIONAL: client authentication optional.
  • MANDATORY: force client authentication.
Possible values:
get/transports/{id}
GET /api/transports/{id} HTTP/1.1
Host: HOSTNAME:8887
Authorization: Bearer YOUR_SECRET_TOKEN
Accept: */*
{
  "id": "xxxxxx",
  "protocol": "UDP",
  "port": 1000,
  "verification": "DISABLE"
}

Update transport

post

Update a new transport.

Authorizations
AuthorizationstringRequired
Bearer authentication header of the form Bearer <token>.
Path parameters
idstringRequiredExample: NzAwNTUxOTA5NzczMTQ4MTYw
Body
portinteger · int32 · max: 65535Optional

A port number is a 16-bit unsigned integer, thus ranging from 0 to 65535. For TCP, port number 0 is reserved and cannot be used, while for UDP, the source port is optional and a value of zero means no port

Example: 80
verificationstring · enumOptional

Indicates if PBX wishes (Optional) or requires (Mandatory) TLS clients to present a client certificate:

  • DISABLE: disable client certificate.
  • OPTIONAL: client authentication optional.
  • MANDATORY: force client authentication.
Possible values:
Responses
200

OK

No content

post/transports/{id}
POST /api/transports/{id} HTTP/1.1
Host: HOSTNAME:8887
Authorization: Bearer YOUR_SECRET_TOKEN
Content-Type: application/json
Accept: */*
Content-Length: 38

{
  "port": 1000,
  "verification": "DISABLE"
}

No content

Destroy transport

post

Destroy transport

Authorizations
AuthorizationstringRequired
Bearer authentication header of the form Bearer <token>.
Path parameters
idstringRequiredExample: NzAwNTUxOTA5NzczMTQ4MTYw
Responses
204

No Content

No content

post/transports/{id}/destroy
POST /api/transports/{id}/destroy HTTP/1.1
Host: HOSTNAME:8887
Authorization: Bearer YOUR_SECRET_TOKEN
Accept: */*

No content

Query transport's status

get

Query transport's status

Authorizations
AuthorizationstringRequired
Bearer authentication header of the form Bearer <token>.
Path parameters
idstring · enumRequired

The transport protocol:
Can be either:

  • UDP:
  • TCP:
  • TLS:
Possible values:
Responses
200

Success

application/json
statusstring · enumRead-onlyOptional

Status of transport includes:

  • ACTIVATED:
  • DEACTIVATED:
Possible values:
get/transports/{id}/status
GET /api/transports/{id}/status HTTP/1.1
Host: HOSTNAME:8887
Authorization: Bearer YOUR_SECRET_TOKEN
Accept: */*
{
  "status": "ACTIVATED"
}

List tenants

get

Returns a list of tenant summary information. Note that it uses a different, smaller representation of a tenant than retrieving a single tenant.

Authorizations
AuthorizationstringRequired
Bearer authentication header of the form Bearer <token>.
Query parameters
filterstringOptional

Use the filter query parameter to retrieve just a subset of a collection.

searchstringOptional

Use the search query parameter to restrict the results of a request to match a search criterion.

orderbystringOptional

Use the orderby query parameter to specify the sort order of the items returned from server.
The default order is ascending order.

skipinteger · int32Optional

Use the skip query parameter to set the number of items to skip at the start of a collection.

Default: 0
topinteger · int32 · min: 1 · max: 100Optional

Use the top query parameter to specify the page size of the result set.

Default: 100
Responses
200

OK

application/json
countinteger · int64Optional

Total number of resource.

Example: 100
get/tenants
GET /api/tenants HTTP/1.1
Host: HOSTNAME:8887
Authorization: Bearer YOUR_SECRET_TOKEN
Accept: */*
{
  "count": 1,
  "items": [
    {
      "id": "xxxxxx",
      "name": "example",
      "domain": "example.com",
      "max_extensions": 100,
      "max_cc_users": 30,
      "max_advanced_users": 10,
      "current_extensions": 100,
      "max_concurrent_calls": 100,
      "enabled": true,
      "website": "https://example.com",
      "timezone": "",
      "currency": "",
      "region": "",
      "avatar_file_name": "example",
      "avatar_file_size": 100,
      "avatar_file_url": "",
      "created_at": "2020-01-01T00:00:00Z",
      "enable_last_call_routing": false,
      "last_call_routing_duration": 1,
      "dealer_id": "xxxxxx",
      "dealer_name": "example",
      "dealer_display_name": "example",
      "dealer_level": "DISTRIBUTOR"
    }
  ]
}

Create a tenant

post

Create a new Tenant. In Modular mode, an enabled Tenant owned by a Dealer must fit both the Dealer quota and the shared System License quota. A disabled Tenant may be preconfigured without reserving module quota.

Authorizations
AuthorizationstringRequired
Bearer authentication header of the form Bearer <token>.
Body
namestring · min: 1 · max: 1024Required

The name of the tenant.

domainstring · min: 1 · max: 280Required

The SIP domain of tenant.
It is usually a fully qualified domain name (FQDN). If there is no FQDN, you can also use the IP address of the PBX server as the SIP domain. The SIP domain name is only used for SIP message authentication and does not require analysis.

websitestring · min: 1 · max: 128Required

The official website of tenant.

timezonestringRequired

The IANA Time Zone names, such as "Asia/Shanghai".

currencystringRequired

The Currency code (ISO 4217).

Example: USD
regionstringRequired

A valid country code based on iso3166-1 alpha-3 standard. see: https://www.iso.org/iso-3166-country-codes.html

enabledbooleanOptional

Enable this tenant or not.

Default: true
enable_video_recordingbooleanOptional

Allow extension video recording.

Default: false
allow_password_retrievalbooleanOptional

Allow the user result api to return the user password and the user extension password.

Default: false
enable_audio_recordingbooleanOptional

Allow extension audio recording.

Default: false
enable_call_queue_audio_recordingbooleanOptional

Allow call queue audio recording.

Default: false
enable_ring_group_audio_recordingbooleanOptional

Allow ring group audio recording.

Default: false
enable_trunk_audio_recordingbooleanOptional

Allow trunk audio recording.

Default: false
enable_virtual_receptionist_audio_recordingbooleanOptional

Allow virtual receptionist audio recording.

Default: false
enable_dual_track_recordingbooleanOptional

Allow dual track recording for calls.

Default: false
enable_billingbooleanOptional

Enable call billing or not.

Default: false
enable_feature_billingbooleanOptional

Enable call billing feature or not.

Default: false
enable_feature_call_statisticsbooleanOptional

Enable call statistics feature or not.

Default: true
enable_feature_contact_centerbooleanOptional

Enable contact center feature or not.

Default: true
enable_feature_message_channelsbooleanOptional

Enable message channels feature or not.

Default: true
enable_feature_microsoft_teamsbooleanOptional

Enable Microsoft Teams feature or not.

Default: true
enable_feature_trunksbooleanOptional

Enable trunks feature or not.

Default: true
enable_feature_whats_appbooleanOptional

Enable WhatsApp feature or not.

Default: true
enable_feature_crmbooleanOptional

Enable CRM integrations feature or not.

Default: true
enable_night_modebooleanOptional

Whether to enable night mode.

Default: false
enable_two_factor_authenticationbooleanOptional

Whether to enable two-factor authentication.

Default: false
enable_verify_phone_auto_provisioningbooleanOptional

Whether to enable-factor auto-provisioning of verify phone.

Default: false
enable_pre_call_announcementbooleanOptional

Whether to enable Pre-Call Announcement / Pre-Alert.

Default: false
custom_optionsstringOptional

Some custom configuration options serialized as json string

max_extensionsinteger · int32Optional

The maximum number of extensions that the tenant is allowed to create. In Modular mode this is the Tenant's Base allocation and every existing Extension consumes one Base point. 0 means no quota and never means unlimited.

Default: 1000
max_cc_usersinteger · int32Optional

Maximum number of Tenant extensions that may be assigned CC in Modular mode. 0 means no CC quota.

Default: 0
max_advanced_usersinteger · int32Optional

Maximum number of Tenant extensions that may be assigned Advanced in Modular mode. 0 means no Advanced quota.

Default: 0
max_concurrent_callsinteger · int32Optional

The maximum number of concurrent calls that the tenant is allowed to have.

Default: 20
max_ring_groupsinteger · int32Optional

The maximum number of ring groups that the tenant is allowed to create.

Default: 20
max_virtual_receptionistsinteger · int32Optional

The maximum number of virtual receptionists that the tenant is allowed to create.

Default: 20
max_call_queuesinteger · int32Optional

The maximum number of call queues that the tenant is allowed to create.

Default: 20
max_conference_roomsinteger · int32Optional

The maximum number of conference rooms that the tenant is allowed to be online at the same time.

Default: 20
disk_quotastringOptional

The maximum size of disk space that the tenant is allowed to have.
Specify a positive number and specify the unit at the same time, KB, MB, GB, PB are all allowed.
For example: 100MB, 1000GB. Leave it empty, means unlimited.

Default: ""
im_disk_quotastringOptional

The maximum size of disk space that the tenant is allowed to have for IM service.
Specify a positive number and specify the unit at the same time, KB, MB, GB, PB are all allowed.
For example: 100MB, 1000GB. Leave it empty, means unlimited.

Default: ""
extension_im_disk_quotastringOptional

The maximum size of disk space that the extension user is allowed to have for IM service.
Specify a positive number and specify the unit at the same time, KB, MB, GB, PB are all allowed.
For example: 100MB, 1000GB. Leave it empty, means unlimited.

Default: 1GB
recording_retentioninteger · int32 · min: 1Optional

The retention period in days of recordings.

Default: 180
call_report_retentioninteger · min: 1Optional

The retention period in days of call report files.

Default: 30
log_retentioninteger · min: 1Optional

The retention period in days of audit logs and event logs.

Default: 180
temp_file_retentioninteger · min: 1Optional

The retention period in days of temporary files.

Default: 30
contact_match_typestring · enumOptional

The match method of contact:
Can be either:

  • DISABLE: Disable match.
  • MATCH_EXACTLY: Match exactly.
  • MATCH_LENGTH: Match at least specified number of characters.
Default: MATCH_EXACTLYPossible values:
contact_match_lengthinteger · int32Optional

The matched length of characters when contact_match_type is MATCH_LENGTH.

contact_append_typestring · enumOptional

Method for adding Group, Queue or DID/DDI Names to Caller ID:
Can be either:

  • DISABLE: Do not add.
  • APPEND: Append names.
  • PREPEND: Prepend names.
Default: APPENDPossible values:
contact_inbound_rule_append_typestring · enumOptional

Method for adding Group, Queue or DID/DDI Names to Caller ID:
Can be either:

  • DISABLE: Do not add.
  • APPEND: Append names.
  • PREPEND: Prepend names.
Default: APPENDPossible values:
contact_update_intervalinteger · uint32 · min: 1 · max: 43200Optional

The interval for synchronizing contacts from the server, in minutes.

Default: 720
email_recipientsstringOptional

Comma-separated list of email address that should receive notifications.
Allow up to 15 email addresses.

password_force_resetbooleanOptional

Whether to force reset the initial password.

Default: false
soft_phone_templatestringOptional

The template file name used to generate the user configuration file for the soft phone.

Example: app.xml
recording_access_modestring · enumOptional

The recording access mode:
Can be either:

  • PRIVATE: Access the recording file using the private link.
  • PUBLIC: Access the recording file using the public link.
Default: PUBLICPossible values:
enable_last_call_routingbooleanOptional

Whether to enable last call routing.

Default: false
last_call_routing_durationinteger · int32 · min: 1 · max: 8760Optional

The last call routing look back period in hours.

Default: 1
Responses
201

Created

application/json
idstringOptionalExample: NzAwNTUxOTA5NzczMTQ4MTYw
post/tenants
POST /api/tenants HTTP/1.1
Host: HOSTNAME:8887
Authorization: Bearer YOUR_SECRET_TOKEN
Content-Type: application/json
Accept: */*
Content-Length: 2516

{
  "name": "example",
  "domain": "example.com",
  "website": "https://example.com",
  "timezone": "",
  "currency": "",
  "region": "",
  "enabled": true,
  "enable_video_recording": true,
  "ai_engine": {
    "enabled": true,
    "transcription_quota": 100
  },
  "enable_audio_recording": false,
  "enable_call_queue_audio_recording": false,
  "enable_ring_group_audio_recording": false,
  "enable_trunk_audio_recording": false,
  "enable_virtual_receptionist_audio_recording": false,
  "enable_dual_track_recording": true,
  "enable_billing": true,
  "enable_feature_billing": true,
  "enable_feature_call_statistics": true,
  "enable_feature_contact_center": true,
  "enable_feature_message_channels": true,
  "enable_feature_microsoft_teams": true,
  "enable_feature_trunks": true,
  "enable_feature_whats_app": true,
  "enable_night_mode": true,
  "enable_two_factor_authentication": true,
  "enable_verify_phone_auto_provisioning": true,
  "custom_options": "",
  "max_extensions": 1000,
  "max_cc_users": 300,
  "max_advanced_users": 100,
  "max_concurrent_calls": 100,
  "max_ring_groups": 100,
  "max_virtual_receptionists": 100,
  "max_call_queues": 100,
  "max_conference_rooms": 100,
  "disk_quota": "",
  "im_disk_quota": "",
  "extension_im_disk_quota": "",
  "recording_retention": 30,
  "call_report_retention": 30,
  "log_retention": 30,
  "temp_file_retention": 30,
  "office_hours": {
    "monday": {
      "enabled": true,
      "ranges": [
        {
          "from": "09:00",
          "to": "17:00"
        }
      ]
    },
    "tuesday": {
      "enabled": true,
      "ranges": [
        {
          "from": "09:00",
          "to": "17:00"
        }
      ]
    },
    "wednesday": {
      "enabled": true,
      "ranges": [
        {
          "from": "09:00",
          "to": "17:00"
        }
      ]
    },
    "thursday": {
      "enabled": true,
      "ranges": [
        {
          "from": "09:00",
          "to": "17:00"
        }
      ]
    },
    "friday": {
      "enabled": true,
      "ranges": [
        {
          "from": "09:00",
          "to": "17:00"
        }
      ]
    },
    "saturday": {
      "enabled": true,
      "ranges": [
        {
          "from": "09:00",
          "to": "17:00"
        }
      ]
    },
    "sunday": {
      "enabled": true,
      "ranges": [
        {
          "from": "09:00",
          "to": "17:00"
        }
      ]
    }
  },
  "e164": {
    "enabled": true,
    "international_code": "",
    "country": "",
    "area_code": "",
    "national_code": "",
    "prefix": "",
    "remove_special_chars": false,
    "remove_duplicate_countries": false,
    "remove_duplicate_area_codes": false
  },
  "cdr_event": {
    "enabled": true,
    "auth": "BASIC",
    "username": "xxxxxx",
    "password": "xxxxxx",
    "token": "xxxxxx",
    "url": "https://example.com"
  },
  "extension_event": {
    "enabled": true,
    "auth": "BASIC",
    "username": "xxxxxx",
    "password": "xxxxxx",
    "token": "xxxxxx",
    "url": "https://example.com"
  },
  "contact_match_type": "DISABLE",
  "contact_match_length": 1,
  "contact_append_type": "DISABLE",
  "contact_inbound_rule_append_type": "DISABLE",
  "contact_update_interval": 720,
  "email_recipients": "",
  "password_force_reset": false,
  "recording_access_mode": "PUBLIC",
  "enable_last_call_routing": false,
  "last_call_routing_duration": 1,
  "enable_pre_call_announcement": false
}
{
  "id": "xxxxxxxx"
}

Retrieve a tenant

get

Get detailed properties for a tenant.

Authorizations
AuthorizationstringRequired
Bearer authentication header of the form Bearer <token>.
Path parameters
idstringRequiredExample: NzAwNTUxOTA5NzczMTQ4MTYw
Responses
200

OK

application/json
idstringOptionalExample: NzAwNTUxOTA5NzczMTQ4MTYw
namestring · min: 1 · max: 1024Optional

The name of the tenant.

domainstring · min: 1 · max: 280Optional

The SIP domain of tenant.
It is usually a fully qualified domain name (FQDN). If there is no FQDN, you can also use the IP address of the PBX server as the SIP domain. The SIP domain name is only used for SIP message authentication and does not require analysis.

websitestring · min: 1 · max: 128Optional

The official website of tenant.

timezonestringOptional

The IANA Time Zone names, such as "Asia/Shanghai".

currencystringOptional

The Currency code (ISO 4217).

Example: USD
regionstringOptional

A valid country code based on iso3166-1 alpha-3 standard. see: https://www.iso.org/iso-3166-country-codes.html

enabledbooleanOptional

Enable this tenant or not.

Default: true
enable_video_recordingbooleanOptional

Allow extension video recording.

Default: false
enable_audio_recordingbooleanOptional

Allow extension audio recording.

Default: false
enable_call_queue_audio_recordingbooleanOptional

Allow call queue audio recording.

Default: false
enable_ring_group_audio_recordingbooleanOptional

Allow ring group audio recording.

Default: false
enable_trunk_audio_recordingbooleanOptional

Allow trunk audio recording.

Default: false
enable_virtual_receptionist_audio_recordingbooleanOptional

Allow virtual receptionist audio recording.

Default: false
enable_dual_track_recordingbooleanOptional

Allow dual track recording for calls.

Default: false
enable_billingbooleanOptional

Enable call billing or not.

Default: false
allow_password_retrievalbooleanOptional

Allow the user result api to return the user password and the user extension password.

Default: false
enable_feature_billingbooleanOptional

Enable call billing feature or not.

Default: false
enable_feature_call_statisticsbooleanOptional

Enable call statistics feature or not.

Default: true
enable_feature_contact_centerbooleanOptional

Enable contact center feature or not.

Default: true
enable_feature_message_channelsbooleanOptional

Enable message channels feature or not.

Default: true
enable_feature_microsoft_teamsbooleanOptional

Enable Microsoft Teams feature or not.

Default: true
enable_feature_trunksbooleanOptional

Enable trunks feature or not.

Default: true
enable_feature_whats_appbooleanOptional

Enable WhatsApp feature or not.

Default: true
enable_feature_crmbooleanOptional

Enable CRM integrations feature or not.

Default: true
enable_night_modebooleanOptional

Whether to enable night mode.

Default: false
enable_two_factor_authenticationbooleanOptional

Whether to enable two-factor authentication.

Default: false
enable_verify_phone_auto_provisioningbooleanOptional

Whether to enable-factor auto-provisioning of verify phone.

Default: false
enable_pre_call_announcementbooleanOptional

Whether to enable Pre-Call Announcement / Pre-Alert.

Default: false
custom_optionsstringOptional

Some custom configuration options serialized as json string

max_extensionsinteger · int32Optional

The maximum number of extensions that the tenant is allowed to create. In Modular mode this is the Tenant's Base allocation and every existing Extension consumes one Base point. 0 means no quota and never means unlimited.

Default: 1000
max_cc_usersinteger · int32Optional

Maximum number of Tenant extensions that may be assigned CC in Modular mode. 0 means no CC quota.

Default: 0
max_advanced_usersinteger · int32Optional

Maximum number of Tenant extensions that may be assigned Advanced in Modular mode. 0 means no Advanced quota.

Default: 0
max_concurrent_callsinteger · int32Optional

The maximum number of concurrent calls that the tenant is allowed to have.

Default: 20
max_ring_groupsinteger · int32Optional

The maximum number of ring groups that the tenant is allowed to create.

Default: 20
max_virtual_receptionistsinteger · int32Optional

The maximum number of virtual receptionists that the tenant is allowed to create.

Default: 20
max_call_queuesinteger · int32Optional

The maximum number of call queues that the tenant is allowed to create.

Default: 20
max_conference_roomsinteger · int32Optional

The maximum number of conference rooms that the tenant is allowed to be online at the same time.

Default: 20
disk_quotastringOptional

The maximum size of disk space that the tenant is allowed to have.
Specify a positive number and specify the unit at the same time, KB, MB, GB, PB are all allowed.
For example: 100MB, 1000GB. Leave it empty, means unlimited.

Default: ""
used_disk_quotastringOptional

The used disk quota, an number followed by unit (KB, MB, GB, PB).

im_disk_quotastringOptional

The maximum size of disk space that the tenant is allowed to have for IM service.
Specify a positive number and specify the unit at the same time, KB, MB, GB, PB are all allowed.
For example: 100MB, 1000GB. Leave it empty, means unlimited.

Default: ""
extension_im_disk_quotastringOptional

The maximum size of disk space that the extension user is allowed to have for IM service.
Specify a positive number and specify the unit at the same time, KB, MB, GB, PB are all allowed.
For example: 100MB, 1000GB. Leave it empty, means unlimited.

Default: 1GB
recording_retentioninteger · int32 · min: 1Optional

The retention period in days of recordings.

Default: 180
call_report_retentioninteger · min: 1Optional

The retention period in days of call report files.

Default: 30
log_retentioninteger · min: 1Optional

The retention period in days of audit logs and event logs.

Default: 180
temp_file_retentioninteger · min: 1Optional

The retention period in days of temporary files.

Default: 30
soft_phone_templatestringOptional

The template file name used to generate the user configuration file for the soft phone.

Example: app.xml
contact_match_typestring · enumOptional

The match method of contact:
Can be either:

  • DISABLE: Disable match.
  • MATCH_EXACTLY: Match exactly.
  • MATCH_LENGTH: Match at least specified number of characters.
Default: MATCH_EXACTLYPossible values:
contact_match_lengthinteger · int32Optional

The matched length of characters when contact_match_type is MATCH_LENGTH.

contact_append_typestring · enumOptional

Method for adding Group, Queue or DID/DDI Names to Caller ID:
Can be either:

  • DISABLE: Do not add.
  • APPEND: Append names.
  • PREPEND: Prepend names.
Default: APPENDPossible values:
contact_inbound_rule_append_typestring · enumOptional

Method for adding Group, Queue or DID/DDI Names to Caller ID:
Can be either:

  • DISABLE: Do not add.
  • APPEND: Append names.
  • PREPEND: Prepend names.
Default: APPENDPossible values:
contact_update_intervalinteger · uint32 · min: 1 · max: 43200Optional

The interval for synchronizing contacts from the server, in minutes.

Default: 720
email_recipientsstringOptional

Comma-separated list of email address that should receive notifications.
Allow up to 15 email addresses.

password_force_resetbooleanOptional

Whether to force reset the initial password.

Default: false
created_atstring · date_timeOptional

The RFC 3339 format is defined by The date_time notation as defined by RFC 3339, section 5.6, for example, 2017-07-21T17:32:28Z

Example: 2017-07-21T17:32:28Z
avatar_file_namestringOptional

The name of the file.

avatar_file_sizeinteger · int64Optional

The file size in bytes.

Example: 0
avatar_file_urlstringRead-onlyOptional

The relative path to file url for file downloading.

Example: /api/blobs/WexWdABcd5D4PDgzTKV3gAAAEu00WcK
recording_access_modestring · enumOptional

The recording access mode:
Can be either:

  • PRIVATE: Access the recording file using the private link.
  • PUBLIC: Access the recording file using the public link.
Default: PUBLICPossible values:
enable_last_call_routingbooleanOptional

Whether to enable last call routing.

Default: false
last_call_routing_durationinteger · int32 · min: 1 · max: 8760Optional

The last call routing look back period in hours.

Default: 1
dealer_idstringOptionalExample: NzAwNTUxOTA5NzczMTQ4MTYw
dealer_namestring · min: 1 · max: 64Optional

The user's account name.
Only letters, numbers, and the following special characters can be added: underscore, dash, single quote, and period (_, -, ', and .).
Username cannot start or end with period (.).
admin, system, administrator, and root are reserved names for system admin only with case ignored.

dealer_display_namestring · min: 1 · max: 128Optional

The display name of user.

dealer_levelstring · enumOptional

Dealer level includes:

  • DISTRIBUTOR: the first level of dealers.
  • SUB_DISTRIBUTOR: the second level of dealers.
  • RESELLER: the third level of dealers.
Possible values:
get/tenants/{id}
GET /api/tenants/{id} HTTP/1.1
Host: HOSTNAME:8887
Authorization: Bearer YOUR_SECRET_TOKEN
Accept: */*
{
  "id": "xxxxxx",
  "name": "example",
  "domain": "example.com",
  "website": "https://example.com",
  "timezone": "",
  "currency": "",
  "region": "",
  "enabled": true,
  "enable_video_recording": true,
  "ai_engine": {
    "enabled": true,
    "transcription_quota": 100
  },
  "enable_audio_recording": false,
  "enable_call_queue_audio_recording": false,
  "enable_ring_group_audio_recording": false,
  "enable_trunk_audio_recording": false,
  "enable_virtual_receptionist_audio_recording": false,
  "enable_dual_track_recording": true,
  "enable_billing": true,
  "enable_feature_billing": true,
  "enable_feature_call_statistics": true,
  "enable_feature_contact_center": true,
  "enable_feature_message_channels": true,
  "enable_feature_microsoft_teams": true,
  "enable_feature_trunks": true,
  "enable_feature_whats_app": true,
  "enable_night_mode": true,
  "enable_two_factor_authentication": true,
  "enable_verify_phone_auto_provisioning": true,
  "enable_pre_call_announcement": false,
  "custom_options": "",
  "max_extensions": 1000,
  "max_cc_users": 300,
  "max_advanced_users": 100,
  "max_concurrent_calls": 100,
  "max_ring_groups": 100,
  "max_virtual_receptionists": 100,
  "max_call_queues": 100,
  "max_conference_rooms": 100,
  "disk_quota": "",
  "used_disk_quota": "",
  "im_disk_quota": "",
  "extension_im_disk_quota": "",
  "recording_retention": 30,
  "call_report_retention": 30,
  "log_retention": 30,
  "temp_file_retention": 30,
  "office_hours": {
    "monday": {
      "enabled": true,
      "ranges": [
        {
          "from": "09:00",
          "to": "17:00"
        }
      ]
    },
    "tuesday": {
      "enabled": true,
      "ranges": [
        {
          "from": "09:00",
          "to": "17:00"
        }
      ]
    },
    "wednesday": {
      "enabled": true,
      "ranges": [
        {
          "from": "09:00",
          "to": "17:00"
        }
      ]
    },
    "thursday": {
      "enabled": true,
      "ranges": [
        {
          "from": "09:00",
          "to": "17:00"
        }
      ]
    },
    "friday": {
      "enabled": true,
      "ranges": [
        {
          "from": "09:00",
          "to": "17:00"
        }
      ]
    },
    "saturday": {
      "enabled": true,
      "ranges": [
        {
          "from": "09:00",
          "to": "17:00"
        }
      ]
    },
    "sunday": {
      "enabled": true,
      "ranges": [
        {
          "from": "09:00",
          "to": "17:00"
        }
      ]
    }
  },
  "outbound_caller_ids": [
    {
      "provider_id": "xxxxxx",
      "provider_name": "some trunk",
      "provider_brand": "Generic",
      "provider_did_numbers": "1000-2000",
      "caller_id": "1000",
      "description": "example",
      "display_name": "1000"
    }
  ],
  "e164": {
    "enabled": true,
    "international_code": "",
    "country": "",
    "area_code": "",
    "national_code": "",
    "prefix": "",
    "remove_special_chars": false,
    "remove_duplicate_countries": false,
    "remove_duplicate_area_codes": false
  },
  "cdr_event": {
    "enabled": true,
    "auth": "BASIC",
    "username": "xxxxxx",
    "password": "xxxxxx",
    "token": "xxxxxx",
    "url": "https://example.com"
  },
  "extension_event": {
    "enabled": true,
    "auth": "BASIC",
    "username": "xxxxxx",
    "password": "xxxxxx",
    "token": "xxxxxx",
    "url": "https://example.com"
  },
  "contact_match_type": "DISABLE",
  "contact_match_length": 1,
  "contact_append_type": "DISABLE",
  "contact_inbound_rule_append_type": "DISABLE",
  "contact_update_interval": 720,
  "email_recipients": "",
  "password_force_reset": false,
  "created_at": "2020-01-01T00:00:00Z",
  "avatar_file_name": "example",
  "avatar_file_size": 100,
  "avatar_file_url": "",
  "soft_phone_template": "app.xml",
  "recording_access_mode": "PUBLIC",
  "enable_last_call_routing": false,
  "last_call_routing_duration": 1,
  "dealer_id": "xxxxxx",
  "dealer_name": "example",
  "dealer_display_name": "example",
  "dealer_level": "DISTRIBUTOR"
}

Update a tenant

post

Update Tenant properties by its unique ID. In Modular mode, increasing an enabled Tenant's quota or re-enabling a Tenant must fit both its owning Dealer quota and the shared System License quota. Quota errors use LICENSE_QUOTA_EXCEEDED; detail.scope is dealer or system to identify the exhausted pool. Disabled Tenants retain their configured quota without reserving License points.

Authorizations
AuthorizationstringRequired
Bearer authentication header of the form Bearer <token>.
Path parameters
idstringRequiredExample: NzAwNTUxOTA5NzczMTQ4MTYw
Body
namestring · min: 1 · max: 1024Optional

The name of the tenant.

domainstring · min: 1 · max: 280Optional

The SIP domain of tenant.
It is usually a fully qualified domain name (FQDN). If there is no FQDN, you can also use the IP address of the PBX server as the SIP domain. The SIP domain name is only used for SIP message authentication and does not require analysis.

websitestring · min: 1 · max: 128Optional

The official website of tenant.

timezonestringOptional

The IANA Time Zone names, such as "Asia/Shanghai".

currencystringOptional

The Currency code (ISO 4217).

Example: USD
regionstringOptional

A valid country code based on iso3166-1 alpha-3 standard. see: https://www.iso.org/iso-3166-country-codes.html

enabledbooleanOptional

Enable this tenant or not.

Default: true
enable_video_recordingbooleanOptional

Allow extension video recording.

Default: false
enable_audio_recordingbooleanOptional

Allow extension audio recording.

Default: false
enable_call_queue_audio_recordingbooleanOptional

Allow call queue audio recording.

Default: false
enable_ring_group_audio_recordingbooleanOptional

Allow ring group audio recording.

Default: false
enable_trunk_audio_recordingbooleanOptional

Allow trunk audio recording.

Default: false
enable_virtual_receptionist_audio_recordingbooleanOptional

Allow virtual receptionist audio recording.

Default: false
enable_dual_track_recordingbooleanOptional

Allow dual track recording for calls.

Default: false
enable_billingbooleanOptional

Enable call billing or not.

Default: false
enable_feature_billingbooleanOptional

Enable call billing feature or not.

Default: false
allow_password_retrievalbooleanOptional

Allow the user result api to return the user password and the user extension password.

Default: false
enable_feature_call_statisticsbooleanOptional

Enable call statistics feature or not.

Default: true
enable_feature_contact_centerbooleanOptional

Enable contact center feature or not.

Default: true
enable_feature_message_channelsbooleanOptional

Enable message channels feature or not.

Default: true
enable_feature_microsoft_teamsbooleanOptional

Enable Microsoft Teams feature or not.

Default: true
enable_feature_trunksbooleanOptional

Enable trunks feature or not.

Default: true
enable_feature_whats_appbooleanOptional

Enable WhatsApp feature or not.

Default: true
enable_feature_crmbooleanOptional

Enable CRM integrations feature or not.

Default: true
enable_night_modebooleanOptional

Whether to enable night mode.

Default: false
enable_two_factor_authenticationbooleanOptional

Whether to enable two-factor authentication.

Default: false
enable_verify_phone_auto_provisioningbooleanOptional

Whether to enable-factor auto-provisioning of verify phone.

Default: false
enable_pre_call_announcementbooleanOptional

Whether to enable Pre-Call Announcement / Pre-Alert.

Default: false
custom_optionsstringOptional

Some custom configuration options serialized as json string

max_extensionsinteger · int32Optional

The maximum number of extensions that the tenant is allowed to create. In Modular mode this is the Tenant's Base allocation and every existing Extension consumes one Base point. 0 means no quota and never means unlimited.

Default: 1000
max_cc_usersinteger · int32Optional

Maximum number of Tenant extensions that may be assigned CC in Modular mode. 0 means no CC quota.

Default: 0
max_advanced_usersinteger · int32Optional

Maximum number of Tenant extensions that may be assigned Advanced in Modular mode. 0 means no Advanced quota.

Default: 0
max_concurrent_callsinteger · int32Optional

The maximum number of concurrent calls that the tenant is allowed to have.

Default: 20
max_ring_groupsinteger · int32Optional

The maximum number of ring groups that the tenant is allowed to create.

Default: 20
max_virtual_receptionistsinteger · int32Optional

The maximum number of virtual receptionists that the tenant is allowed to create.

Default: 20
max_call_queuesinteger · int32Optional

The maximum number of call queues that the tenant is allowed to create.

Default: 20
max_conference_roomsinteger · int32Optional

The maximum number of conference rooms that the tenant is allowed to be online at the same time.

Default: 20
disk_quotastringOptional

The maximum size of disk space that the tenant is allowed to have.
Specify a positive number and specify the unit at the same time, KB, MB, GB, PB are all allowed.
For example: 100MB, 1000GB. Leave it empty, means unlimited.

Default: ""
im_disk_quotastringOptional

The maximum size of disk space that the tenant is allowed to have for IM service.
Specify a positive number and specify the unit at the same time, KB, MB, GB, PB are all allowed.
For example: 100MB, 1000GB. Leave it empty, means unlimited.

Default: ""
extension_im_disk_quotastringOptional

The maximum size of disk space that the extension user is allowed to have for IM service.
Specify a positive number and specify the unit at the same time, KB, MB, GB, PB are all allowed.
For example: 100MB, 1000GB. Leave it empty, means unlimited.

Default: 1GB
recording_retentioninteger · int32 · min: 1Optional

The retention period in days of recordings.

Default: 180
call_report_retentioninteger · min: 1Optional

The retention period in days of call report files.

Default: 30
log_retentioninteger · min: 1Optional

The retention period in days of audit logs and event logs.

Default: 180
temp_file_retentioninteger · min: 1Optional

The retention period in days of temporary files.

Default: 30
contact_match_typestring · enumOptional

The match method of contact:
Can be either:

  • DISABLE: Disable match.
  • MATCH_EXACTLY: Match exactly.
  • MATCH_LENGTH: Match at least specified number of characters.
Default: MATCH_EXACTLYPossible values:
contact_match_lengthinteger · int32Optional

The matched length of characters when contact_match_type is MATCH_LENGTH.

contact_append_typestring · enumOptional

Method for adding Group, Queue or DID/DDI Names to Caller ID:
Can be either:

  • DISABLE: Do not add.
  • APPEND: Append names.
  • PREPEND: Prepend names.
Default: APPENDPossible values:
contact_inbound_rule_append_typestring · enumOptional

Method for adding Group, Queue or DID/DDI Names to Caller ID:
Can be either:

  • DISABLE: Do not add.
  • APPEND: Append names.
  • PREPEND: Prepend names.
Default: APPENDPossible values:
contact_update_intervalinteger · uint32 · min: 1 · max: 43200Optional

The interval for synchronizing contacts from the server, in minutes.

Default: 720
email_recipientsstringOptional

Comma-separated list of email address that should receive notifications.
Allow up to 15 email addresses.

password_force_resetbooleanOptional

Whether to force reset the initial password.

Default: false
soft_phone_templatestringOptional

The template file name used to generate the user configuration file for the soft phone.

Example: app.xml
recording_access_modestring · enumOptional

The recording access mode:
Can be either:

  • PRIVATE: Access the recording file using the private link.
  • PUBLIC: Access the recording file using the public link.
Default: PUBLICPossible values:
enable_last_call_routingbooleanOptional

Whether to enable last call routing.

Default: false
last_call_routing_durationinteger · int32 · min: 1 · max: 8760Optional

The last call routing look back period in hours.

Default: 1
Responses
200

OK

No content

post/tenants/{id}
POST /api/tenants/{id} HTTP/1.1
Host: HOSTNAME:8887
Authorization: Bearer YOUR_SECRET_TOKEN
Content-Type: application/json
Accept: */*
Content-Length: 2548

{
  "name": "example",
  "domain": "example.com",
  "website": "https://example.com",
  "timezone": "",
  "currency": "",
  "region": "",
  "enabled": true,
  "enable_video_recording": true,
  "ai_engine": {
    "enabled": true,
    "transcription_quota": 100
  },
  "enable_audio_recording": false,
  "enable_call_queue_audio_recording": false,
  "enable_ring_group_audio_recording": false,
  "enable_trunk_audio_recording": false,
  "enable_virtual_receptionist_audio_recording": false,
  "enable_dual_track_recording": true,
  "enable_billing": true,
  "enable_feature_billing": true,
  "enable_feature_call_statistics": true,
  "enable_feature_contact_center": true,
  "enable_feature_message_channels": true,
  "enable_feature_microsoft_teams": true,
  "enable_feature_trunks": true,
  "enable_feature_whats_app": true,
  "enable_night_mode": true,
  "enable_two_factor_authentication": true,
  "enable_verify_phone_auto_provisioning": true,
  "enable_pre_call_announcement": false,
  "custom_options": "",
  "max_extensions": 1000,
  "max_cc_users": 300,
  "max_advanced_users": 100,
  "max_concurrent_calls": 100,
  "max_ring_groups": 100,
  "max_virtual_receptionists": 100,
  "max_call_queues": 100,
  "max_conference_rooms": 100,
  "disk_quota": "",
  "im_disk_quota": "",
  "extension_im_disk_quota": "",
  "recording_retention": 30,
  "call_report_retention": 30,
  "log_retention": 30,
  "temp_file_retention": 30,
  "office_hours": {
    "monday": {
      "enabled": true,
      "ranges": [
        {
          "from": "09:00",
          "to": "17:00"
        }
      ]
    },
    "tuesday": {
      "enabled": true,
      "ranges": [
        {
          "from": "09:00",
          "to": "17:00"
        }
      ]
    },
    "wednesday": {
      "enabled": true,
      "ranges": [
        {
          "from": "09:00",
          "to": "17:00"
        }
      ]
    },
    "thursday": {
      "enabled": true,
      "ranges": [
        {
          "from": "09:00",
          "to": "17:00"
        }
      ]
    },
    "friday": {
      "enabled": true,
      "ranges": [
        {
          "from": "09:00",
          "to": "17:00"
        }
      ]
    },
    "saturday": {
      "enabled": true,
      "ranges": [
        {
          "from": "09:00",
          "to": "17:00"
        }
      ]
    },
    "sunday": {
      "enabled": true,
      "ranges": [
        {
          "from": "09:00",
          "to": "17:00"
        }
      ]
    }
  },
  "e164": {
    "enabled": true,
    "international_code": "",
    "country": "",
    "area_code": "",
    "national_code": "",
    "prefix": "",
    "remove_special_chars": false,
    "remove_duplicate_countries": false,
    "remove_duplicate_area_codes": false
  },
  "cdr_event": {
    "enabled": true,
    "auth": "BASIC",
    "username": "xxxxxx",
    "password": "xxxxxx",
    "token": "xxxxxx",
    "url": "https://example.com"
  },
  "extension_event": {
    "enabled": true,
    "auth": "BASIC",
    "username": "xxxxxx",
    "password": "xxxxxx",
    "token": "xxxxxx",
    "url": "https://example.com"
  },
  "contact_match_type": "DISABLE",
  "contact_match_length": 1,
  "contact_append_type": "DISABLE",
  "contact_inbound_rule_append_type": "DISABLE",
  "contact_update_interval": 720,
  "email_recipients": "",
  "password_force_reset": false,
  "soft_phone_template": "app.xml",
  "recording_access_mode": "PUBLIC",
  "enable_last_call_routing": false,
  "last_call_routing_duration": 1
}

No content

Switch between tenants

post

Switch between tenants.

Authorizations
AuthorizationstringRequired
Bearer authentication header of the form Bearer <token>.
Query parameters
idstringOptionalExample: NzAwNTUxOTA5NzczMTQ4MTYw
Responses
200

OK

No content

post/tenants/switch
POST /api/tenants/switch HTTP/1.1
Host: HOSTNAME:8887
Authorization: Bearer YOUR_SECRET_TOKEN
Accept: */*

No content

Retrieve dealer information the tenant belongs

get

Get the dealer to which the tenant belongs.

Authorizations
AuthorizationstringRequired
Bearer authentication header of the form Bearer <token>.
Path parameters
idstringRequiredExample: NzAwNTUxOTA5NzczMTQ4MTYw
Responses
200

OK

application/json
get/tenants/{id}/dealers
GET /api/tenants/{id}/dealers HTTP/1.1
Host: HOSTNAME:8887
Authorization: Bearer YOUR_SECRET_TOKEN
Accept: */*
{
  "items": [
    {
      "id": "xxxxxx",
      "level": "DISTRIBUTOR",
      "name": "example",
      "display_name": "example"
    }
  ]
}

Designate tenant to dealer

post

Designate tenant to dealer.

Authorizations
AuthorizationstringRequired
Bearer authentication header of the form Bearer <token>.
Path parameters
idstringRequiredExample: NzAwNTUxOTA5NzczMTQ4MTYw
dealer_idstringRequiredExample: NzAwNTUxOTA5NzczMTQ4MTYw
Responses
200

OK

No content

post/tenants/{id}/dealers/{dealer_id}
POST /api/tenants/{id}/dealers/{dealer_id} HTTP/1.1
Host: HOSTNAME:8887
Authorization: Bearer YOUR_SECRET_TOKEN
Accept: */*

No content

Remove tenant to dealer

post

Remove tenant from dealer.

Authorizations
AuthorizationstringRequired
Bearer authentication header of the form Bearer <token>.
Path parameters
idstringRequiredExample: NzAwNTUxOTA5NzczMTQ4MTYw
dealer_idstringRequiredExample: NzAwNTUxOTA5NzczMTQ4MTYw
Responses
204

No Content

No content

post/tenants/{id}/dealers/{dealer_id}/destroy
POST /api/tenants/{id}/dealers/{dealer_id}/destroy HTTP/1.1
Host: HOSTNAME:8887
Authorization: Bearer YOUR_SECRET_TOKEN
Accept: */*

No content

Delete a tenant

post
Authorizations
AuthorizationstringRequired
Bearer authentication header of the form Bearer <token>.
Path parameters
idstringRequiredExample: NzAwNTUxOTA5NzczMTQ4MTYw
Responses
204

No Content

No content

post/tenants/{id}/destroy
POST /api/tenants/{id}/destroy HTTP/1.1
Host: HOSTNAME:8887
Authorization: Bearer YOUR_SECRET_TOKEN
Accept: */*

No content

Bulk retrieve tenants statistics

post

Bulk retrieve tenants statistics.

Authorizations
AuthorizationstringRequired
Bearer authentication header of the form Bearer <token>.
Body
itemsstringOptionalExample: NzAwNTUxOTA5NzczMTQ4MTYw
Responses
200

OK

application/json
post/tenants/summaries/query
POST /api/tenants/summaries/query HTTP/1.1
Host: HOSTNAME:8887
Authorization: Bearer YOUR_SECRET_TOKEN
Content-Type: application/json
Accept: */*
Content-Length: 23

{
  "items": [
    "xxx",
    "yyy"
  ]
}
{
  "items": [
    {
      "tenant_id": "xxx",
      "tenant_name": "example",
      "total_users": 1000,
      "online_users": 100
    }
  ]
}

Retrieve license information

get

Requests the latest complete result from CallManager and atomically commits its authorization fields to the shared PostgreSQL snapshot before returning them. If the snapshot commit fails, the uncommitted result is not exposed as active. Product, customer, call and online-user information remains sourced from CallManager. Modular License deployments additionally return the effective Base, CC and Advanced points. license_status reports the most recent asynchronous activation result and may be omitted by older CallManager versions.

Authorizations
AuthorizationstringRequired
Bearer authentication header of the form Bearer <token>.
Responses
200

OK

application/json
api_versionstringOptional

API version of PortSIP PBX.

product_namestringOptional

Product name of PortSIP PBX.

Example: PortSIP PBX
max_sim_callsinteger · int32Optional

Max Simultaneous Calls allowed for this version.

max_online_usersinteger · int32Optional

Max online users allowed for this license.

license_keystringOptional

License key of PortSIP PBX. It may be an empty string for a node or floating result representing an installation without a Key. A modular result always contains a Key.

company_namestringOptional

Company name of license user.

contact_emailstringOptional

Contact email of license user.

license_typestring · enumOptional

The exact current License type confirmed by CallManager. node and floating preserve the existing PBX user-limit behavior. Only modular enables independent Base, CC, and Advanced quotas.

Possible values:
base_max_usersinteger · int32Optional

Confirmed effective module points returned by CallManager. 0 means that the module has no usable quota; it never means unlimited.

cc_max_usersinteger · int32Optional

Confirmed effective module points returned by CallManager. 0 means that the module has no usable quota; it never means unlimited.

advanced_max_usersinteger · int32Optional

Confirmed effective module points returned by CallManager. 0 means that the module has no usable quota; it never means unlimited.

get/license
GET /api/license HTTP/1.1
Host: HOSTNAME:8887
Authorization: Bearer YOUR_SECRET_TOKEN
Accept: */*
{
  "api_version": "22",
  "product_name": "PortSIP PBX",
  "max_sim_calls": 100,
  "max_online_users": 100,
  "license_key": "XXXX-XXXX-XXXX",
  "company_name": "Example Company",
  "contact_email": "admin@example.com",
  "license_type": "modular",
  "license_status": {
    "activated_unix_seconds": 1787711520,
    "status_reason": "LICENSE_STATUS_OK"
  },
  "base_max_users": 100,
  "cc_max_users": 50,
  "advanced_max_users": 20
}

Submit a License Key for asynchronous authentication

post

Saves the Key in the existing protected system location and notifies CallManager once after the database transaction commits. HTTP 200 means that the Key was saved and the notification was accepted by NATS; it does not mean that CallManager consumed it or that authentication succeeded. Continue polling GET /license for the confirmed License result. The current confirmed snapshot remains active until CallManager pushes a new complete authorization result.

Authorizations
AuthorizationstringRequired
Bearer authentication header of the form Bearer <token>.
Body
license_keystringRequired

License key of PortSIP PBX. It may be an empty string for a node or floating result representing an installation without a Key. A modular result always contains a Key.

Responses
200

The Key was stored and submitted for asynchronous authentication.

No content

post/license
POST /api/license HTTP/1.1
Host: HOSTNAME:8887
Authorization: Bearer YOUR_SECRET_TOKEN
Content-Type: application/json
Accept: */*
Content-Length: 39

{
  "license_key": "xxxxxxxxxxxxxxxxxxxxx"
}

No content

Show certificate key

get

Retrieve content of certificate key.

Authorizations
AuthorizationstringRequired
Bearer authentication header of the form Bearer <token>.
Responses
200

OK

application/json
crtstringOptional

Content of this certificate file for TLS or WSS transport protocol. The certificate file MUST be PEM-encoded with X.509.

keystringOptional

Content of this private certificate file for TLS or WSS transport protocol.

get/key
GET /api/key HTTP/1.1
Host: HOSTNAME:8887
Authorization: Bearer YOUR_SECRET_TOKEN
Accept: */*
{
  "crt": "",
  "key": ""
}

Update certificate key

post

Update certificate key.

Authorizations
AuthorizationstringRequired
Bearer authentication header of the form Bearer <token>.
Body
crtstringRequired

Content of this certificate file for TLS or WSS transport protocol. The certificate file MUST be PEM-encoded with X.509.

keystringRequired

Content of this private certificate file for TLS or WSS transport protocol.

Responses
204

No Content

No content

post/key
POST /api/key HTTP/1.1
Host: HOSTNAME:8887
Authorization: Bearer YOUR_SECRET_TOKEN
Content-Type: application/json
Accept: */*
Content-Length: 19

{
  "crt": "",
  "key": ""
}

No content

Update brand information

post

Update brand information.

Authorizations
AuthorizationstringRequired
Bearer authentication header of the form Bearer <token>.
Body
themestring · enumOptional

The color scheme:
Updating the color scheme does not change the logo or favicon. Can be either:

  • BLUE: Blue
  • DARK: Dark
  • GREEN: Green
  • LIGHT_BLUE: Light Blue
  • PURPLE: Purple
Possible values:
logostringOptional

The unique ID of the file.

Example: NzAwNTUxOTA5NzczMTQ4MTYw
faviconstringOptional

The unique ID of the file.

Example: NzAwNTUxOTA5NzczMTQ4MTYw
titlestringOptional

The title text.
This text will be displayed as the title.

copyrightstringOptional

The copyright text.
This text will be displayed as the copyright.

productstringOptional

The product name text.
This text will be displayed as the product name.

websitestringOptional

The website text.
This text will be displayed as the product website.

forumstringOptional

The forum url.
This text will be displayed as the forum url.

bottom_textstringOptional

The bottom text, maximum size is 256 characters. This text will be displayed at the bottom of the login page. It can be either plain text or HTML code.

Responses
200

OK

No content

post/brand
POST /api/brand HTTP/1.1
Host: HOSTNAME:8887
Authorization: Bearer YOUR_SECRET_TOKEN
Content-Type: application/json
Accept: */*
Content-Length: 115

{
  "theme": "BLUE",
  "title": "",
  "copyright": "",
  "product": "",
  "website": "https://example.com",
  "forum": "",
  "bottom_text": ""
}

No content

Retrieve current dealer

get

Get details of current dealer.

Authorizations
AuthorizationstringRequired
Bearer authentication header of the form Bearer <token>.
Responses
200

OK

application/json
idstringOptionalExample: NzAwNTUxOTA5NzczMTQ4MTYw
enabledbooleanOptional

Enable this dealer or not.

Default: true
levelstring · enumOptional

Dealer level includes:

  • DISTRIBUTOR: the first level of dealers.
  • SUB_DISTRIBUTOR: the second level of dealers.
  • RESELLER: the third level of dealers.
Possible values:
namestring · min: 1 · max: 64Optional

The user's account name.
Only letters, numbers, and the following special characters can be added: underscore, dash, single quote, and period (_, -, ', and .).
Username cannot start or end with period (.).
admin, system, administrator, and root are reserved names for system admin only with case ignored.

emailstring · max: 128Optional

The email address.

Example: example@example.com
display_namestring · min: 1 · max: 128Optional

The display name of user.

websitestringOptional

The website of user.

phonestring · max: 32Optional

The mobile phone number of user.

addressstring · max: 128Optional

The address.

descriptionstringOptional

The description of dealer.

max_tenantsinteger · int32Optional

The maximum number of tenants that the dealer is allowed to create.

Default: 100
max_extensionsinteger · int32Optional

Maximum Base quota that this Dealer can allocate to direct children. In Modular mode this is the Dealer's Base allocation; 0 means no Base quota and never means unlimited. A top-level Dealer limit assigned by the System administrator may exceed the System License total; enabled Tenant allocation is still constrained by the shared System License.

Default: 50000
max_cc_usersinteger · int32Optional

Maximum CC quota that this Dealer can allocate to direct children in Modular mode. 0 means no CC quota. A top-level Dealer limit assigned by the System administrator may exceed the System License total.

Default: 0
max_advanced_usersinteger · int32Optional

Maximum Advanced quota that this Dealer can allocate to direct children in Modular mode. 0 means no Advanced quota. A top-level Dealer limit assigned by the System administrator may exceed the System License total.

Default: 0
timezonestringOptional

The IANA Time Zone names, such as "Asia/Shanghai".

get/dealer
GET /api/dealer HTTP/1.1
Host: HOSTNAME:8887
Authorization: Bearer YOUR_SECRET_TOKEN
Accept: */*
{
  "id": "xxxxxx",
  "enabled": true,
  "level": "DISTRIBUTOR",
  "name": "example",
  "email": "example@example.com",
  "display_name": "example",
  "website": "https://example.com",
  "phone": "",
  "address": "",
  "description": "",
  "max_tenants": 100,
  "max_extensions": 1000,
  "max_cc_users": 300,
  "max_advanced_users": 100,
  "timezone": "UTC"
}

Update current dealer

post

Modify the settings of the current dealer.

Authorizations
AuthorizationstringRequired
Bearer authentication header of the form Bearer <token>.
Body
emailstring · max: 128Optional

The email address.

Example: example@example.com
display_namestring · min: 1 · max: 128Optional

The display name of user.

websitestringOptional

The website of user.

phonestring · max: 32Optional

The mobile phone number of user.

addressstring · max: 128Optional

The address.

descriptionstringOptional

The description of dealer.

timezonestringOptional

The IANA Time Zone names, such as "Asia/Shanghai".

Responses
200

OK

No content

post/dealer
POST /api/dealer HTTP/1.1
Host: HOSTNAME:8887
Authorization: Bearer YOUR_SECRET_TOKEN
Content-Type: application/json
Accept: */*
Content-Length: 146

{
  "email": "example@example.com",
  "display_name": "example",
  "website": "https://example.com",
  "phone": "",
  "address": "",
  "description": "",
  "timezone": "UTC"
}

No content

Retrieve current dealer status

get

Get status of current dealer.

Authorizations
AuthorizationstringRequired
Bearer authentication header of the form Bearer <token>.
Responses
200

OK

application/json
versionstringOptional

The version information of PortSIP PBX.

license_typestringOptional

The effective License type (node, floating, or modular). The value is read from the shared system License snapshot when available. Only modular enables module quotas.

max_dealersinteger · int32Optional

The maximum number of sub-dealers.

current_dealersinteger · int32Optional

The number of current sub-dealers.

max_usersinteger · int32Optional

The maximum number of authorized users purchased by the dealer from distributor.

current_usersinteger · int32Optional

The number of current users of the dealer.

max_tenantsinteger · int32Optional

The maximum number of tenants the current dealer is allowed to create.

current_tenantsinteger · int32Optional

The number of current tenants of the dealer.

get/dealer/status
GET /api/dealer/status HTTP/1.1
Host: HOSTNAME:8887
Authorization: Bearer YOUR_SECRET_TOKEN
Accept: */*
{
  "version": "",
  "license_type": "modular",
  "max_dealers": 100,
  "current_dealers": 10,
  "max_users": 1000,
  "current_users": 100,
  "max_tenants": 100,
  "current_tenants": 10,
  "license_usage": {
    "base": {
      "max": 1000,
      "allocated": 800,
      "used": 650
    },
    "cc": {
      "max": 500,
      "allocated": 300,
      "used": 250
    },
    "advanced": {
      "max": 200,
      "allocated": 100,
      "used": 80
    }
  }
}

Change current dealer username

post

Change current dealer username.

Authorizations
AuthorizationstringRequired
Bearer authentication header of the form Bearer <token>.
Body
namestring · min: 1 · max: 64Required

The user's account name.
Only letters, numbers, and the following special characters can be added: underscore, dash, single quote, and period (_, -, ', and .).
Username cannot start or end with period (.).
admin, system, administrator, and root are reserved names for system admin only with case ignored.

Responses
200

OK

No content

post/dealer/username
POST /api/dealer/username HTTP/1.1
Host: HOSTNAME:8887
Authorization: Bearer YOUR_SECRET_TOKEN
Content-Type: application/json
Accept: */*
Content-Length: 18

{
  "name": "example"
}

No content

Reset current dealer password

post

Reset current dealer password.

Authorizations
AuthorizationstringRequired
Bearer authentication header of the form Bearer <token>.
Body
old_passwordstringOptional

The password of dealer.

new_passwordstringOptional

The password of dealer.

Responses
200

OK

No content

post/dealer/password
POST /api/dealer/password HTTP/1.1
Host: HOSTNAME:8887
Authorization: Bearer YOUR_SECRET_TOKEN
Content-Type: application/json
Accept: */*
Content-Length: 49

{
  "old_password": "xxxxxx",
  "new_password": "xxxxxx"
}

No content

List provider assignees

get

Get a collection of assignees of provider.

Authorizations
AuthorizationstringRequired
Bearer authentication header of the form Bearer <token>.
Path parameters
idstringRequiredExample: NzAwNTUxOTA5NzczMTQ4MTYw
Responses
200

OK

application/json
get/providers/{id}/assignees
GET /api/providers/{id}/assignees HTTP/1.1
Host: HOSTNAME:8887
Authorization: Bearer YOUR_SECRET_TOKEN
Accept: */*
{
  "items": [
    {
      "tenant_id": "xxxxxx",
      "tenant_name": "example",
      "did_numbers": "1000-2000",
      "concurrency": 100
    }
  ]
}

Check provider assignee

get

Check if a provider is assigned to the tenant.

Authorizations
AuthorizationstringRequired
Bearer authentication header of the form Bearer <token>.
Path parameters
idstringRequiredExample: NzAwNTUxOTA5NzczMTQ4MTYw
tenant_idstringRequiredExample: NzAwNTUxOTA5NzczMTQ4MTYw
Responses
200

OK

application/json
tenant_idstringOptionalExample: NzAwNTUxOTA5NzczMTQ4MTYw
tenant_namestring · min: 1 · max: 1024Optional

The name of the tenant.

did_numbersstringOptional

The semicolon-separated list of DID/DDI pool number range or DID/DDI number. Assign a DID/DDI pool number range or DID/DDI number to the tenant. For example: 3000;12000-18000. The DID/DDI pool number range should not overlap with other tenant DID/DDI pool number ranges and numbers.

concurrencyinteger · int32Optional

The max number of concurrent calls.

get/providers/{id}/assignees/{tenant_id}
GET /api/providers/{id}/assignees/{tenant_id} HTTP/1.1
Host: HOSTNAME:8887
Authorization: Bearer YOUR_SECRET_TOKEN
Accept: */*
{
  "tenant_id": "xxxxxx",
  "tenant_name": "example",
  "did_numbers": "1000-2000",
  "concurrency": 100
}

Assign provider

post

Assign provider to tenant.

Authorizations
AuthorizationstringRequired
Bearer authentication header of the form Bearer <token>.
Path parameters
idstringRequiredExample: NzAwNTUxOTA5NzczMTQ4MTYw
tenant_idstringRequiredExample: NzAwNTUxOTA5NzczMTQ4MTYw
Body
did_numbersstringOptional

The semicolon-separated list of DID/DDI pool number range or DID/DDI number. Assign a DID/DDI pool number range or DID/DDI number to the tenant. For example: 3000;12000-18000. The DID/DDI pool number range should not overlap with other tenant DID/DDI pool number ranges and numbers.

concurrencyinteger · int32Optional

The max number of concurrent calls.

Responses
204

No Content

No content

post/providers/{id}/assignees/{tenant_id}
POST /api/providers/{id}/assignees/{tenant_id} HTTP/1.1
Host: HOSTNAME:8887
Authorization: Bearer YOUR_SECRET_TOKEN
Content-Type: application/json
Accept: */*
Content-Length: 45

{
  "did_numbers": "1000-2000",
  "concurrency": 100
}

No content

Destroy a provider assignee

post

Unassign provider from tenant.

Authorizations
AuthorizationstringRequired
Bearer authentication header of the form Bearer <token>.
Path parameters
idstringRequiredExample: NzAwNTUxOTA5NzczMTQ4MTYw
tenant_idstringRequiredExample: NzAwNTUxOTA5NzczMTQ4MTYw
Responses
204

No Content

No content

post/providers/{id}/assignees/{tenant_id}/destroy
POST /api/providers/{id}/assignees/{tenant_id}/destroy HTTP/1.1
Host: HOSTNAME:8887
Authorization: Bearer YOUR_SECRET_TOKEN
Accept: */*

No content

Get server

get

Retrieve settings of data flow server.

Authorizations
AuthorizationstringRequired
Bearer authentication header of the form Bearer <token>.
Responses
200

OK

application/json
private_ipv4stringOptional

Host IPV4 address.

private_ipv6stringOptional

Host IPV6 address.

public_ipv4stringOptional

Host IPV4 address.

public_ipv6stringOptional

Host IPV6 address.

get/dataflow
GET /api/dataflow HTTP/1.1
Host: HOSTNAME:8887
Authorization: Bearer YOUR_SECRET_TOKEN
Accept: */*
{
  "private_ipv4": "127.0.0.1",
  "private_ipv6": "::1",
  "public_ipv4": "192.0.2.0",
  "public_ipv6": "2001:0db8:0a0b:12f0::1"
}

Update server

post

Update data flow server configurations.

Authorizations
AuthorizationstringRequired
Bearer authentication header of the form Bearer <token>.
Body
private_ipv4stringOptional

Host IPV4 address.

private_ipv6stringOptional

Host IPV6 address.

public_ipv4stringOptional

Host IPV4 address.

public_ipv6stringOptional

Host IPV6 address.

Responses
200

OK

No content

post/dataflow
POST /api/dataflow HTTP/1.1
Host: HOSTNAME:8887
Authorization: Bearer YOUR_SECRET_TOKEN
Content-Type: application/json
Accept: */*
Content-Length: 114

{
  "private_ipv4": "127.0.0.1",
  "private_ipv6": "::1",
  "public_ipv4": "192.0.2.0",
  "public_ipv6": "2001:0db8:0a0b:12f0::1"
}

No content

Query Dataflow server status

get

Query the current status of the Dataflow server. If the Dataflow server configuration is incomplete or the status request fails, the status is returned as OFFLINE.

Authorizations
AuthorizationstringRequired
Bearer authentication header of the form Bearer <token>.
Responses
200

OK

application/json
statusstring · enumRead-onlyRequired

The current status of the Dataflow server:

  • ONLINE: the Dataflow server is online.
  • OFFLINE: the Dataflow server is offline or its status cannot be determined.
Possible values:
get/dataflow/status
GET /api/dataflow/status HTTP/1.1
Host: HOSTNAME:8887
Authorization: Bearer YOUR_SECRET_TOKEN
Accept: */*
{
  "status": "ONLINE"
}

Get Server token

get

Retrieve data flow server token

Authorizations
AuthorizationstringRequired
Bearer authentication header of the form Bearer <token>.
Responses
200

OK

application/json
tokenstringOptional

The api token for extended servers.

Example: xxxxxxyyyyyyyyyyyyyyyzzzzzzzzzzzz.
get/dataflow/token
GET /api/dataflow/token HTTP/1.1
Host: HOSTNAME:8887
Authorization: Bearer YOUR_SECRET_TOKEN
Accept: */*
{
  "token": "xxxxxxxxxxxxxxxxxxxxxx"
}

Regenerate server token

post

Regenerate data flow server token

Authorizations
AuthorizationstringRequired
Bearer authentication header of the form Bearer <token>.
Responses
200

OK

application/json
tokenstringOptional

The api token for extended servers.

Example: xxxxxxyyyyyyyyyyyyyyyzzzzzzzzzzzz.
post/dataflow/token
POST /api/dataflow/token HTTP/1.1
Host: HOSTNAME:8887
Authorization: Bearer YOUR_SECRET_TOKEN
Accept: */*
{
  "token": "xxxxxxxxxxxxxxxxx"
}

Delete server Token

post

Destroy data flow server Token.

Authorizations
AuthorizationstringRequired
Bearer authentication header of the form Bearer <token>.
Responses
204

No Content

No content

post/dataflow/token/destroy
POST /api/dataflow/token/destroy HTTP/1.1
Host: HOSTNAME:8887
Authorization: Bearer YOUR_SECRET_TOKEN
Accept: */*

No content

Last updated

Was this helpful?