---
title: "Add user to group"
method: POST
path: "/group_memberships"
tags: ["Group memberships"]
---

# Add user to group

`POST /group_memberships`

Creates a group membership. Only users with
admin-level permissions will be able to use this API.

## Query parameters

- `fields` string[]

## Request body

- object
  - `user` object, required — The user to add to the group.
    - `id` string, required — The ID of the user to add to the group.
  - `group` object, required — The group to add the user to.
    - `id` string, required — The ID of the group to add the user to.
  - `role` 'member' | 'admin' — The role of the user in the group.
  - `configurable_permissions` object, nullable — Custom configuration for the permissions an admin if a group will receive. This option has no effect on members with a role of `member`. Setting these permissions overwrites the default access levels of an admin. Specifying a value of `null` for this object will disable all configurable permissions. Specifying permissions will set them accordingly, omitted permissions will be enabled by default.

## Response `201`

Returns a new group membership object.

- GroupMembership — Membership is used to signify that a user is part of a group.
  - `id` string — The unique identifier for this group membership.
  - `type` 'group_membership' — The value will always be `group_membership`.
  - `user` object — The user that the membership applies to.
    - `id` string, required — The unique identifier for this user.
    - `type` 'user', required — The value will always be `user`.
    - `name` string — The display name of this user.
    - `login` string, email — The primary email address of this user.
  - `group` object — The group that the membership applies to.
    - `id` string, required — The unique identifier for this object.
    - `type` 'group', required — The value will always be `group`.
    - `name` string — The name of the group.
    - `group_type` 'managed_group' | 'all_users_group' — The type of the group.
  - `role` 'member' | 'admin' — The role of the user in the group.
  - `created_at` string, date-time — The time this membership was created.
  - `modified_at` string, date-time — The time this membership was last modified.

## Other responses

- `403` — Returns an error when the user cannot be added to a group. * `forbidden_by_policy`: Adding a user to a group is forbidden due to information barrier restrictions.
- `default` — An unexpected client error.

---

[API](https://skmtc.net/box/apis/platform-api.md) · [All operations](https://skmtc.net/box/apis/platform-api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/box/platform-api/versions/ba8f087e1a4d/schema)
