> For the complete documentation index, see [llms.txt](https://docs.bayunsystems.com/bayuncoresdk-python/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.bayunsystems.com/bayuncoresdk-python/groups/create-group.md).

# 6.1 Create Group

Using `createGroup` method, a new group is created. The group can be either of type `GroupTypePublic` or `GroupTypePrivate`. The user creating the group automatically becomes a member of the group, with full authorization for complete group-management functionality for that group. The developer can choose to enforce more fine-grained access controls if desired.

### 6.1.1 Create Public Group

The function takes the following parameters :

* **sessionId** : Unique SessionId which is received in the authenticate function response.
* **groupName** : Group name(Optional).

{% tabs %}
{% tab title="Python" %}

```python
response = bayunCore.createPublicGroup("<sessionId>", "<groupName>")
sessionId = response.sessionId
groupId = response.groupId
```

{% endtab %}
{% endtabs %}

### 6.1.2 Create Private Group

The function takes the following parameters :

* **sessionId** : Unique SessionId which is received in the authenticate function response.
* **groupName** : Group name(Optional).

{% tabs %}
{% tab title="Python" %}

```python
response = bayunCore.createPrivateGroup("<sessionId>", "<groupName>")
sessionId = response.sessionId
groupId = response.groupId
```

{% endtab %}
{% endtabs %}
