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

# Update entity group

> Replace every field of an entity group of the company. All keys are required; send null to empty parentId (the group becomes a root), description or groupId. The hierarchy has 10 levels at most.

Version:
v4


## OpenAPI

````yaml openapi-v2.json PUT /core/v4/entity-groups/{entityGroupId}
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/{entityGroupId}:
    put:
      tags:
        - Entity Groups
      summary: Update entity group
      description: >-
        Replace every field of an entity group of the company. All keys are
        required; send null to empty parentId (the group becomes a root),
        description or groupId. The hierarchy has 10 levels at most.
      operationId: UpdateEntityGroup
      parameters:
        - name: entityGroupId
          in: path
          required: true
          schema:
            type: string
            format: uuid
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/UpdateEntityGroupRequest'
      responses:
        '204':
          description: The entity group was updated.
        '401':
          description: Missing or invalid API key
        '403':
          description: API consumer lacks permission over the requested resource
        '422':
          description: Validation error
components:
  schemas:
    UpdateEntityGroupRequest:
      required:
        - name
        - parentId
        - description
        - groupId
        - showGroup
        - costCenter
      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: >-
            New parent group. Null makes the group a root. It cannot be the
            group itself or one of its descendants, and the group with its whole
            subtree must stay within 10 levels.
          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:
          type: boolean
        costCenter:
          type: boolean
      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.