Skip to main content
Only users with the ADMINISTRATOR scope in the current context can assign user contexts to hierarchy levels. Make sure your API token grants administrator privileges. See Understanding Scopes for more information.
To assign a user context to a specific hierarchy level, use the assignUserContextToLevel mutation. Access policy:
  • The API user context must have permission to manage user assignments.
  • The specified userContextUuid must exist and be accessible.
  • The specified hierarchyLevelId must exist and be accessible.
The mutation accepts the following arguments:
ArgumentTypeDescriptionDefault
userContextUuidIDOptional. User context UUID to assign. If omitted, the current API user context is used.
hierarchyLevelIdIDRequired. The unique identifier of the hierarchy level to assign the user context to.
This operation creates a relationship between a user context and a hierarchy level, which affects the user’s access permissions and organizational structure visibility.
mutation assignUserContextToLevel {
  assignUserContextToLevel(
    userContextUuid: "5acfc440-88e0-4286-b089-c0f03575ed9a"
    hierarchyLevelId: 1
  ) {
    errors
    response
  }
}