Manage2 API Function - Add Group


Last modified: March 12, 2021

Description

This function adds a group to a Manage2 account.

Examples

XML

https://manage2.cpanel.net/XMLgroupAdd.cgi?group=NewGroup&taxable=1

JSON

https://manage2.cpanel.net/XMLgroupAdd.cgi?output=json&group=NewGroup&taxable=1

YAML

https://manage2.cpanel.net/XMLgroupAdd.cgi?output=yaml&group=NewGroup&taxable=1

1
2
3
4
5
6
7
8
<?php
include("cpl.inc.php");
$cpl = new cPanelLicensing("username@example.com","123456luggage");
$response = (array)$cpl->addGroup(array(
    'group'   => 'NewGroup',
    'taxable' => '1'
);
?>

1
2
3
4
5
6
use cPanelLicensing;
my $cpl = cPanelLicensing->new(user => "username@example.com", pass => "123456luggage");
my $response = $licenseManager->addGroup(
    'group'   => 'NewGroup',
    'taxable' => '1'
);

<XMLgroupAdd reason="Added 'NewGroup' group." status="1" />

1
2
3
4
{
    "reason": "Added 'NewGroup' group.",
    "status": 1
}

1
2
3
---
reason: Added 'NewGroup' group.
status: 1

Parameters

This function accepts the following parameters:

Parameter Type Description Example
group string Required
The desired group name, up to 50 characters.
NewGroup
taxable Boolean Required
Whether the new group’s licenses are eligible for Texas state sales tax:
  • 1 — Taxable.
  • 0 — Not taxable.
1

Returns

This function returns the following values:

Return Type Description Example
reason string A message of success or failure. Added 'NewGroup' group.
status Boolean Whether the function succeeded:
  • 1 — The function succeeded.
  • 0 — The function failed.
1

Additional Documentation