---
title: "Put all user groups"
method: PUT
path: "/api/v1/layout/userGroups"
tags: ["UserGroups - Declarative APIs"]
---

# Put all user groups

`PUT /api/v1/layout/userGroups`

## Request

- Base URL: `https://www.gooddata.ai`
- URL: `https://www.gooddata.ai/api/v1/layout/userGroups`
- Auth: none declared

Define all user groups with their parents eventually.

## Request body

- DeclarativeUserGroups: Declarative form of userGroups and its properties.
  - `userGroups` DeclarativeUserGroup[], required
    - `id` string, required: UserGroup identifier.
    - `name` string: Name of UserGroup
    - `parents` DeclarativeUserGroupIdentifier[]
      - `id` string, required: Identifier of the user group.
      - `type` 'userGroup', required: A type.
    - `permissions` DeclarativeUserGroupPermission[]
      - `assignee` AssigneeIdentifier, required: Identifier of a user or user-group.
        - `id` string, required: Identifier of the assignee.
        - `type` 'user' | 'userGroup', required
      - `name` 'SEE', required: Permission name.

## Response `204`

Defined all user groups.

---

[API](https://skmtc.dev/gooddata/apis/gooddata-cn-oapi-all-api.md) - [All operations](https://skmtc.dev/gooddata/apis/gooddata-cn-oapi-all-api/llms.txt) - [OpenAPI document](https://skmtc.dev/gooddata/apis/gooddata-cn-oapi-all-api/revisions/c728ef303bfb?raw)
