UAPI accesses the cPanel interface's features. Use this API to access and modify cPanel account data and settings.
https://api.docs.cpanel.net/_mock/specifications/cpanel.openapi/
https://{host}:{port}/execute/
The account’s new contact email addresses.
The account’s existing contact email addresses.
If this list does not match the account’s current current email address(es), then the request will fail. This control is here to prevent race conditions.
- Mock server
https://api.docs.cpanel.net/_mock/specifications/cpanel.openapi/ContactInformation/set_email_addresses
- A server running cPanel.
https://cpanel-server.tld:2083/execute/ContactInformation/set_email_addresses
- curl
- JavaScript
- Node.js
- Python
- Java
- C#
- PHP
- Go
- Ruby
- R
- Payload
curl -i -X GET \
-u <username>:<password> \
'https://api.docs.cpanel.net/_mock/specifications/cpanel.openapi/ContactInformation/set_email_addresses?address=foo%40example.com%2Cbar%40example.com&old_address=old1%40example.com&password=q1df%25D9%3Cz0ShqdxRP%25%5E'{ "apiversion": 3, "func": "set_email_addresses", "module": "ContactInformation", "result": { "errors": null, "messages": null, "status": 1, "warnings": null } }
Request
Use this function to set the logged in cPanel or Webmail account's notification preferences.
Note:
To set a cPanel account's notification email address, call set_email_addresses. To return the list of account notification preferences you can set with set_notification_preferences, call get_notification_preferences.
- Mock server
https://api.docs.cpanel.net/_mock/specifications/cpanel.openapi/ContactInformation/set_notification_preferences
- A server running cPanel.
https://cpanel-server.tld:2083/execute/ContactInformation/set_notification_preferences
- curl
- JavaScript
- Node.js
- Python
- Java
- C#
- PHP
- Go
- Ruby
- R
- Payload
curl -i -X POST \
-u <username>:<password> \
https://api.docs.cpanel.net/_mock/specifications/cpanel.openapi/ContactInformation/set_notification_preferences \
-H 'Content-Type: application/json' \
-d '{
"preferences": {
"notify_account_authn_link": "0",
"notify_account_login": "1"
}
}'{ "apiversion": 3, "func": "set_notification_preferences", "module": "ContactInformation", "result": { "data": [ … ], "errors": null, "messages": null, "status": 1, "warnings": null } }
- Mock server
https://api.docs.cpanel.net/_mock/specifications/cpanel.openapi/ContactInformation/set_pushbullet_access_token
- A server running cPanel.
https://cpanel-server.tld:2083/execute/ContactInformation/set_pushbullet_access_token
- curl
- JavaScript
- Node.js
- Python
- Java
- C#
- PHP
- Go
- Ruby
- R
- Payload
curl -i -X GET \
-u <username>:<password> \
'https://api.docs.cpanel.net/_mock/specifications/cpanel.openapi/ContactInformation/set_pushbullet_access_token?pushbullet_access_token=a1b2c3d4e5f6g7h8i9j0'{ "apiversion": 3, "func": "set_pushbullet_access_token", "module": "ContactInformation", "result": { "errors": null, "messages": null, "status": 1, "warnings": null } }
The account’s new contact email addresses.
The account’s existing contact email addresses.
If this list does not match the account’s current current email address(es), then the request will fail. This control is here to prevent race conditions.
- Mock server
https://api.docs.cpanel.net/_mock/specifications/cpanel.openapi/ContactInformation/set_email_addresses
- A server running cPanel.
https://cpanel-server.tld:2083/execute/ContactInformation/set_email_addresses
- curl
- JavaScript
- Node.js
- Python
- Java
- C#
- PHP
- Go
- Ruby
- R
- Payload
curl -i -X GET \
-u <username>:<password> \
'https://api.docs.cpanel.net/_mock/specifications/cpanel.openapi/ContactInformation/set_email_addresses?address=foo%40example.com%2Cbar%40example.com&old_address=old1%40example.com&password=q1df%25D9%3Cz0ShqdxRP%25%5E'{ "apiversion": 3, "func": "set_email_addresses", "module": "ContactInformation", "result": { "errors": null, "messages": null, "status": 1, "warnings": null } }
Request
Use this function to set the logged in cPanel or Webmail account's notification preferences.
Note:
To set a cPanel account's notification email address, call set_email_addresses. To return the list of account notification preferences you can set with set_notification_preferences, call get_notification_preferences.
- Mock server
https://api.docs.cpanel.net/_mock/specifications/cpanel.openapi/ContactInformation/set_notification_preferences
- A server running cPanel.
https://cpanel-server.tld:2083/execute/ContactInformation/set_notification_preferences
- curl
- JavaScript
- Node.js
- Python
- Java
- C#
- PHP
- Go
- Ruby
- R
- Payload
curl -i -X POST \
-u <username>:<password> \
https://api.docs.cpanel.net/_mock/specifications/cpanel.openapi/ContactInformation/set_notification_preferences \
-H 'Content-Type: application/json' \
-d '{
"preferences": {
"notify_account_authn_link": "0",
"notify_account_login": "1"
}
}'{ "apiversion": 3, "func": "set_notification_preferences", "module": "ContactInformation", "result": { "data": [ … ], "errors": null, "messages": null, "status": 1, "warnings": null } }
- Mock server
https://api.docs.cpanel.net/_mock/specifications/cpanel.openapi/ContactInformation/set_pushbullet_access_token
- A server running cPanel.
https://cpanel-server.tld:2083/execute/ContactInformation/set_pushbullet_access_token
- curl
- JavaScript
- Node.js
- Python
- Java
- C#
- PHP
- Go
- Ruby
- R
- Payload
curl -i -X GET \
-u <username>:<password> \
'https://api.docs.cpanel.net/_mock/specifications/cpanel.openapi/ContactInformation/set_pushbullet_access_token?pushbullet_access_token=a1b2c3d4e5f6g7h8i9j0'{ "apiversion": 3, "func": "set_pushbullet_access_token", "module": "ContactInformation", "result": { "errors": null, "messages": null, "status": 1, "warnings": null } }