---
title: "Assign Role Group Membership"
method: POST
path: "/cloud/v2/groups/{group_id}/memberships/{membership_id}:assignRole"
tags: ["Groups"]
---

# Assign Role Group Membership

`POST /cloud/v2/groups/{group_id}/memberships/{membership_id}:assignRole`

## Request

- Base URL: `https://apis.roblox.com`
- URL: `https://apis.roblox.com/cloud/v2/groups/{group_id}/memberships/{membership_id}:assignRole`
- Auth: one of:
  - API key in header `x-api-key`
  - OAuth 2
    - Authorization code: `https://apis.roblox.com/oauth/v1/authorize`
    - Token URL: `https://apis.roblox.com/oauth/v1/token` scopes: `group:write`

Assigns a specific role to a user within a group. If the user already
holds the specified role, no action is taken.

## Path parameters

- `group_id` string, required
- `membership_id` string, required

## Request body

- AssignRoleGroupMembershipRequest: Assigns a role to the specified group membership.
  - `role` string, required: The resource path of the role to assign. Format: `groups/{group_id}/roles/{group_role_id}`

## Response `200`

OK

- GroupMembership: A membership to a group. A user ID can be used in place of a membership ID.
  - `path` string: The resource path of the group membership. Format: `groups/{group_id}/memberships/{group_membership_id}`
  - `createTime` string, date-time: The timestamp when the group membership was created.
  - `updateTime` string, date-time: The timestamp when the group membership was last updated.
  - `user` string: The resource path of a member of the group.
  - `role` string: The resource path of the member's highest-ranked role. When the member holds multiple roles, this reflects only the highest-ranked one. Prefer using the `roles` field, which always contains the complete set of assigned roles.
  - `roles` string[]: The resource paths of all roles assigned to the group member. This is the recommended field for reading a member's roles, as it always contains the complete set of roles held by the member.

## Changes

- **2026-10-14** `5dcfa33df56a`: 1 info
  - the security scope `group:write` was added to the endpoint's security scheme `roblox-oauth2`

[Operation history](https://skmtc.dev/roblox/apis/roblox-api/changes/cloud/v2/groups/:group_id/memberships/:membership_id:assignRole/post.md)

---

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