---
title: "Add User to Group"
url: "https://public-api-docs.cipherscale.com/apis/cipherscale-api-1/versions/fef69080-6094-4620-8bf0-16fd2de7b598/operations/UsersController_addGroup"
---

> Full API specification: https://public-api-docs.cipherscale.com/apis/cipherscale-api-1/versions/fef69080-6094-4620-8bf0-16fd2de7b598.md

# Add User to Group

`POST` `/tenants/users/{id}/groups`

Operation ID: `UsersController_addGroup`

Associates a user with a specific group, which may grant them additional roles and permissions based on the group's configuration. Group membership can affect access policies and resource availability.

## Path parameters

- `id` (string, required)

## Request body (required)

Content types: `application/json`

## Responses

- `201`
- `401` - Unauthorized - Invalid or missing authentication token
- `403` - Forbidden - Insufficient permissions to perform this operation.
- `404` - User not found with the provided ID

## OpenAPI definition

```yaml
openapi: 3.0.0
info:
  title: Cipherscale API
  version: "1.0"
servers:
  - url: https://public-api.cipherscale.com/qa
    description: Cipherscale Public API Server
paths:
  /tenants/users/{id}/groups:
    post:
      operationId: UsersController_addGroup
      summary: Add User to Group
      description: Associates a user with a specific group, which may grant them
        additional roles and permissions based on the group's configuration.
        Group membership can affect access policies and resource availability.
      parameters:
        - name: id
          required: true
          in: path
          schema:
            type: string
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                groupId:
                  type: string
                  format: uuid
                  description: The unique identifier of the group to add the user to
              required:
                - groupId
      responses:
        "201":
          description: ""
        "401":
          description: Unauthorized - Invalid or missing authentication token
        "403":
          description: Forbidden - Insufficient permissions to perform this operation.
        "404":
          description: User not found with the provided ID
      tags:
        - Users
      security:
        - ApiKeyAuth: []
security:
  - ApiKeyAuth: []
components:
  securitySchemes:
    ApiKeyAuth:
      type: apiKey
      in: header
      name: apikey
```
