Manage2 API Function - Add Licenses

Last modified: 2026 June 1


Description

This function adds a new license to a Manage2 account.

Examples

XML

https://manage2.cpanel.net/XMLlicenseAdd.cgi?ip=192.0.2.0&packageid=8&groupid=13&force=1&dryrun=0&maxusers=120&external_notes=testlicense

JSON

https://manage2.cpanel.net/XMLlicenseAdd.cgi?output=json&ip=192.0.2.0&packageid=008&groupid=013&force=1&dryrun=0&maxusers=120&external_notes=testlicense

YAML

https://manage2.cpanel.net/XMLlicenseAdd.cgi?output=yaml&ip=192.0.2.0&packageid=008&groupid=013&force=1&dryrun=0&maxusers=120&external_notes=testlicense

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
<?php
include("cpl.inc.php");
$cpl = new cPanelLicensing("[email protected]", "123456luggage");
$lisc = (array)$cpl->activateLicense(array(
    "ip"          => "192.0.2.0",
    "groupid"     => "013",
    "packageid"   => 008",
    "force"       => "1",
    "dryrun"      => "0",
    "maxusers"      => "120",
    "external_notes"    => "testlicense"
    )
);
?>

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
use cPanelLicensing;
my $licenseManager = new cPanelLicensing(user => "username\@example.com", pass => "123456luggage");
my $liscid = $licenseManager->activateLicense(
    'ip'          => '192.0.2.0',
    'groupid'     => '013',
    'packageid'   => '008',
    'force'       => '1',
    "dryrun"      => "0",
    "maxusers"      => "120",
    "external_notes"    => "testlicense"
);

<XMLlicenseAdd licenseid="6793969" monthly_price="21.34" price="0.00" promoinfo="" reason="Activated EXAMPLECOMPANY license on 192.0.2.0 in the 'example' group." status="1" yearly="0"/>

1
2
3
4
5
6
7
8
9
{
    "monthly_price": "21.34",
    "status": 1,
    "yearly": 0,
    "reason": "Activated EXAMPLECOMPANY license on 192.0.2.0 in the 'example' group.",
    "price": "100.00",
    "promoinfo": "",
    "licenseid": "6793969"
}

1
2
3
4
5
6
7
8
---
monthly_price: '21.34'
status: 1
yearly: 0
reason: Activated EXAMPLECOMPANY license on 192.0.2.0 in the 'example' group.
price: '100.00'
promoinfo: ''
licenseid: '6793969'

Parameters

This function accepts the following parameters:

Parameter Type Description Example
admin_email string Required for Business Email licenses
This parameter applies to Business Email and WHMCS Cloud licenses.
  • For Business Email licenses, the email address to which the system sends product notifications.
  • For WHMCS Cloud licenses, the administrator email address for the instance. This value must be unique.
[email protected]
domain string Required for Business Email, Nova Cloud, WHMCS Cloud, and WP Squared Cloud licenses
This parameter applies to Business Email, Nova Cloud, WHMCS Cloud, and WP Squared Cloud licenses.
  • For Business Email licenses, the domain that will use the email service.
  • For Nova Cloud, WHMCS Cloud, and WP Squared Cloud licenses, the domain name for the instance. This value must be unique.
example.com
dryrun Boolean Whether to display error messages and price information but not activate the license:
  • 1 — Display fee information but do not activate the license.
  • 0 — Do not display fee information but activate the license.
This parameter defaults to 0.
1
external_notes string A space for additional information associated with the license, up to 64 characters long.
Warning:
If the parameter’s value exceeds 64 characters, this function will return an error.
testlicense
force
or
reactivateok
Boolean Whether to forcibly add the license to the specified IP address:
  • 1 — Forcibly add the license.
  • 0 — Do not forcibly add the license.
This parameter defaults to 1.
0
groupid string The ID of the group to which to add the license.
  • The Manage2 Display Groups function returns a list of possible values.
  • This parameter defaults to the default group.
013
hosted_sites integer A positive integer for the total number of hosted sites on a Sitejet Studio license.

This parameter defaults to 1.
Note:
This parameter is optional and only applies to Sitejet Studio licenses.
1
ip string Required
The IP address for which to add a license.
Note:

