We log search terms to improve our documentation. For more information, read our Privacy Policy.

Manage2 API Function - Edit Group

Last modified: 2026 October 1


Description

This function edits the name, main group setting, and datacenter address of an existing Manage2 group.

Examples

XML

https://manage2.cpanel.net/XMLgroupEdit.cgi?group=ExampleGroup&newgroup=NewGroupName

JSON

https://manage2.cpanel.net/XMLgroupEdit.cgi?output=json&group=ExampleGroup&newgroup=NewGroupName

YAML

https://manage2.cpanel.net/XMLgroupEdit.cgi?output=yaml&group=ExampleGroup&newgroup=NewGroupName

1
2
3
4
5
6
7
8
<?php
include("cpl.inc.php");
$cpl = new cPanelLicensing("[email protected]","123456luggage");
$response = (array)$cpl->editGroup( array(
    'group'    => 'ExampleGroup',
    'newgroup' => 'NewGroupName',
));
?>

1
2
3
4
5
6
use cPanelLicensing;
my $cpl = cPanelLicensing->new(user => "[email protected]", pass => "123456luggage");
my $response = $licenseManager->editGroup(
    'group'    => 'ExampleGroup',
    'newgroup' => 'NewGroupName',
);

<XMLgroupEdit reason="Updated 'NewGroupName' group." status="1" />

1
2
3
4
{
    "status": 1,
    "reason": "Updated 'NewGroupName' group."
}

1
2
3
---
status: 1
reason: Updated 'NewGroupName' group.

Parameters

Important:

You must provide either the group or groupid parameter.

This function accepts the following parameters:

Parameter Type Description Example
group string Required
The group’s current name.
ExampleGroup
groupid string Required
The group’s ID.
G001
newgroup string A new group name that does not already exist. NewGroupName
maingroup Boolean Default group to which new licenses are added unless a group is explicitly defined.
Whether the maingroup is true:
  • 1 — True.
  • 0 — False.
1
country string The country of the datacenter in which licenses in the group are hosted.
Note:
Country code must be in the form of ISO 3166-1 alpha-2
US
stateprov string The state or province of the datacenter in which licenses in the group are hosted.
Note:
Code must be in the form of ISO 3166-2
TX
city string The city name the datacenter in which licenses in the group are hosted. Houston
postcode string
The post code of the address of the datacenter in which licenses in the group are hosted.
77092
addr1 string
The street number and street name of the address of the datacenter in which licenses in the group are hosted.
1234 Virtual St
addr2 string The suite or apartment number of the address of the datacenter in which licenses in the group are hosted, if applicable. 716
email string A contact email address for the group, up to 254 characters.
  • If you omit this parameter, the group’s current email address does not change.
  • If you pass an empty value (email=), the function removes the group’s email address.
  • If you pass an email address, the function replaces the group’s current email address.
Note:
Manage2 stores only the email address. For example, if you enter Partner Billing <[email protected]>, Manage2 stores [email protected].
[email protected]

Returns

This function returns the following values:

Return Type Description Example
reason string A message of success or failure. Updated 'NewGroupName' group.
status Boolean Whether the function succeeded:
  • 1 — Success.
  • 0 — Failure.
1

Additional Documentation