Groups

Unassign Role Group Membership

Changed on

Unassigns a specific role from a user within a group. If the user does not hold the specified role, no action is taken.

post/cloud/v2/groups/{group_id}/memberships/{membership_id}:unassignRole

Request

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

Path parameters

group_idstring required

The group ID.

membership_idstring required

The membership ID.

Request body

rolestring required

The resource path of the role to unassign.

Format: groups/{group_id}/roles/{group_role_id}

Example request

{
  "role": "groups/123/roles/456"
}

Response

OK

pathstring

The resource path of the group membership.

Format: groups/{group_id}/memberships/{group_membership_id}

createTimestring date-time

The timestamp when the group membership was created.

updateTimestring date-time

The timestamp when the group membership was last updated.

userstring

The resource path of a member of the group.

rolestring

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.

rolesstring[]

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.

Example response

{
  "path": "groups/123/memberships/123",
  "createTime": "2023-07-05T12:34:56Z",
  "updateTime": "2023-07-05T12:34:56Z",
  "user": "users/21557",
  "role": "groups/7/roles/99513316"
}

Changes