> ## 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.

> Creates a group.

# Create

## Constraints

| Item                                         | Constraint                        | Notes                                                                                                |
| -------------------------------------------- | --------------------------------- | ---------------------------------------------------------------------------------------------------- |
| GUID character limit                         | 100 characters                    | Alphanumeric with dashes only; spaces not allowed                                                    |
| Group name                                   | 100 characters (UTF8mb4)          | Supports all languages and emojis                                                                    |
| Maximum users in a group (with all features) | 300                               | Groups 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 password                               | 100 characters max                | Only applicable for password-protected groups                                                        |
| Group description                            | 255 characters (UTF8mb4)          | Brief summary of the group's purpose                                                                 |
| Maximum groups                               | No limit                          | Create as many groups as needed; billing based on active users                                       |
| Typing indicators for groups                 | Up to 1000 online users           | Disabled for larger groups to optimize performance                                                   |
| Unread message counts for groups             | Up to 300 members                 | Not updated for groups with more than 300 members                                                    |
| Delivery and read receipts for groups        | Up to 300 online users            | Disabled in large groups to reduce server load                                                       |
| Active presence subscriptions                | Up to 1000 online users           | Presence notifications not sent beyond this limit                                                    |

For the complete error reference, see [Error Guide](/articles/error-guide).


## OpenAPI

````yaml post /groups
openapi: 3.0.0
info:
  title: Chat APIs
  description: Manage messages, users, groups for a particular app using our Chat API.
  version: '3.0'
servers:
  - url: https://{appId}.api-{region}.cometchat.io/v3
    variables:
      appId:
        default: appId
        description: (Required) App ID
      region:
        enum:
          - us
          - eu
          - in
        default: us
        description: Select Region
security: []
tags:
  - name: API Keys
    description: The API keys are used to authorise the APIs
  - name: Roles
    description: The roles are used to give user access rights
  - name: Users
    description: The REST collection for users.
  - name: Auth Tokens
    description: The auth tokens are used to login end users using client SDKs.
  - name: Blocked Users
    description: The REST collections for blocked users.
  - name: Friends
    description: List,add and remove friends by passing UID in path variables
  - name: Groups
    description: The REST collections for groups.
  - name: Banned Users
    description: Ban and Unban user by passing other UID in path variables.
  - name: Group Members
    description: The REST collections for group members.
  - name: Messages
    description: The REST collections for messages.
  - name: Conversations
    description: The REST collections for conversations.
  - name: Restrict Features
    description: Allows Restricting Features
  - name: Metrics
    description: Allows accessing Data Metrics
  - name: Triggers
    description: Allows adding triggers to a webhook.
  - name: Webhooks
    description: Allows accessing Webhooks.
  - name: Notifications
    description: Allows configuring Notifications core.
paths:
  /groups:
    post:
      tags:
        - Groups
      summary: Create
      description: Creates a group.
      operationId: create-group
      parameters:
        - $ref: '#/components/parameters/onBehalfOf'
      requestBody:
        content:
          application/json:
            schema:
              required:
                - guid
                - name
                - type
              properties:
                guid:
                  description: A unique identifier for a group.
                  type: string
                name:
                  description: Name of the group.
                  type: string
                type:
                  description: Type of the group. Can be public, password or private.
                  type: string
                  enum:
                    - public
                    - password
                    - private
                password:
                  description: A password required to join the the group with type password
                  type: string
                icon:
                  description: An URL for a group icon.
                  type: string
                description:
                  description: Description about the group
                  type: string
                metadata:
                  description: Additional data for the group.
                  type: object
                owner:
                  description: The UID that you wish to make owner of the group
                  type: string
                tags:
                  description: List of tags to identify specific groups.
                  type: array
                  items:
                    type: string
                  default:
                    - tag1
                members:
                  description: >-
                    Add members to a group with scope admins,moderators and
                    participants.
                  properties:
                    admins:
                      description: UIDs of users to be made admins.
                      type: array
                      items:
                        type: string
                      default: []
                    moderators:
                      description: UIDs of users to be made moderators.
                      type: array
                      items:
                        type: string
                      default: []
                    participants:
                      description: UIDs of users to be made participants.
                      type: array
                      items:
                        type: string
                      default: []
                    usersToBan:
                      description: UIDs of the users to be banned from the group.
                      type: array
                      items:
                        type: string
                      default: []
                  type: object
              type: object
      responses:
        '200':
          description: Create Group
          content:
            application/json:
              schema:
                properties:
                  data:
                    type: object
                type: object
              example:
                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
      security:
        - apiKey: []
components:
  parameters:
    onBehalfOf:
      name: onBehalfOf
      in: header
      description: UID of the user on whose behalf the action is performed.
      schema:
        type: string
  securitySchemes:
    apiKey:
      type: apiKey
      description: API Key with fullAccess scope(i.e. Rest API Key from the Dashboard).
      name: apikey
      in: header

````