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

# Create employee group

> Creates a new employee group for the given organization. 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.




## OpenAPI

````yaml /openapi/findity-admin-api.json post /organizations/{organizationId}/employeegroups
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:
    post:
      tags:
        - Employee Groups
      summary: Create employee group
      description: >
        Creates a new employee group for the given organization. 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.
      operationId: adminCreateEmployeeGroup
      parameters:
        - name: organizationId
          in: path
          required: true
          description: |
            String. The organization's internal ID (32-character hex string).
          schema:
            type: string
            example: 11adfe2a080040e3892ffb89c21ec44e
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/AdminApiEmployeeGroupPostRequest'
            example:
              name: Sales Team
              isDefault: false
      responses:
        '201':
          description: Created — returns the newly created 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.
                Id specified in body:
                  value:
                    result: error
                    code: INVALID_ID
                    description: >-
                      Id should not be specified when creating a new employee
                      group
                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
components:
  schemas:
    AdminApiEmployeeGroupPostRequest:
      type: object
      description: >
        The `id` property must not be supplied — it is generated by the server
        and returned in the response.
      required:
        - name
      properties:
        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. Defaults to `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
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer

````