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

# Create entity group

> Create an entity group in the company. The hierarchy has 10 levels at most.

Version:
v4


## OpenAPI

````yaml openapi-v2.json POST /core/v4/entity-groups
openapi: 3.0.0
info:
  title: Sesame Public API v2
  description: >-
    Public API v2 — additive surface `/public/{context}/v{N}`,
    endpoint-versioned from v4
  version: 1.0.0
servers:
  - url: https://api.sesamehr.com
    description: Production
security:
  - Bearer: []
paths:
  /core/v4/entity-groups:
    post:
      tags:
        - Entity Groups
      summary: Create entity group
      description: >-
        Create an entity group in the company. The hierarchy has 10 levels at
        most.
      operationId: CreateEntityGroup
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/CreateEntityGroupRequest'
      responses:
        '201':
          description: The identifier of the created entity group.
          content:
            application/json:
              schema:
                properties:
                  data:
                    $ref: '#/components/schemas/CreatedEntry'
                type: object
        '401':
          description: Missing or invalid API key
        '403':
          description: API consumer lacks permission over the requested resource
        '422':
          description: Validation error
components:
  schemas:
    CreateEntityGroupRequest:
      required:
        - name
      properties:
        name:
          description: >-
            Unique among the non-deleted groups of the company with the same
            parent, or among the roots without parent.
          type: string
          maxLength: 255
        parentId:
          description: Parent group, at level 9 at most. Without it the group is a root.
          type: string
          format: uuid
          nullable: true
        description:
          type: string
          maxLength: 255
          nullable: true
        groupId:
          description: >-
            Business code, unique among the non-deleted groups of the company.
            An empty string means null.
          type: string
          maxLength: 20
          minLength: 3
          nullable: true
        showGroup:
          description: False when omitted.
          type: boolean
          nullable: true
        costCenter:
          description: False when omitted.
          type: boolean
          nullable: true
      type: object
    CreatedEntry:
      properties:
        id:
          description: Identifier of the created resource.
          type: string
          format: uuid
      type: object
  securitySchemes:
    Bearer:
      type: http
      description: 'Sesame Public API consumer token (Authorization: Bearer <token>)'
      scheme: bearer

````

This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.