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

# Add Users to Group

> Add multiple users to a group in a single request. This operation is idempotent - duplicate memberships are silently ignored.

**Behavior:**
- Maximum 100 users per request
- Duplicate user IDs in the request are handled gracefully
- Users already in the group are silently ignored
- All user IDs must belong to the same account as the group
- All user IDs must exist (validated before any changes)
- If any user validation fails, the entire operation is rejected (no partial updates)

**Permissions:** Requires `group_update` permission



## OpenAPI

````yaml /api/openapi.yaml put /v1/groups/{groupId}/users
openapi: 3.0.3
info:
  title: Documentation Service API
  description: API documentation for Documentation Service
  version: 1.0.0
servers:
  - url: https://api.us.lexful.app
    description: US pod
security:
  - bearerAuth: []
    accountId: []
paths:
  /v1/groups/{groupId}/users:
    put:
      tags:
        - Groups
      summary: Add Users to Group
      description: >-
        Add multiple users to a group in a single request. This operation is
        idempotent - duplicate memberships are silently ignored.


        **Behavior:**

        - Maximum 100 users per request

        - Duplicate user IDs in the request are handled gracefully

        - Users already in the group are silently ignored

        - All user IDs must belong to the same account as the group

        - All user IDs must exist (validated before any changes)

        - If any user validation fails, the entire operation is rejected (no
        partial updates)


        **Permissions:** Requires `group_update` permission
      parameters:
        - schema:
            type: string
            format: uuid
          in: path
          name: groupId
          required: true
          description: Group ID
      requestBody:
        $ref: '#/components/requestBodies/put_v1_groups__groupId__users_request'
      responses:
        '201':
          $ref: '#/components/responses/DeleteAllowedIPResponse'
        '400':
          $ref: '#/components/responses/BadRequestResponse'
        '403':
          $ref: '#/components/responses/ForbiddenResponse'
        '404':
          $ref: '#/components/responses/NotFoundResponse'
        '500':
          $ref: '#/components/responses/InternalServerErrorResponse'
components:
  requestBodies:
    put_v1_groups__groupId__users_request:
      required: true
      content:
        application/json:
          schema:
            $ref: >-
              #/components/schemas/put_v1_groups__groupId__users_request_application_json
          example:
            - 7c9e6679-7425-40de-944b-e07fc1f90ae7
            - f47ac10b-58cc-4372-a567-0e02b2c3d479
            - 6ba7b810-9dad-11d1-80b4-00c04fd430c8
      description: Array of user IDs to add to the group (max 100 per request)
  responses:
    DeleteAllowedIPResponse:
      description: Allowed IP deleted successfully
    BadRequestResponse:
      description: Bad request - validation error
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorResponse'
    ForbiddenResponse:
      description: Forbidden - insufficient permissions
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorResponse'
    NotFoundResponse:
      description: Resource not found
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorResponse'
    InternalServerErrorResponse:
      description: Internal server error
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorResponse'
  schemas:
    put_v1_groups__groupId__users_request_application_json:
      type: array
      items:
        type: string
        format: uuid
      minItems: 1
      maxItems: 100
      description: Array of user IDs to add to the group (max 100 per request)
    ErrorResponse:
      description: Bad request - validation error
      type: object
      properties:
        status:
          type: number
          description: HTTP status code
        message:
          type: string
          description: Error message
        error_id:
          type: string
          description: Unique error identifier
        error_code:
          type: string
          description: Error code
        developer_message:
          type: string
          description: Additional details for developers
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      bearerFormat: JWT
      description: Bearer token
    accountId:
      type: apiKey
      in: header
      name: X-Account-ID
      description: Account ID

````