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

# Create user group

> Create an empty user group.

Creates an empty user group. Add members with the [update user group](/api-reference/endpoint/patch_user_group) endpoint.

Names are unique within the workspace: case and repeated spaces are ignored when comparing them.


## OpenAPI

````yaml POST /v1/user-groups
openapi: 3.1.0
info:
  title: Claap API
  description: Development documentation
  version: 0.0.0
servers:
  - url: https://api.claap.io/
security:
  - ApiKey: []
paths:
  /v1/user-groups:
    post:
      description: Create an empty user group.
      operationId: postV1UserGroups
      requestBody:
        content:
          application/json:
            schema:
              type: object
              properties:
                name:
                  type: string
                  minLength: 1
                  maxLength: 100
                  description: >-
                    User group name. It must not be used by another user group
                    of the workspace.
              required:
                - name
      responses:
        '200':
          description: User group was successfully created
          content:
            application/json:
              schema:
                type: object
                properties:
                  result:
                    type: object
                    properties:
                      userGroup:
                        $ref: '#/components/schemas/ApiUserGroup'
                    required:
                      - userGroup
                required:
                  - result
        '400':
          description: >-
            The request is not valid. For instance the name is empty, longer
            than 100 characters, or already used by another user group.
components:
  schemas:
    ApiUserGroup:
      type: object
      properties:
        userGroupId:
          type: string
          description: User group identifier.
        name:
          type: string
          description: User group name.
        memberUserIds:
          type: array
          items:
            type: string
          description: Identifiers of the workspace users in the group.
      required:
        - userGroupId
        - name
        - memberUserIds
  securitySchemes:
    ApiKey:
      type: apiKey
      in: header
      name: X-Claap-Key

````