---
title: "Create Private Groups (Realtime)"
slug: "create-private-groups-realtime"
updated: 2026-05-14T20:11:21Z
published: 2026-05-14T21:47:59Z
stale: true
---

> ## Documentation Index
> Fetch the complete documentation index at: https://developer.rocket.chat/llms.txt
> Use this file to discover all available pages before exploring further.

# Create Private Groups (Realtime)

![](https://cdn.us.document360.io/27ca1fd4-36d7-4cde-b4eb-97fc1652954c/Images/Documentation/Deprecated.svg)

Create a [private channel](https://docs.rocket.chat/use-rocket.chat/user-guides/rooms/channels#private-channels).

| Method | Requires Auth | Permission |
| --- | --- | --- |
| `createPrivateGroup` | Yes | `create-p` |

## Payload parameters

| Argument | Example | Required | Description |
| --- | --- | --- | --- |
| `name` | `channelname` | Required | The name of the channel. |
| `members` | `["test.rc"]` | Optional; Default: `[]` | An array of usernames, represented as strings, for the users designated to be included in the channel. If the array is empty, only the user making the request to this method will be added to the channel. |

## Example call

```json
{
    "msg": "method",
    "method": "createPrivateGroup",
    "id": "8d89",
    "params": [
         "test-private-websockset",
        ["rocket.cat"]
    ]
}
```

## Example response

```json
{
    "msg": "result",
    "id": "8d89",
    "result": {
        "rid": "64a37803730ef04d3db2556f",
        "inserted": true,
        "fname": "test-private-websockset",
        "_updatedAt": {
            "$date": 1688434691876
        },
        "customFields": {},
        "name": "test-privadte-websockset",
        "t": "p",
        "msgs": 0,
        "usersCount": 0,
        "u": {
            "_id": "LFdhbcNHx5zsMA7T4",
            "username": "test.rc",
            "name": "Test RC"
        },
        "ts": {
            "$date": 1688434691876
        },
        "ro": false,
        "default": false,
        "sysMes": true,
        "_id": "64a37803730ef04d3db2556f"
    }
}
```
