- Created by Documentation, last modified on Apr 09, 2018
disable_authentication_provider
disable_failing_authentication_providers
enable_authentication_provider
get_available_authentication_providers
get_provider_client_configurations
get_provider_configuration_fields
get_provider_display_configurations
get_users_authn_linked_accounts
set_provider_client_configurations
set_provider_display_configurations
twofactorauth_generate_tfa_config
twofactorauth_get_user_configs
cpgreylist_is_server_netblock_trusted
cpgreylist_list_entries_for_common_mail_provider
cpgreylist_load_common_mail_providers_config
cpgreylist_save_common_mail_providers_config
cpgreylist_trust_entries_for_common_mail_provider
cpgreylist_untrust_entries_for_common_mail_provider
create_cpgreylist_trusted_host
delete_cpgreylist_trusted_host
block_incoming_email_from_country
block_incoming_email_from_domain
expunge_messages_for_mailbox_guid
get_unique_recipient_count_per_sender_for_user
get_unique_sender_recipient_count_per_user
get_user_email_forward_destination
list_blocked_incoming_email_countries
list_blocked_incoming_email_domains
set_user_email_forward_destination
unblock_incoming_email_from_country
unblock_incoming_email_from_domain
Description
This function changes a cPanel account's hosting plan (package).
Examples
https://hostname.example.com:2087/cpsess##########/json-api/changepackage?api.version=1&user=username&pkg=package1
https://hostname.example.com:2087/cpsess##########/xml-api/changepackage?api.version=1&user=username&pkg=package1
whmapi1 changepackage user=username pkg=package1
Notes:
- Unless otherwise noted, you must URI-encode values.
- For more information and additional output options, read our Guide to WHM API 1 documentation or run the
whmapi1 --help
command. If you run CloudLinux™, you must use the full path of the
whmapi1
command:/usr/local/cpanel/bin/whmapi1
{ "metadata":{ "output":{ "raw":"<pre>\nChanging the account bandwidth limit from "unlimited" to "524288000".\nChanging Feature List to default\nChanging the maximum email accounts from "7" to "5".\nChanging the maximum SQL databases from "unlimited" to "5".\nChanging the maximum FTP accounts from "unlimited" to "5".\nChanging the maximum mailing lists from "unlimited" to "5".\nChanging the maximum subdomains from "5" to "unlimited".\nChanging the maximum email quota from "500" to "unlimited"...\nChanging \"Maximum Hourly Email by Domain Relayed\" from unlimited to unlimited\nChanging \"Maximum percentage of failed or deferred messages a domain may send per hour\" from unlimited to unlimited\nChanging the maximum parked domains from "5" to "unlimited".\nChanging the maximum addon domains from "3" to "unlimited".\nShell Access Set Correctly\nChanging cPanel theme from paper_lantern to paper_lantern\nChanging plan from extensions_username_username_username to package\nBandwidth limit (524288000) is lower than (unlimited) (all limits removed)<br /><blockquote><div style='float:left;'>Enabling...</div><div style='float:left;'>...addondomain.com...</div><div style='float:left;'>...example.com...</div><div style='float:left;'>Done</div></blockquote><br /><div class='clearit' style='clear:both; width:80%;'> </div>Setting quota to "500".\n<span class=\"b2\">Warning, this will not change shared IP accounts to dedicated IP accounts, or the reverse.</span>\n<span class=\"b2\">Warning: Changing a user's package does not affect their Digest Authentication settings.</span>\n" }, "result":1, "command":"changepackage", "reason":"Account Upgrade/Downgrade Complete for username", "version":1 } }
<result> <metadata> <version>1</version> <reason>Account Upgrade/Downgrade Complete for username</reason> <output> <raw> <pre>Changing the account bandwidth limit from "524288000" to "524288000". Changing Feature List to default Changing the maximum email accounts from "5" to "5". Changing the maximum SQL databases from "5" to "5". Changing the maximum FTP accounts from "5" to "5". Changing the maximum mailing lists from "5" to "5". Changing the maximum subdomains from "unlimited" to "unlimited". Changing the maximum email quota from "500" to "unlimited"... Changing "Maximum Hourly Email by Domain Relayed" from unlimited to unlimited Changing "Maximum percentage of failed or deferred messages a domain may send per hour" from unlimited to unlimited Changing the maximum parked domains from "unlimited" to "unlimited". Changing the maximum addon domains from "unlimited" to "unlimited". Shell Access Set Correctly Changing cPanel theme from paper_lantern to paper_lantern Changing plan from package to package Bandwidth limit (524288000) is lower than (unlimited) (all limits removed)<br /><blockquote><div style='float:left;'>Enabling...</div><div style='float:left;'>...addondomain.com...</div><div style='float:left;'>...example.com...</div><div style='float:left;'>Done</div></blockquote><br /><div class='clearit' style='clear:both; width:80%;'> </div>Setting quota to "500". <span class="b2">Warning, this will not change shared IP accounts to dedicated IP accounts, or the reverse.</span> <span class="b2">Warning: Changing a user's package does not affect their Digest Authentication settings.</span> </raw> </output> <result>1</result> <command>changepackage</command> </metadata> </result>
Note:
Parameters
Parameter | Type | Description | Possible values | Example |
---|---|---|---|---|
user | string | Required The cPanel account's username. | A valid cPanel account on the server. | username |
pkg | string | Required The hosting plan's name. | An existing hosting plan name on the server. | package1 |
Returns
This function only returns metadata.
Function information
API Version:
Available in:
WHM 11+
Methods:
GET, POST
Required Parameters:
user
, pkg
Return Formats:
About WHM API 1
WHM API 1 performs functions and accesses data in WHM.
Notes:
- Some functions and parameters may require that you authenticate as the
root
user. - You must use the appropriate WHM ports (
2086
or2087
) to call WHM API functions.
Find a function
Related functions
-
Page:WHM API 1 Functions - changepackage — This function changes a cPanel account's hosting plan (package).
-
Page:WHM API 1 Functions - killpkg — This function deletes a hosting plan (package).
-
Page:WHM API 1 Functions - _getpkgextensionform — This function retrieves a hosting plan's package extension templates.
-
Page:WHM API 1 Sections - Packages — Package functions allow you to manage hosting plans for resellers and cPanel users.
-
Page:WHM API 1 Functions - addpkgext — This function adds a package extension to a hosting plan (package).