Classic APIs
ClassicOrganizationsApi
giveRoleToOrgMember

giveRoleToOrgMember

Gives a specifc role to an organization member.

Parameters

NameTypeDescription
orgIdIdentifierThe ID of the organization to give a user a role in.
userIdIdentifierThe ID of the user to give a role to.
roleIdIdentifierThe ID of the role to be given.

Example

const { data: success } = await ClassicOrganizationsApi.giveRoleToOrgMember({
  orgId: "4244556007738484576",
  userId: 45348281,
  roleId: "914257001913009232",
}); 

Example Data

{ success: true } 

Endpoint

POST /v1/organizations/{orgId}/users/{userId}/roles/{roleId}