# cPanel API 2 Functions - CustInfo::savecontactinfo

Warning:
The cPanel API 2 system is deprecated. We **strongly** recommend that you use [UAPI](/cpanel/introduction) instead of cPanel API 2.

## Description

This function modifies an account's contact and notification settings.

Warning:
We **strongly** recommend that you use the following [UAPI](/cpanel/introduction/) function instead of this function:

- [`ContactInformation::set_email_addresses`](https://api.docs.cpanel.net/openapi/cpanel/operation/contactinformation-set_email_addresses/)
—  Use this function to set an account's contact email address(es).


Note:
cPanel & WHM preserves the current setting.

## Examples

WHM API (JSON)


```undefined syntaxhighlighter-pre
https://hostname.example.com:2087/cpsess##########/json-api/cpanel?cpanel_jsonapi_apiversion=2&cpanel_jsonapi_module=CustInfo&cpanel_jsonapi_func=savecontactinfo&email=bert%40example.com&second_email=ernie%40example.com&notify_account_authn_link=1&notify_account_authn_link_notification_disabled=1&notify_account_login=1&notify_account_login_for_known_netblock=1&notify_account_login_notification_disabled=1&notify_autossl_renewal_coverage_reduced=1&notify_bandwidth_limit=1&notify_contact_address_change=1&notify_contact_address_change_notification_disabled=1&notify_disk_limit=1&notify_email_quota_limit=1&notify_password_change=1&notify_password_change_notification_disabled=1&notify_twofactorauth_change=1&notify_twofactorauth_change_notification_disabled=1&pushbullet_access_token=a1b2c3d4e5f6g7h8i9j0&username=example1@example.com&notify_autossl_expiry=1&notify_autossl_expiry_coverage=1&notify_autossl_renewal=1&notify_autossl_renewal_coverage=1&notify_ssl_expiry=1
```

Note:
For more information, read our [Calls from the WHM API](/whm/use-whm-api-to-call-cpanel-api-and-uapi) documentation.

LiveAPI PHP Class


```undefined syntaxhighlighter-pre
$cpanel = new CPANEL(); // Connect to cPanel - only do this once.

// Modify contact information.
$save_contact = $cpanel->api2(
    'CustInfo', 'savecontactinfo',
    array(
          email => 'bert@example.com',
          notify_account_authn_link => '0'
          notify_account_authn_link_notification_disabled => '0',
          notify_account_login => '0',
          notify_account_login_for_known_netblock => '0',
          notify_autossl_expiry => 1,
          notify_autossl_expiry_coverage => 1,
          notify_autossl_renewal_coverage_reduced => 1,
          notify_autossl_renewal => 1,
          notify_autossl_renewal_coverage => 1,
          notify_account_login_notification_disabled => '0',
          notify_bandwidth_limit => '0',
          notify_contact_address_change => '0',
          notify_contact_address_change_notification_disabled => '0',
          notify_disk_limit => '0',
          notify_email_quota_limit => '0',
          notify_password_change => '0',
          notify_password_change_notification_disabled => '0',
          notify_ssl_expiry => '1',
          notify_twofactorauth_change => '0',
          notify_twofactorauth_change_notification_disabled => '0',
          pushbullet_access_token => 'a1b2c3d4e5f6g7h8i9j10',
          second_email => 'ernie@example.com',
          username => 'example1@example.com'
  )
);
```

Note:
For more information, read our [Guide to the LiveAPI System](/guides/guide-to-the-liveapi-system/#guide-to-the-liveapi-system).

LiveAPI Perl Module


```undefined syntaxhighlighter-pre
my $cpliveapi = Cpanel::LiveAPI->new(); # Connect to cPanel - only do this once.

#  Modify contact information.
my $save_contact = $cpliveapi->api2(
    'CustInfo', 'savecontactinfo',
    {
          email => 'bert@example.com',
          notify_account_authn_link => '0'
          notify_account_authn_link_notification_disabled => '0',
          notify_account_login => '0',
          notify_account_login_for_known_netblock => '0',
          notify_account_login_notification_disabled => '0',
          notify_autossl_expiry => 1,
          notify_autossl_expiry_coverage => 1,
          notify_autossl_renewal_coverage_reduced => 1,
          notify_autossl_renewal => 1,
          notify_autossl_renewal_coverage => 1,
          notify_bandwidth_limit => '0',
          notify_contact_address_change => '0',
          notify_contact_address_change_notification_disabled => '0',
          notify_disk_limit => '0',
          notify_email_quota_limit => '0',
          notify_password_change => '0',
          notify_password_change_notification_disabled => '0',
          notify_ssl_expiry => '1',
          notify_twofactorauth_change => '0',
          notify_twofactorauth_change_notification_disabled => '0',
          pushbullet_access_token => 'a1b2c3d4e5f6g7h8i9j10',
          second_email => 'ernie@example.com',
          username => 'example1@example.com'
     }
);
```

Note:
For more information, read our [Guide to the LiveAPI System](/guides/guide-to-the-liveapi-system/#guide-to-the-liveapi-system).

cPanel Tag System (deprecated)

Warnings:
- cPanel tags are **deprecated**. We **strongly** recommend that you **only** use the [LiveAPI](/guides/guide-to-the-liveapi-system) system to call the cPanel APIs. Examples are **only** present in order to help developers move from the old cPanel tag system to our [LiveAPI](/guides/guide-to-the-liveapi-system).
- cPanel API 2 calls that use cPanel tags vary in code syntax and in their output.
- For more information, read our [Deprecated cPanel Tag Usage](/cpanel-api-2/cpanel-api-2-deprecate-cpanel-tag-usage/) documentation.


Command Line


```undefined syntaxhighlighter-pre
cpapi2 --user=username CustInfo savecontactinfo email=bert@example.com second_email=ernie@example.com notify_account_authn_link=1 notify_account_authn_link_notification_disabled=1 notify_account_login=1 notify_account_login_for_known_netblock=1 notify_account_login_notification_disabled=1 notify_autossl_renewal_coverage_reduced=1 notify_bandwidth_limit=1 notify_contact_address_change=1 notify_contact_address_change_notification_disabled=1 notify_disk_limit=1 notify_email_quota_limit=1 notify_password_change=1 notify_password_change_notification_disabled=1 notify_twofactorauth_change=1 notify_twofactorauth_change_notification_disabled=1 pushbullet_access_token=a1b2c3d4e5f6g7h8i9j0 username=example1@example.com notify_autossl_expiry=1 notify_autossl_expiry_coverage=1 notify_autossl_renewal=1 notify_autossl_renewal_coverage=1 notify_ssl_expiry=1
```

div
Notes:

- You **must** URI-encode values.
- `username` represents your account-level username.
- You **must** include the `--user=username` option.
- For more information and additional output options, read our [Guide to cPanel API 2](/cpanel-api-2/) documentation or run the `cpapi2 --help` command.
- If you run CloudLinux™, you **must** use the full path of the `cpapi2` command:

```undefined syntaxhighlighter-pre
/usr/local/cpanel/bin/cpapi2
```


br
Output (JSON)


```undefined syntaxhighlighter-pre
{
    "cpanelresult": {
        "apiversion": 2,
        "func": "savecontactinfo",
        "event": {
            "result": 1
        },
        "module": "CustInfo",
        "data": [{
            "display_value": "bert@example.com",
            "value": "bert@example.com",
            "name": "email",
            "descp": "Enter an email address to receive account notifications and password reset confirmations. Do not use an email address that your cPanel account owns."
        }, {
            "descp": "Enter a second email address to receive account notifications and password reset confirmations.",
            "value": "ernie@example.com",
            "name": "second_email",
            "display_value": "ernie@example.com"
        }, {
            "descp": "An access token for Pushbullet.",
            "value": "a1b2c3d4e5f6g7h8i9j0",
            "name": "pushbullet_access_token",
            "display_value": "a1b2c3d4e5f6g7h8i9j0"
        }, {
            "display_value": "on",
            "name": "notify_contact_address_change",
            "value": 1,
            "descp": "My contact email address changes."
        }, {
            "name": "notify_contact_address_change_notification_disabled",
            "value": 1,
            "descp": "My preference for contact email address change notifications is disabled.",
            "display_value": "on"
        }, {
            "display_value": "on",
            "descp": "My account approaches its disk quota.",
            "value": 1,
            "name": "notify_disk_limit"
        }, {
            "display_value": "on",
            "name": "notify_bandwidth_limit",
            "value": 1,
            "descp": "My account approaches its bandwidth usage limit."
        }, {
            "display_value": "on",
            "descp": "Any of my account's email accounts approaches or is over quota.",
            "value": 1,
            "name": "notify_email_quota_limit"
        }, {
            "value": 1,
            "name": "notify_password_change",
            "descp": "My account's password changes.",
            "display_value": "on"
        }, {
            "display_value": "on",
            "descp": "My preference for account password change notifications is disabled.",
            "value": 1,
            "name": "notify_password_change_notification_disabled"
        }, {
            "display_value": "on",
            "value": 1,
            "descp": "Someone logs in to my account.",
            "name": "notify_account_login"
        }, {
            "descp": "Send login notifications, even when the user logs in from an IP address range or netblock that contains an IP address from which a user successfully logged in previously.",
            "value": 1,
            "name": "notify_account_login_for_known_netblock",
            "display_value": "on"
        }, {
            "value": 1,
            "descp": "My preference for successful login notifications is disabled.",
            "name": "notify_account_login_notification_disabled",
            "display_value": "on"
        }, {
            "name": "notify_account_authn_link",
            "value": 1,
            "descp": "An external account links to my account for authentication.",
            "display_value": "on"
        }, {
            "value": 1,
            "descp": "My preference for external account link notifications is disabled.",
            "name": "notify_account_authn_link_notification_disabled",
            "display_value": "on"
        }, {
            "descp": "AutoSSL has renewed a certificate.",
            "display_value": "off",
            "name": "notify_autossl_renewal",
            "value": 1
        }, {
            "descp": "AutoSSL cannot add any additional domains because domains that fail Domain Control Validation exist on the current certificate.",
            "display_value": "off",
            "name": "notify_autossl_renewal_coverage",
            "value": 1
        }, {
            "descp": "AutoSSL cannot renew a certificate because domains that fail Domain Control Validation exist on the current certificate.",
            "display_value": "off",
            "name": "notify_autossl_expiry_coverage",
            "value": 1
        }, {
            "descp": "AutoSSL certificate expiry.",
            "display_value": "off",
            "name": "notify_autossl_expiry",
            "value": 1
        }, {
            "descp": "SSL certificate expiry.",
            "display_value": "off",
            "name": "notify_ssl_expiry",
            "value": 1
        },  {
            "descp": "AutoSSL has renewed a certificate, but the new certificate lacks at least one domain that the previous certificate secured.",
            "display_value": "off",
            "name": "notify_autossl_renewal_coverage_reduced",
            "value": 1
        }]
    }
}
```

Note:
Use cPanel's *[API Shell](https://docs.cpanel.net/cpanel/advanced/api-shell-for-cpanel)* interface (*cPanel >> Home >> Advanced >> API Shell*) to directly test cPanel API calls.

## Parameters

table
thead
tr
th
strong
Parameter
th
strong
Type
th
strong
Description
th
strong
Possible values
th
strong
Example
tbody
tr
td
code
email
td
em
string
td
p
The primary contact email address.
p
This parameter defaults to an empty string.
td
A valid email address.
td
code
bert@example.com
tr
td
code
second_email
td
em
string
td
p
A secondary contact email address.
p
span
This parameter defaults to an empty string.
td
A valid email address.
td
code
ernie@example.com
tr
td
code
notify_account_authn_link
td
em
Boolean
td
p
Whether to send a notification when the user enables [External Authentication](/guides/guide-to-external-authentication/guide-to-external-authentication-openid-connect/).
p
This parameter defaults to 
code
1
.
td
ul
li
code
1
 — Send notification.
li
code
0
 — Do 
strong
not
 send notification.
td
code
1
tr
td
p
code
notify_account_authn_link_notification_disabled
td
em
Boolean
td
p
Whether to send a notification when the 
span
code
notify_account_authn_link
 parameter is 
code
0
.
p
This parameter defaults to 
code
1
.
td
ul
li
code
1
 — Send notification.
li
code
0
 — Do 
strong
not
 send notification.
td
code
1
tr
td
code
notify_account_login
td
em
Boolean
td
p
Whether to send a notification when the user logs in to their account.
p
This parameter defaults to 
code
1
.
td
ul
li
code
1
 — Send notification.
li
code
0
 — Do 
strong
not
 send notification.
td
code
1
tr
td
code
notify_account_login_for_known_netblock
td
em
Boolean
td
p
span
Whether to send a notification when the user logs in to their account, regardless of the user's previously known IP address history.
p
This parameter defaults to 
code
1
.
td
ul
li
code
1
 — Send notification.
li
code
0
 — Do 
strong
not
 send notification.
td
code
1
tr
td
code
notify_account_login_notification_disabled
td
em
Boolean
td
p
span
Whether to send a notification when the 
code
notify_account_login
 parameter is 
code
0
.
p
This parameter defaults to 
code
1
.
td
ul
li
code
1
 — Send notification.
li
code
0
 — Do 
strong
not
 send notification.
td
code
1
tr
td
code
notify_autossl_expiry
td
em
Boolean
td
p
Whether to send a notification upon AutoSSL certificate expiry.
We added this parameter in cPanel 
&
 WHM version 68.
p
p
span
This parameter defaults to 
code
1
.
td
ul
li
code
1
 — Send notification.
li
code
0
 — Do 
strong
not
 send notification.
td
code
1
tr
td
code
notify_autossl_expiry_coverage
td
em
Boolean
td
p
Whether to send a notification when AutoSSL cannot renew a certificate because domains that fail Domain Control Validation (DCV) exist on the current certificate.
p
We added this parameter in cPanel 
&
 WHM version 68.
p
span
This parameter defaults to 
code
1
.
td
ul
li
code
1
 — Send notification
li
code
0
 — Do 
strong
not
 send notification.
td
code
1
tr
td
code
notify_autossl_renewal_coverage_reduced
td
em
Boolean
td
p
Whether to send a notification when AutoSSL renews a certificate, but the new certificate lacks at least one domain that the previous certificate secured.
p
span
This parameter defaults to 
code
1
.
td
ul
li
code
1
 — Send notification
li
code
0
 — Do 
strong
not
 send notification.
td
code
1
tr
td
code
notify_autossl_renewal
td
em
Boolean
td
p
Whether to send a notification when AutoSSL renews a certificate.
p
We added this parameter in cPanel 
&
 WHM version 68.
p
span
This parameter defaults to 
code
1
.
td
ul
li
code
1
 — Send notification.
li
code
0
 — Do 
strong
not
 send notification
td
code
1
tr
td
code
notify_autossl_renewal_coverage
td
em
Boolean
td
p
Whether to send a notification when AutoSSL cannot add any additional domains because domains that fail DCV exist on the current certificate.
p
We added this parameter in cPanel 
&
 WHM version 68.
p
span
This parameter defaults to 
code
1
.
td
ul
li
code
1
 — Send notification.
li
code
0
 — Do 
strong
not
 send notification.
td
code
1
tr
td
code
notify_bandwidth_limit
td
em
Boolean
td
p
Whether to send a notification when the user approaches their bandwidth limit.
ul
li
span
The function ignores this parameter if you have not configured the account to receive any bandwidth limit notification.
li
span
The function ignores this parameter when you authenticate as a Subaccount or use the 
code
username
span
parameter with a Subaccount.
p
This parameter defaults to 
code
1
.
td
ul
li
code
1
 — Send notification.
li
code
0
 — Do 
strong
not
 send notification.
td
code
1
tr
td
code
notify_contact_address_change
td
em
Boolean
td
p
Whether to send a notification when the contact address changes.
ul
li
We introduced this parameter in cPanel 
&
 WHM version 11.48.
li
The function ignores this parameter when you authenticate as a Subaccount or use the 
code
username
 parameter with a Subaccount.
p
This parameter defaults to 
code
1
.
td
ul
li
code
1
 — Send notification.
li
code
0
 — Do 
strong
not
 send notification.
td
code
1
tr
td
code
notify_contact_address_change_notification_disabled
td
em
Boolean
td
p
Whether to send a notification when the 
code
notify_contact_address_change
 parameter is 
code
0
.
ul
li
We introduced this parameter in cPanel 
&
 WHM version 11.48.
li
The function ignores this parameter when you authenticate as a Subaccount or use the 
code
username
 parameter with a Subaccount.
p
This parameter defaults to 
code
1
.
td
ul
li
code
1
 — Send notification.
li
code
0
 — Do 
strong
not
 send notification.
td
code
1
tr
td
code
notify_disk_limit
td
em
Boolean
td
p
Whether to send a notification when the user approaches their disk quota.
p
The function ignores this parameter when you authenticate as a Subaccount or use the 
code
username
 parameter with a Subaccount.
p
This parameter defaults to 
code
1
.
td
ul
li
code
1
 — Send notification.
li
code
0
 — Do 
strong
not
 send notification.
td
code
1
tr
td
code
notify_email_quota_limit
td
em
Boolean
td
p
Whether to send a notification when an email user approaches or exceeds their quota.
p
The function ignores this parameter when you authenticate as a Subaccount or use the 
code
username
 parameter with a Subaccount.
p
This parameter defaults to 
code
1
.
td
ul
li
code
1
 — Send notification.
li
code
0
 — Do 
strong
not
 send notification.
td
code
0
tr
td
code
notify_password_change
td
em
Boolean
td
p
Whether to send a notification when the user changes their password.
p
The function ignores this parameter when you authenticate as a Subaccount or use the 
code
username
 parameter with a Subaccount.

This parameter defaults to 
code
1
.

td
ul
li
code
1
 — Send notification.
li
code
0
 — Do 
strong
not
 send notification.
td
code
0
tr
td
code
notify_password_change_notification_disabled
td
em
Boolean
td
p
span
Whether to send a notification when the 
code
notify_password_change_notification_disabled
parameter is 
code
0
.
ul
li
We introduced this parameter in cPanel 
&
 WHM version 11.48.
li
The function ignores this parameter when you authenticate as a Subaccount or use the 
code
username
 parameter with a Subaccount.

This parameter defaults to 
code
1
.

td
ul
li
code
1
 — Send notification.
li
code
0
 — Do 
strong
not
 send notification.
td
code
0
tr
td
code
notify_ssl_expiry
td
em
Boolean
td
p
Whether to send a notification about SSL certificate expiry.
p
We added this parameter in cPanel 
&
 WHM version 68.
p
This parameter defaults to 
code
1
.
td
ul
li
code
1
 — Send notification.
li
code
0
 — Do 
strong
not
 send notification.
td
code
1
tr
td
code
notify_twofactorauth_change
td
em
Boolean
td
p
span
Whether to send a notification when the user's 
a
Two-Factor Authentication for WHM
 configuration changes.
p
This parameter defaults to 
code
1
.
td
ul
li
code
1
 — Send notification.
li
code
0
 — Do 
strong
not
 send notification.
td
code
1
tr
td
code
notify_twofactorauth_change_notification_disabled
td
em
Boolean
td
p
span
Whether to send a notification when the 
code
notify_twofactorauth_change
 parameter is 
code
0
.
p
span
This parameter defaults to 
code
1
. 
td
ul
li
code
1
 — Send notification.
li
code
0
 — Do 
strong
not
 send notification.
td
code
1
tr
td
code
pushbullet_access_token
td
em
string
td
p
An access token for Pushbullet notifications.
ul
li
We introduced this parameter in cPanel 
&
 WHM version 11.52.
li
The function ignores this parameter when you authenticate as a Subaccount or use the 
code
username
 parameter with a Subaccount.
span
This parameter defaults to an empty string.
td
span
A valid string.
td
code
a1b2c3d4e5f6g7h8i9j0
tr
td
code
username
td
em
string
td
div
p
The cPanel account or Subaccount in which to save the contact information.
p
We introduced this parameter in cPanel 
&
 WHM version 11.56.
span
This parameter defaults to any empty string.
td
ul
li
A valid Subaccount username.
li
A valid cPanel account username.
td
code
example1@example.com
## Returns

table
thead
tr
th
strong
Return
th
strong
Type
th
strong
Description
th
strong
Possible values
th
strong
Example
tbody
tr
td
code
display_value
td
em
string
td
The notification setting's display value.
td
A valid string.
td
code
user@example.com
tr
td
code
desc
td
em
string
td
A notification setting's description.
td
A valid string.
td
code
This is an email address at which the system can contact you. This should be an email address that is not on your account.
tr
td
code
name
td
em
string
td
The notification setting's name.
td
ul
li
code
email
li
code
second_email
li
code
notify_account_authn_link
li
code
                      notify_account_authn_link_notification_disabled  
li
code
notify_account_login
li
code
notify_account_login_for_known_netblock
li
code
notify_account_login_notification_disabled
li
code
notify_autossl_expiry
li
code
notify_autossl_expiry_coverage
li
code
notify_autossl_renewal_coverage_reduced
li
code
notify_autossl_renewal
li
code
notify_autossl_renewal_coverage
li
code
notify_bandwidth_limit 
li
code
notify_contact_address_change
li
code
notify_contact_address_change_notification_disabled
li
code
notify_disk_limit
li
code
notify_email_quota_limit
li
code
notify_password_change
li
code
notify_password_change_notification_disabled
li
code
notify_ssl_expiry
li
code
notify_twofactorauth_change
li
code
notify_twofactorauth_change_notification_disabled
li
code
pushbullet_access_token
td
code
email
tr
td
code
value
td
em
string
td
The notification setting's value.
td
A valid string or Boolean value.
td
code
user@example.com
tr
td
code
reason
td
em
string
td
p
A reason for failure.
p
This function only returns a 
code
reason
 value if it failed.
td
p
A string that describes the error.
td
code
This is an error message.
tr
td
code
result
td
em
Boolean
td
p
Whether the function succeeded.
td
ul
li
code
1
 — The function succeeded.
li
code
0
 — The function failed.
td
code
1