Activate PBX and Perform Initial Setup
Activate Yeastar P-Series Software Edition and perform initial setup.
Note:
- Only online activation is supported. For offline activation, use the Installation Wizard in the PBX Web GUI to complete the activation and initial setup.
- To call this API, make sure the PBX version is 83.24.0.30 or later.
Request URL
POST {base_url}/{api_path}/wizard/initial_setup
Request parameters
| Parameter | Required | Type | Description |
|---|---|---|---|
| activation | Yes | Object<Activation_Setting> | Activation setting. |
| administrator | Yes | Object<Administrator_Setting> | Administrator account setting. |
| network | No | Object<Network_Setting> | Basic network setting. Note: For PBX system deployed on cloud-based servers, skip
the network setting. Otherwise, the PBX may become inaccessible.
|
| date_and_time | No | Object<DateTime_Setting> | Date and time setting. |
| localization | No | Object<Localization_Setting> | Localization setting. |
| reboot | No | Boolean | Whether to reboot the PBX after successful activation. Valid
value:
Important: If you modify network or date and
time setting, set this parameter to
true, so that the changes
can take effect. |
- Activation_Setting
-
Parameter Required Type Description code Yes String The activation code.
- Administrator_Setting
-
Parameter Required Type Description username Yes String Administrator username. new_password Yes String Administrator password, encoded in Base64. Note: The decoded plaintext password must contain at least 10 characters, including at least one uppercase letter, one lowercase letter, and one digit.confirm_password Yes String Administrator password for confirmation. It must be identical to new_password.email Yes String Administrator's email address. mobile No String Administrator's mobile phone number. dial_prefix No String Outbound dialing prefix, which is automatically prepended to the administrator's mobile phone number when making calls to the administrator. enable_event_notify Yes Integer Whether to enable event notifications. Valid value:
0: Disabled.1: Enabled.
Note: When set to1,event_contact_nameandlevelsare required, and at least one ofenable_email_notifyandenable_mobile_notifymust be set to1.event_contact_name No String Contact name used for event notifications. levels No String Event level(s) that trigger notifications. Valid value:
errorwarninfo
Note: Use spaces to separate multiple values.enable_email_notify No Integer Whether to send event notifications to the administrator's email address. Valid value:
0: Disabled.1: Enabled.
enable_mobile_notify No Integer Whether to send event notifications by calling the administrator's mobile phone number. Valid value:
0: Disabled.1: Enabled.
Note: When set to1,mobileis required.
- Network_Setting
-
Parameter Required Type Description mode Yes String Network interface mode. Valid value:
single: Single Ethernet mode.dual: Dual Ethernet mode.
gwnic Yes String Network interface used as the default gateway. Valid value:
eth0: LAN port.eth1: WAN port.
Note: For Single Ethernet mode, useeth0; For Dual Ethernet mode, useeth0oreth1.nic_setting_eth0 Yes Object<LAN_Setting> LAN network settings. nic_setting_eth1 No Object<WAN Setting> WAN network settings.
- LAN_Setting
-
Parameter Required Type Description protocol Yes String IP protocol. Valid value:
ipv4: IPv4 only.ipv4+ipv6: IPv4 and IPv6.
priority Yes String Preferred IP protocol. Valid value:
ipv4: Prefer IPv4.ipv6: Prefer IPv6.
IPv4 Setting (Static IP) ipaddress Yes String IPv4 address. netmask Yes String IPv4 subnet mask. gateway No String IPv4 default gateway. dns1 No String Preferred IPv4 DNS server. dns2 No String Alternative IPv4 DNS server. ipaddress2 No String Secondary IPv4 address. netmask2 No String Secondary IPv4 subnet mask. IPv6 Setting (Static IP) ipv6_ipaddress No String IPv6 address. Note: Required ifprotocolisipv4+ipv6.ipv6_prefix_length No Integer IPv6 prefix length. Note: Required ifprotocolisipv4+ipv6.ipv6_gateway No String IPv6 default gateway. ipv6_dns1 No String Preferred IPv6 DNS server. ipv6_dns2 No String Alternative IPv6 DNS server. ipv6_ipaddress2 No String Secondary IPv6 address. ipv6_prefix_length2 No Integer Prefix length of the secondary IPv6 address.
- WAN Setting
-
Parameter Required Type Description protocol Yes String IP protocol. Valid value:
ipv4: IPv4 only.ipv4+ipv6: IPv4 and IPv6.
priority Yes String Preferred IP protocol. Valid value:
ipv4: Prefer IPv4.ipv6: Prefer IPv6.
IPv4 Setting type Yes String IP address assignment method. Valid value:
dhcpstaticippppoe
IPv4 Setting (Static IP) ipaddress No String IPv4 address. Note: Required iftypeisstaticip.netmask No String IPv4 subnet mask. Note: Required iftypeisstaticip.gateway No String IPv4 default gateway. dns1 No String Preferred IPv4 DNS server. dns2 No String Alternative IPv4 DNS server. IPv4 Setting (PPPoE) Note: The following parameters are required whentypeis set topppoe.pppoe_username No String PPPoE username. pppoe_password No String PPPoE password. IPv6 Setting ipv6_type No String IPv6 address assignment method. Valid value:
dhcpstaticip
Note: Required ifprotocolisipv4+ipv6.IPv6 Setting (Static IP) ipv6_ipaddress No String IPv6 address. Note: Required ifipv6_typeisstaticip.ipv6_prefix_length No Integer IPv6 prefix length. Note: Required ifipv6_typeisstaticip.ipv6_gateway No String IPv6 default gateway. ipv6_dns1 No String Preferred IPv6 DNS server. ipv6_dns2 No String Alternative IPv6 DNS server.
- DateTime_Setting
-
Parameter Required Type Description timezone Yes String Time zone value, including the UTC offset and standard time zone identifier. Note: For valid values, see Supported Values for Time Zone.date_format Yes String Date display format. Valid value:
mm/dd/yyyy: Month/Day/Year.yyyy/mm/dd: Year/Month/Day.dd/mm/yyyy: Day/Month/Year.
time_format Yes String Time display format. Valid value:
24-hour12-hour
enable_dst No Integer Whether to enable daylight saving time. Valid value:
0: Disabled.1: Enabled.
enable_ntp No Integer Whether to enable automatic time synchronization with an NTP server. Valid value:
0: Disabled.1: Enabled.
Note:- When set to
0,time_settingis required. - When set to
1,ntp_serveris required.
ntp_server No String NTP server address. time_setting No Object<Time_Setting> Manual date and time settings.
- Localization_Setting
-
Parameter Required Type Description system_prompt_language No String System prompt language. Note: For valid values, see Supported Values for System Prompt Language.email_language No String Email notification language. Note: For valid values, see Supported Values for Notification Email Language.dev_name No String Device name. name_disp_fmt No String Contact name display format. Valid value:
first_last: First Name Last Name with Space Inbetween.last_first: Last Name First Name with Space Inbetween.lastfirst: Last Name First Name without Space Inbetween.
tone_region No String Tone region. Note: For valid values, see Supported Values for Tone Region.enb_country_code No Integer Whether to enable allowed country/region code dialing protection. Valid value:
0: Disabled.1: Enabled.
Note: When set to1,dialcodeis required.dialcode No String International dialing code. - Time_Setting
-
Parameter Required Type Description date No String Manually configured date. The format must match date_format.Example:
- If
date_formatisyyyy/mm/dd, date should be2025/12/30. - If
date_formatismm/dd/yyyy, date should be12/30/2025. - If
date_formatisdd/mm/yyyy, date should be30/12/2025.
time No String Manually configured time. The format must match time_format.Example:- If
time_formatis24-hour, time format isHH:MMorHH:MM:SS.For example,
14:30or14:30:00. - If
time_formatis12-hour, time format isHH:MM AM/PMorHH:MM:SS AM/PM.For example.
02:30 PMor02:30:00 PM.
- If
Response parameters
| Parameter | Type | Description |
|---|---|---|
| errcode | Integer | Returned error code.
Note: You can check the error code and
error message in Error Code and Error Message.
|
| errmsg | String | Returned message.
|
| activation_status | String | Activation status.
|
| api_client_id | String | Client ID used for OpenAPI calls. |
| api_client_secret | String | Client Secret used for OpenAPI calls. Note: The parameter value is a Base64-encoded string and
can be decoded to obtain the original value.
|
| expiration_date | String | License expiration date. |
| license_type | String | Plan type.
|
| max_concurrent_calls | Integer | The maximum number of concurrent calls supported by the PBX. |
| max_extensions | Integer | The maximum number of extensions supported by the PBX. |
Example
Request example
POST /openapi/v1.0/wizard/initial_setup HTTP/1.1
Host: 192.168.5.150:8088
Content-Type: application/json
{
"activation": {
"code": "8E4D-KSCR-IWCH-RKPT-6AMI"
},
"administrator": {
"confirm_password": "WWVhc3RhcjIwMg==",
"enable_event_notify": 1,
"event_contact_name":"leo",
"levels":"error warn",
"enable_email_notify":1,
"new_password": "WWVhc3RhcjIwMg==",
"username": "admin",
"email":"leo@yeastar.com"
},
"localization": {
"system_prompt_language": "sound-en",
"email_language": "en",
"dev_name": "PSE",
"name_disp_fmt": "first_last",
"tone_region":"cn",
"enb_country_code":0
},
"date_and_time": {
"timezone": "UTC+8 Asia/Shanghai",
"date_format":"yyyy/mm/dd",
"time_format":"24-hour"
},
"network": {
"mode": "single",
"gwnic": "eth0",
"nic_setting_eth0": {
"protocol": "ipv4",
"priority":"ipv4",
"dns1": "8.8.8.8",
"dns2": "114.114.114.114",
"gateway": "10.10.28.1",
"ipaddress": "10.10.28.45",
"netmask": "255.255.255.0"
}
},
"reboot": true
}
Response example
HTTP/1.1 200 OK
{
"errcode": 0,
"errmsg": "SUCCESS",
"activation_status": "subscribe",
"expiration_date": "07/17/2027 02:44:43",
"license_type": "ep",
"max_concurrent_calls": 1,
"max_extensions": 3,
"api_client_id": "k8Ad9uFX3z1MBJKmEKaHHarzYWiVjJGC",
"api_client_secret": "NldDMXRuYXNNa3J5YXYyNEhQM0JBRDA0WVNoWWVaUEU="
}