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

# Update employee group

> Replaces an existing employee group's `name` and `isDefault` with the values provided in the request body. This is a full replace, not a partial update — both properties are overwritten. Setting `isDefault` to `true` automatically unsets the organization's previous default group, if any. Returns 403 when the authenticated user is not an administrator of the organization. Returns 404 when the employee group does not exist, or belongs to a different organization.




## OpenAPI

````yaml /openapi/findity-admin-api.json put /organizations/{organizationId}/employeegroups/{employeeGroupId}
openapi: 3.1.0
info:
  title: Findity Admin API
  description: Findity Admin API
  version: 1.0.0
servers:
  - url: https://stage-api.findity.com/api/v1/admin
  - url: https://api.findity.com/api/v1/admin
security:
  - bearerAuth: []
paths:
  /organizations/{organizationId}/employeegroups/{employeeGroupId}:
    put:
      tags:
        - Employee Groups
      summary: Update employee group
      description: >
        Replaces an existing employee group's `name` and `isDefault` with the
        values provided in the request body. This is a full replace, not a
        partial update — both properties are overwritten. Setting `isDefault` to
        `true` automatically unsets the organization's previous default group,
        if any. Returns 403 when the authenticated user is not an administrator
        of the organization. Returns 404 when the employee group does not exist,
        or belongs to a different organization.
      operationId: adminUpdateEmployeeGroup
      parameters:
        - name: organizationId
          in: path
          required: true
          description: |
            String. The organization's internal ID (32-character hex string).
          schema:
            type: string
            example: 11adfe2a080040e3892ffb89c21ec44e
        - name: employeeGroupId
          in: path
          required: true
          description: >
            String (32-character hex string). The internal ID of the employee
            group to update, as returned in the `id` field of the list, create,
            and update responses. Must match the `id` property in the request
            body.
          schema:
            type: string
            example: 3f2a9c1b8e7d4a6f9b0c1d2e3f4a5b6c
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/AdminApiEmployeeGroupPutRequest'
            example:
              id: 3f2a9c1b8e7d4a6f9b0c1d2e3f4a5b6c
              name: Sales Team Updated
              isDefault: true
      responses:
        '200':
          description: OK — returns the updated employee group
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/AdminApiEmployeeGroup'
              example:
                id: 3f2a9c1b8e7d4a6f9b0c1d2e3f4a5b6c
                name: Sales Team
                isDefault: false
        '400':
          description: Bad request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/400Error'
              examples:
                Invalid JSON body:
                  value:
                    result: error
                    code: INVALID_JSON_BODY
                    description: Could not parse JSON content.
                Missing id in body:
                  value:
                    result: error
                    code: INVALID_ID
                    description: Employee group id must be specified in the request body
                Id in body does not match id in URL:
                  value:
                    result: error
                    code: INVALID_ID
                    description: Employee group id in body does not match id in URL
                Missing or blank name:
                  value:
                    result: error
                    code: MISSING_PARAMETER
                    description: Employee group name must be specified
                Name too long:
                  value:
                    result: error
                    code: FIELD_EXCEEDS_MAX_LENGTH
                    description: name exceeds maximum length of 255 characters.
                Name already used in the organization:
                  value:
                    result: error
                    code: EMPLOYEE_GROUP_NAME_DUPLICATE
                    description: An employee group with this name already exists.
        '403':
          description: >-
            Forbidden — the authenticated user is not an administrator of the
            organization
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/403Error'
              examples:
                Permission denied:
                  value:
                    result: error
                    description: Permission denied
        '404':
          description: >-
            Not found — employee group does not exist, or belongs to a different
            organization
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/404Error'
              examples:
                Employee group not found:
                  value:
                    result: error
                    code: EMPLOYEE_GROUP_NOT_FOUND
                    description: Employee group not found
components:
  schemas:
    AdminApiEmployeeGroupPutRequest:
      type: object
      description: >
        This is a full replace, not a partial update: both `name` and
        `isDefault` are overwritten with the values provided in the request
        body.
      required:
        - id
        - name
      properties:
        id:
          type: string
          description: >-
            The employee group's ID. Must match the `employeeGroupId` path
            parameter.
        name:
          type: string
          description: >
            Display name of the employee group. Must not be blank, is trimmed,
            and must be unique within the organization (case-insensitive).
          maxLength: 255
        isDefault:
          type: boolean
          description: >
            Whether this group should become the organization's default group.
            When the organization uses employee groups, users newly added to the
            organization are automatically assigned to the default group.
            Existing users are not moved to the group when it is set as default.
            Setting this to `true` automatically unsets the organization's
            previous default group, if any. Treated as `false` when omitted.
          nullable: true
    AdminApiEmployeeGroup:
      type: object
      required:
        - id
        - name
        - isDefault
      properties:
        id:
          type: string
          description: Unique internal identifier of the employee group.
        name:
          type: string
          description: Display name of the employee group.
        isDefault:
          type: boolean
          description: >
            Whether this is the organization's default employee group. When the
            organization uses employee groups, users newly added to the
            organization are automatically assigned to the default group, when
            one is set. Existing users are not moved to the group when it is set
            as default. At most one group per organization can be the default at
            a time.
    400Error:
      type: object
      properties:
        result:
          type: string
        code:
          type: string
        description:
          type: string
    403Error:
      type: object
      properties:
        result:
          type: string
        description:
          type: string
      example:
        result: error
        description: Not allowed
    404Error:
      type: object
      properties:
        result:
          type: string
        code:
          type: string
        description:
          type: string
      example:
        result: error
        code: ORGANIZATION_NOT_FOUND
        description: 'Failed to get organization for id: {orgId}'
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer

````