# CreateGroup method

You can use the CreateGroup method with any object that contains an object grouping definition. This method allows you to create a new subgroup of objects directly and add it to a group's members. Returns the ID of the created subgroup.

Warning note**EXPERIMENTAL.**  
This API is under development. Do not rely on it. It may change or be removed in future versions.

## Parameters

| Name | Description | Mandatory | Type |
| --- | --- | --- | --- |
| qPath | Path to the definition of the object to be selected.<br>For example */qNxGroupDef* . | Yes | String |
| qGroupDef | Definition of the new group. | Yes | [NxGroupDef](https://help.qlik.com/en-US/sense-developer/May2026/Subsystems/EngineJSONAPI/Content/models-nxgroupdef.htm) |
| qTargetGroupId | Id of the group to create the new subgroup in (if not the called object). | No | String |

## Returns

| Name | Description | Type |
| --- | --- | --- |
| qGroupId |  | String |

## Access Control

`create, update`