---
updatedAt: 2026-10-07T13:58:45.000Z
agentTools:
  projectIndex: https://developer.intellistack.com/llms.txt
---

# Update user groups

Update groups a user is in

# OpenAPI definition

```json
{
  "components": {
    "schemas": {
      "GeneralError": {
        "properties": {
          "code": {
            "description": "Stable machine-readable error code, used by the FE to branch behavior. Present only for structured role errors. One of: SELF_ROLE_CHANGE_NOT_ALLOWED, ROLE_TARGET_OUTRANKS_ACTOR, ROLE_GRANT_EXCEEDED, ROLE_VERSION_CONFLICT, ROLE_LIMIT_EXCEEDED, ROLE_HAS_ASSIGNED_USERS, SYSTEM_ROLE.",
            "example": "ROLE_GRANT_EXCEEDED",
            "type": "string"
          },
          "detail": {
            "description": "Longer human-readable explanation for display. Present only for structured role errors.",
            "example": "This role includes permissions that exceed your own access level. You can't create, edit, or assign roles with permissions you don't have.",
            "type": "string"
          },
          "errors": {
            "additionalProperties": {
              "items": {
                "type": "string"
              },
              "type": "array"
            },
            "description": "Per-field validation details. Present only for structured role errors that originated as field-level violations (e.g. ROLE_LIMIT_EXCEEDED, ROLE_HAS_ASSIGNED_USERS, SYSTEM_ROLE); maps field name to a list of error codes.",
            "type": "object"
          },
          "message": {
            "description": "Basic error description. For structured role errors this equals the machine-readable `code`.",
            "example": "Something went wrong",
            "type": "string"
          },
          "title": {
            "description": "Short human-readable error headline for display. Present only for structured role errors.",
            "example": "You can't grant those permissions",
            "type": "string"
          },
          "traceId": {
            "description": "Trace ID for tracking back the issue",
            "example": "09f9aa68-4d89-465b-8d6d-41490fff7727",
            "type": "string"
          }
        }
      },
      "GeneralValidationError": {
        "properties": {
          "errors": {
            "additionalProperties": {
              "items": {
                "example": "cannot be blank",
                "type": "string"
              },
              "type": "array"
            },
            "description": "A list of errors",
            "type": "object"
          },
          "message": {
            "description": "Basic error description",
            "example": "The given data failed to pass validation.",
            "type": "string"
          },
          "traceId": {
            "description": "Trace ID for tracking back the issue",
            "example": "09f9aa68-4d89-465b-8d6d-41490fff7727",
            "type": "string"
          }
        }
      },
      "UserGroups": {
        "properties": {
          "groupDetails": {
            "items": {
              "properties": {
                "id": {
                  "format": "uuid",
                  "type": "string"
                },
                "name": {
                  "type": "string"
                },
                "numberOfUsers": {
                  "type": "integer"
                }
              },
              "type": "object"
            },
            "readOnly": true,
            "type": "array"
          },
          "groupIds": {
            "items": {
              "format": "uuid",
              "type": "string"
            },
            "type": "array"
          },
          "id": {
            "format": "uuid",
            "type": "string"
          }
        },
        "type": "object"
      }
    },
    "securitySchemes": {
      "bearerAuth": {
        "bearerFormat": "JWT",
        "scheme": "bearer",
        "type": "http"
      }
    }
  },
  "info": {
    "description": "API documentation for Core Services",
    "title": "User Management API",
    "version": "0.0.0"
  },
  "openapi": "3.0.0",
  "paths": {
    "/v1/users/{id}/groups": {
      "put": {
        "description": "Update groups a user is in",
        "operationId": "updateUserGroups",
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "format": "uuid",
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/UserGroups"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/UserGroups"
                }
              }
            },
            "description": "A list of the users groups"
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/GeneralError"
                }
              }
            },
            "description": "User not found"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/GeneralValidationError"
                }
              }
            },
            "description": "Invalid Data"
          }
        },
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "summary": "Update user groups",
        "tags": [
          "User Groups",
          "Users",
          "Groups"
        ]
      }
    }
  },
  "servers": [
    {
      "description": "US Production Server",
      "url": "https://api-us.streamline.intellistack.ai"
    },
    {
      "description": "Canada Production Server",
      "url": "https://api-ca.streamline.intellistack.ai"
    }
  ]
}
```