User Management

Collaborators are the users that make up a Labelbox organization. You should read our documentation on collaborators before continuing on here.

List Collaborator (User) Projects

The projects that a user has access to are determined by the projects attribute of the User object.

query getUserProjects {
users( where: {email:"<USER-EMAIL>"}) {
email
id
projects {
name
id
}
}
}

Getting Available Roles

In order to add a user to your organization, you’ll need to decide which role they should receive. To list all of the available roles and their corresponding ID you can run the following query:

query GetAvailableRoles {
roles {
name
id
}
}

Adding a User to your organization

// This will add this user to your organization 
// as an Admin. They will have full access to all current and
// future projects


mutation MakeNewUserAdmin {
addMembersToOrganization(
data: {
emails: ["EMAIL_HERE"],
orgRoleId: "cjlvi91a41aab0714677xp87h",
projectRoles: []
}
)
}

// This will add a user to your organization as a project based
// user. They will only have access to a single project and will
// only be able to label data (role == Labeler)
mutation AddNewProjectBasedUser {
addMembersToOrganization(
data: {
emails: ["EMAIL_HERE"],
// Id of the 'None' role which signifies project-based
orgRoleId: "cjmb6xy80f5vz0780u3mw2rj4",
projectRoles: [{
roleId: "cjlvi914y1aa20714372uvzjv",
projectId: "PROJECT_ID"
}]
}
)
}

Add Collaborator (User) to Project

To grant a project based user that is already in your organization access to a project, you’ll need to get the ID of both the project and of the role as well as the user’s email.

mutation AddUserToProject {
addUserToProject(
data: {
email: "<USER_EMAIL>",
projectId: "<PROJECT_ID>",
roleId: "<ROLE-ID>"
}
) {
user { email }
project { name }
role { name }
}
}


How did we do?