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

# Create a new entity group

> Creates a new entity container and returns it. By default a top-level group; pass kind "division" (optionally with a parentId) to create a division.



## OpenAPI

````yaml https://api.mentionlab.io/api/docs-json post /api/entity-groups
openapi: 3.0.0
info:
  title: MentionLab Public API v0.3.4-rc
  description: ''
  version: 0.3.4-rc
  contact: {}
servers:
  - url: https://api.mentionlab.io
security: []
tags: []
paths:
  /api/entity-groups:
    post:
      tags:
        - Entity Groups
      summary: Create a new entity group
      description: >-
        Creates a new entity container and returns it. By default a top-level
        group; pass kind "division" (optionally with a parentId) to create a
        division.
      operationId: EntityGroupsController_create
      parameters:
        - name: x-project-id
          in: header
          description: Project ID to specify the project context
          required: true
          schema:
            type: string
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/CreateEntityGroupDto'
      responses:
        '201':
          description: ''
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/EntityGroupResponse'
        '400':
          description: >-
            The request failed validation — the body, query or path parameters
            are malformed or out of range.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiErrorResponse'
        '401':
          description: The request is missing valid authentication credentials.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiErrorResponse'
        '403':
          description: >-
            The authenticated principal lacks the required permission, or access
            to the requested organisation/project.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiErrorResponse'
components:
  schemas:
    CreateEntityGroupDto:
      type: object
      properties:
        name:
          type: string
          description: Group name
          example: Premium Brands
        kind:
          type: string
          description: >-
            What this container is. "group" is a top-level group; "division" can
            sit under a group or stand alone. Immutable after creation. Defaults
            to "group".
          enum:
            - group
            - division
        parentId:
          type: string
          description: >-
            Parent group for a division. Only divisions can have a parent, and
            the parent must be a group. Omit to create a top-level group or a
            standalone division.
          format: uuid
          example: 018f3a2b-7c4d-7e91-b3f5-2a6c8d0e1f42
      required:
        - name
    EntityGroupResponse:
      type: object
      properties:
        id:
          type: string
          format: uuid
        kind:
          type: string
          enum:
            - group
            - division
          description: >-
            What this container is: a top-level "group" or a "division".
            Immutable.
        parent:
          type: string
          description: >-
            Parent group ID. Set only on divisions that belong to a group; null
            on top-level groups and standalone divisions.
          format: uuid
          nullable: true
        name:
          type: string
        slug:
          type: string
        createdAt:
          format: date-time
          type: string
        updatedAt:
          format: date-time
          type: string
      required:
        - id
        - kind
        - name
        - slug
        - createdAt
        - updatedAt
    ApiErrorResponse:
      type: object
      properties:
        statusCode:
          type: number
          description: HTTP status code of the error.
          example: 400
        message:
          type: string
          description: >-
            Human-readable description of the error. Validation failures return
            an array of per-field validation errors instead of a single string.
          example: Validation failed
        error:
          type: string
          description: Short name of the HTTP error.
          example: Bad Request
      required:
        - statusCode

````