---
title: "Add normal user to group(s)"
method: POST
path: "/users/{user_id}/relationships/user-groups"
tags: ["Users"]
---

# Add normal user to group(s)

`POST /users/{user_id}/relationships/user-groups`

## Request

- Base URL: `https://api.kontainer.com/jsonapi/v2`
- URL: `https://api.kontainer.com/jsonapi/v2/users/{user_id}/relationships/user-groups`
- Auth: HTTP bearer
- TypeScript: <https://skmtc.dev/kontainer/apis/kontainer-api-documentation/docs/users/:user_id/relationships/user-groups/post.ts> (a function with typed inputs; its response is checked against the schema)

## Adds User to groups
Endpoint for associating a normal user to groups. Please note the exemplary request body associates a user with two groups.

## Path parameters

- `user_id` string, required

## Request body

- object
  - `data` object[], required
    - `type` string, required: Resource Type
    - `id` string, required: Group Id

## Response `204`

No content

## Other responses

- `401`: Unauthorized

---

[API](https://skmtc.dev/kontainer/apis/kontainer-api-documentation.md) - [All operations](https://skmtc.dev/kontainer/apis/kontainer-api-documentation/llms.txt) - [OpenAPI document](https://skmtc.dev/kontainer/apis/kontainer-api-documentation/revisions/b80a5167e09a?raw)
