Description
This function modifies an account's contact and notification settings.
Warning:
We strongly recommend that you use UAPI instead of cPanel API 2. However, no equivalent UAPI function exists.
Note:
If you do not include a parameter, this function performs the following actions:
- cPanel & WHM version 11.52 and later preserves the current setting.
- cPanel & WHM version 11.50 and earlier applies the default value, which is blank for strings and
false
for Booleans.
Examples
Note:
Use cPanel's API Shell interface (Home >> Advanced >> API Shell) to directly test cPanel API calls.
Parameters
Parameter |
Type |
Description |
Possible values |
Example |
|
string |
The primary contact email address. |
A valid email address. |
bert@example.com |
second_email |
string |
A secondary contact email address. |
A valid email address. |
ernie@example.com |
notify_account_authn_link |
Boolean |
Whether to send a notification when the user enablesExternal Authentication. This parameter defaults to 0. |
|
1 |
notify_account_authn_link_notification_disabled |
Boolean |
Whether to send a notification when thenotify_account_authn_link parameter is 0. This parameter defaults to 0. |
|
1 |
notify_account_login |
Boolean |
Whether to send a notification when the user logs in to their account. This parameter defaults to 0. |
|
1 |
notify_account_login_for_known_netblock |
Boolean |
Whether to send a notification when the user logs in to their account, regardless of the user's previously known IP address history. This parameter defaults to 0. |
|
1 |
notify_account_login_notification_disabled |
Boolean |
Whether to send a notification when thenotify_account_login parameter is 0. This parameter defaults to 0. |
|
1 |
notify_bandwidth_limit |
Boolean |
Whether to send a notification when the user approaches their bandwidth limit. Notes:
This parameter defaults to 0 . |
|
1 |
notify_contact_address_change |
Boolean |
Whether to send a notification when the contact address changes. Notes:
This parameter defaults to 0 . |
|
1 |
notify_contact_address_change_notification_disabled |
Boolean |
Whether to send a notification when thenotify_contact_address_change parameter is 0. Notes:
This parameter defaults to 0 .
|
|
1 |
notify_disk_limit |
Boolean |
Whether to send a notification when the user approaches their disk quota. Note: The function ignores this parameter when you authenticate as a Subaccount or use theusername parameter with a Subaccount. This parameter defaults to 0 .
|
|
1 |
notify_email_quota_limit |
Boolean |
Whether to send a notification when an email user approaches or is over their quota. Note: The function ignores this parameter when you authenticate as a Subaccount or use theusername parameter with a Subaccount. This parameter defaults to 0 .
|
|
1 |
notify_password_change |
Boolean |
Whether to send a notification when the user changes their password. Note: The function ignores this parameter when you authenticate as a Subaccount or use theusername parameter with a Subaccount. |
|
1 |
notify_password_change_notification_disabled |
Boolean |
Whether to send a notification when thenotify_password_change_notification_disabledparameter is 0. Notes:
|
1 |
|
notify_twofactorauth_change |
Boolean |
Whether to send a notification when the user's Two-Factor Authentication configuration changes. This parameter defaults to 0 . |
|
1 |
notify_twofactorauth_change_notification_disabled |
Boolean |
Whether to send a notification when thenotify_twofactorauth_change parameter is 0. This parameter defaults to 0 . |
|
1 |
pushbullet_access_token |
string |
An access token for Pushbullet notifications. Notes:
|
A valid string. |
a1b2c3d4e5f6g7h8i9j0 |
username |
string |
The cPanel account or Subaccount in which to save the contact information. Note: We introduced this parameter in cPanel & WHM version 11.56. |
|
example1@example.com |
Returns
Return |
Type |
Description |
Possible values |
Example |
display_value |
string |
The notification setting's display value. |
A valid string. |
user@example.com |
desc |
string |
A notification setting's description. |
A valid string. |
Click to view... |
name |
string |
The notification setting's name. |
|
|
value |
string |
The notification setting's value. |
A valid string or boolean value. |
user@example.com |
reason |
string |
A reason for failure. Note: This function only returns areasonvalue if it failed. |
A string that describes the error. |
This is an error message. |
result |
Boolean |
Whether the function succeeded. |
|
1 |