Skip to main content
POST
/
groups
Create
curl --request POST \
  --url https://{appId}.api-{region}.cometchat.io/v3/groups \
  --header 'Content-Type: application/json' \
  --header 'apikey: <api-key>' \
  --data '
{
  "guid": "<string>",
  "name": "<string>",
  "type": "public",
  "password": "<string>",
  "icon": "<string>",
  "description": "<string>",
  "metadata": {},
  "owner": "<string>",
  "tags": [
    "tag1"
  ],
  "members": {
    "admins": [],
    "moderators": [],
    "participants": [],
    "usersToBan": []
  }
}
'
{
  "data": {
    "guid": "project-group",
    "name": "Project Group",
    "description": "project related discussions between members",
    "icon": "https://assets.cometchat.io/sampleapp/v2/groups/cometchat-guid-1.webp",
    "type": "public",
    "scope": "admin",
    "membersCount": 1,
    "joinedAt": 1638440784,
    "conversationId": "group_project-group",
    "hasJoined": true,
    "createdAt": 1638440784,
    "owner": "cometchat-uid-4",
    "tags": [
      "friends",
      "project"
    ]
  }
}

Documentation Index

Fetch the complete documentation index at: https://www.cometchat.com/docs/llms.txt

Use this file to discover all available pages before exploring further.

Constraints

ItemConstraintNotes
GUID character limit100 charactersAlphanumeric with dashes only; spaces not allowed
Group name100 characters (UTF8mb4)Supports all languages and emojis
Maximum users in a group (with all features)300Groups up to 300 members support all features including delivery/read receipts and typing indicators
Maximum users in a group (without receipts)100,000 (up to 10,000 concurrent)Large groups disable delivery/read receipts and typing indicators for performance
Group password100 characters maxOnly applicable for password-protected groups
Group description255 characters (UTF8mb4)Brief summary of the group’s purpose
Maximum groupsNo limitCreate as many groups as needed; billing based on active users
Typing indicators for groupsUp to 1000 online usersDisabled for larger groups to optimize performance
Unread message counts for groupsUp to 300 membersNot updated for groups with more than 300 members
Delivery and read receipts for groupsUp to 300 online usersDisabled in large groups to reduce server load
Active presence subscriptionsUp to 1000 online usersPresence notifications not sent beyond this limit
For the complete error reference, see Error Guide.

Authorizations

apikey
string
header
required

API Key with fullAccess scope(i.e. Rest API Key from the Dashboard).

Headers

onBehalfOf
string

UID of the user on whose behalf the action is performed.

Body

application/json
guid
string
required

A unique identifier for a group.

name
string
required

Name of the group.

type
enum<string>
required

Type of the group. Can be public, password or private.

Available options:
public,
password,
private
password
string

A password required to join the the group with type password

icon
string

An URL for a group icon.

description
string

Description about the group

metadata
object

Additional data for the group.

owner
string

The UID that you wish to make owner of the group

tags
string[]

List of tags to identify specific groups.

members
object

Add members to a group with scope admins,moderators and participants.

Response

200 - application/json

Create Group

data
object