The following licenses do not require this parameter:

  • 360 Monitoring
  • Business Email
  • koality
  • Nova Cloud
  • Sitejet Commerce
  • Sitejet Studio
  • SocialBee
  • WHMCS Cloud
  • WP Guardian
  • WP Squared Cloud
192.0.2.0
language string This parameter applies to Business Email, WHMCS Cloud, Nova Cloud, and WP Squared Cloud licenses. The default language for the instance.
Note:
For a list of valid values for each product, see Supported language values.
This parameter defaults to en-US.
en-US
mailboxes integer Required for Business Email licenses
This parameter only applies to Business Email licenses. The number of mailboxes to provision for the customer. This value must be a positive integer from 1 to 1000.
4
maxusers integer The maximum number of users for the license. 120
packageid string Required
The package’s ID number. The Manage2 List Package Information function returns a list of possible values.
008
plan string This parameter is optional and only applies to Business Email licenses. A custom plan name to display to the customer in the interface, up to 30 characters.

If you do not use this parameter, the plan name defaults to the Manage2 package name (for example, Business Email Starter).
Example Email Plan
profiles integer This parameter is optional and only applies to SocialBee licenses. It represents the number of additional profiles to add to a SocialBee license, and must be a positive multiple of 5. 5
projects integer The total number of additional projects for a koality license.

This parameter defaults to 0.
30
self_hosted_sites integer A positive integer for the total number of self-hosted sites on a Sitejet Studio license.

This parameter defaults to 0.
Note:
This parameter is optional and only applies to Sitejet Studio licenses.
1
servers integer A positive integer for the total number of server monitors.
Note:
  • If you do not use this parameter, the return’s value is the default from the 360 Monitoring package.
  • This parameter is optional and only applies to a 360 Monitoring license.
1
sites integer This parameter is optional and only applies to 360 Monitoring, WP Guardian, or WP Guardian (cPanel Addon) licenses. Its value depends on your license type.
  • For 360 Monitoring licenses, this parameter represents the total number of site monitors. Its value must be a positive integer greater than or equal to 20.
  • For WP Guardian and WP Guardian (cPanel Addon) licenses, this parameter represents the number of sites to add to the selected package. Its value must be a positive integer.
Note:

If you do not use this parameter, the sites return value is the default from the 360 Monitoring or WP Guardian package.

20
users integer This parameter is optional and only applies to SocialBee licenses. It represents the number of additional users to add to a SocialBee license, and must be a positive integer. 1
workspaces integer This parameter is optional and only applies to SocialBee licenses. It represents the number of additional workspaces to add to a SocialBee license, and must be a positive integer. 1
zone string Required for Business Email, Nova Cloud, WHMCS Cloud, and WP Squared Cloud licenses
The data center zone for the instance. The possible values for this parameter vary by license type. For example:
  • ap-north-jp1 — Japan
  • eu-central-ch1 — Switzerland
  • eu-central-de1 — Germany
  • us-south-tx1 — USA (Houston)
  • us-south-tx2 — USA (Dallas)
us-south-tx1

Supported language values

You can use the following values for the language parameter when adding Business Email, Nova Cloud, WHMCS Cloud, or WP Squared Cloud licenses:

Value Language Business Email Nova Cloud WHMCS Cloud WP Squared Cloud
sq-AL Albanian
ar-AE Arabic
ar-SA Arabic (Saudi Arabia)
hy-AM Armenian
az-AZ Azerbaijani
eu-ES Basque
be-BE Belarusian
bn-BD Bengali
bs-BA Bosnian
bg-BG Bulgarian
ca-ES Catalan
zh-CN Chinese Simplified
hr-HR Croatian
cs-CZ Czech
da-DK Danish
fa-AF Dari
nl-NL Dutch
nl-AW Dutch
en-US English (US)
et-EE Estonian
fo-FO Faroese
fi-FI Finnish
nl-BE Flemish
fr-FR French
fr-CA French (Canada)
gl-ES Galician
ka-GE Georgian
de-DE German
el-GR Greek
he-IL Hebrew
hi-IN Hindi
hu-HU Hungarian
is-IS Icelandic
id-ID Indonesian
ga-IE Irish
it-IT Italian
ja-JP Japanese
km-KH Khmer
kn-IN Konkani
ko-KR Korean
lv-LV Latvian
lt-LT Lithuanian
lb-LU Luxembourgish
mk-MK Macedonian
ms-MY Malay
ml-IN Malayalam
mr-IN Marathi
mn-MN Mongolian
ne-NP Nepali
nb-NO Norwegian Bokmål
fa-IR Persian
pl-PL Polish
pt-BR Portuguese (Brazil)
ro-RO Romanian
ru-RU Russian
sr-CS Serbian
si-LK Sinhalese
sk-SK Slovak
sl-SI Slovenian
es-ES Spanish
es-MX Spanish (Mexico)
sv-SE Swedish
ta-IN Tamil
th-TH Thai
tr-TR Turkish
uk-UA Ukrainian
ur-PK Urdu
vi-VN Vietnamese
cy-GB Welsh
fy-NL West Frisian

