Skip to main content

members

Creates, updates, deletes, gets or lists a members resource.

Overview

Namemembers
TypeResource
Idvercel.teams.members

Fields

The following fields are returned by SELECT queries:

NameDatatypeDescription
namestringThe name of this user. (example: Jane Doe)
accessRequestedAtnumberTimestamp in milliseconds for when this team member was accepted by an owner.
avatarstringID of the file for the Avatar of this member. (example: 123a6c5209bc3778245d011443644c8d27dc2c50)
bitbucketobjectInformation about the Bitbucket account of this user.
confirmedbooleanBoolean that indicates if this member was confirmed by an owner.
createdAtnumberTimestamp in milliseconds when this member was added.
emailstringThe email of this member. (example: jane.doe@example.com)
githubobjectInformation about the GitHub account for this user.
gitlabobjectInformation about the GitLab account of this user.
joinedFromobjectMap with information about the members origin if they joined by requesting access.
projectsarrayArray of project memberships
rolestringRole of this user in the team. (example: OWNER)
uidstringThe ID of this user. (example: zTuNVUXEAvvnNN3IaqinkyMw)
usernamestringThe unique username of this user. (example: jane-doe)

Methods

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
get_team_membersselectteamIdlimit, since, until, search, role, excludeProject, eligibleMembersForProjectIdGet a paginated list of team members for the provided team.
remove_team_memberdeleteteamId, uidnewDefaultTeamIdRemove a Team Member from the Team, or dismiss a user that requested access, or leave a team.
_get_team_membersexecteamIdlimit, since, until, search, role, excludeProject, eligibleMembersForProjectIdGet a paginated list of team members for the provided team.
invite_user_to_teamexecteamIdInvite a user to join the team specified in the URL. The authenticated user needs to be an OWNER in order to successfully invoke this endpoint. The user can be specified with an email or an ID. If both email and ID are provided, ID will take priority.
update_team_memberexecteamId, uidUpdate the membership of a Team Member on the Team specified by teamId, such as changing the role of the member, or confirming a request to join the Team for an unconfirmed member. The authenticated user must be an OWNER of the Team.

Parameters

Parameters can be passed in the WHERE clause of a query. Check the Methods section to see which parameters are required or optional for each operation.

NameDatatypeDescription
teamIdstringID of the Team.
uidstringThe ID of the member.
eligibleMembersForProjectIdstringInclude team members who are eligible to be members of the specified project.
excludeProjectstringExclude members who belong to the specified project.
limitnumberLimit how many teams should be returned
newDefaultTeamIdstringThe ID of the team to set as the new default team for the Northstar user.
rolestringOnly return members with the specified team role.
sincenumberTimestamp in milliseconds to only include members added since then.
untilnumberTimestamp in milliseconds to only include members added until then.

SELECT examples

Get a paginated list of team members for the provided team.

SELECT
name,
accessRequestedAt,
avatar,
bitbucket,
confirmed,
createdAt,
email,
github,
gitlab,
joinedFrom,
projects,
role,
uid,
username
FROM vercel.teams.members
WHERE teamId = '{{ teamId }}' -- required
AND limit = '{{ limit }}'
AND since = '{{ since }}'
AND until = '{{ until }}'
AND search = '{{ search }}'
AND role = '{{ role }}'
AND excludeProject = '{{ excludeProject }}'
AND eligibleMembersForProjectId = '{{ eligibleMembersForProjectId }}'
;

DELETE examples

Remove a Team Member from the Team, or dismiss a user that requested access, or leave a team.

DELETE FROM vercel.teams.members
WHERE teamId = '{{ teamId }}' --required
AND uid = '{{ uid }}' --required
AND newDefaultTeamId = '{{ newDefaultTeamId }}'
;

Lifecycle Methods

Get a paginated list of team members for the provided team.

EXEC vercel.teams.members._get_team_members 
@teamId='{{ teamId }}' --required,
@limit='{{ limit }}',
@since='{{ since }}',
@until='{{ until }}',
@search='{{ search }}',
@role='{{ role }}',
@excludeProject='{{ excludeProject }}',
@eligibleMembersForProjectId='{{ eligibleMembersForProjectId }}'
;