Returns

This function returns the following values:

Return Type Description Example
activation_code string The activation code for a license of the following types:
  • 360 Monitoring
  • Comet Backup
  • koality
  • Sitejet Commerce
  • Sitejet Studio
  • SocialBee
  • WP Guardian
  • WP Guardian (cPanel Addon)
ABC123-1Q2W3E-BMW555-V5F4R3-HJKL98
activation_link string The link to use to activate a license of the following types:
  • 360 Monitoring
  • koality
  • Sitejet Commerce
  • Sitejet Studio
  • SocialBee
  • WP Guardian
  • WP Guardian (cPanel Addon)
Note:
WP Guardian (cPanel Addon) and Comet Backup licenses always return a blank string as the activation_link value.
https://app.360monitoring.com/license/activate/ABC123-1Q2W3E-BMW555-V5F4R3-HJKL98
cname string The CNAME DNS record for the Nova Cloud, WHMCS Cloud, and WP Squared Cloud license’s associated instance. 12345678-abcd-1234-efgh-567890abcdef.package.webpros.cloud
hosted_sites integer The total number of hosted sites on a Sitejet Studio license. 1
instanceid string The Business Email instance ID. 019e41f4-56bb-8064-9301-acf848981d19
licenseid integer The new license ID.
Note:
For Business Email licenses, use this value to perform mailbox-level operations.
6793969
memory number The amount of memory in GB for the WP Squared Cloud license. 0.50
monthly_price numeric The monthly base price of a license, in US dollars. 21.34
password string The password for the WHMCS Cloud or WP Squared Cloud instance. 123456luggage
phpworkers integer The number of PHP workers for the WP Squared Cloud license. 1
price numeric The price for a license in US dollars. 100.00
products_included string The total number of products you can display in the web stores you create with Sitejet Commerce. One of:
  • 100
  • 2500
  • unlimited
100
profiles integer The number of additional profiles you added to a SocialBee license.

If you did not add this parameter, this return’s value is 0.
5
projects integer A positive integer that represents the total number of projects for a koality license. 30
promoinfo string Information about any applied promotional rates. One of:
  • A string value.
  • "" — No promotion applied.
""
reason string Information about the license activation. Activated EXAMPLECOMPANY license on 192.0.2.0 in the 'example' group.
servers integer The number of server monitors in the 360 Monitoring license. This must be a positive integer. 1
sites integer This return value depends on your license type.
  • For 360 Monitoring licenses, this is the number of site monitors. This must be a positive integer that is greater than or equal to 20.
  • For WP Guardian licenses, this is the number of sites. This must be a positive integer.
20
self_hosted_sites integer The total number of self-hosted sites on a Sitejet Studio license. 1
status Boolean Whether the function succeeded:
  • 1 — Success.
  • 0 — Failure.
1
storage integer The amount of storage in GB for the WP Squared Cloud license. 10
username string The username for the WHMCS Cloud or WP Squared Cloud instance. admin
users integer The number of additional users you added to a SocialBee license.

If you did not add this parameter, this return’s value is 0.
1
vcpus integer The number of virtual CPUs for the WP Squared Cloud license. 1
workspaces integer The number of additional workspaces you added to a SocialBee license.

If you did not add this parameter, this return’s value is 0.
1
wpcga_sites integer The number of sites for a WP Guardian (cPanel Addon) license. 100
yearly Boolean Whether the license is a yearly license:
  • 1 — A yearly license.
  • 0 — Not a yearly license.
0

Additional Documentation