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)
access_requested_atnumberTimestamp in milliseconds for when this team member was accepted by an owner. (wire: accessRequestedAt)
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. (false, true)
created_atnumberTimestamp in milliseconds when this member was added. (wire: createdAt)
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.
is_enterprise_managedbooleanIndicates whether the user is managed by an enterprise. (false, true) (wire: isEnterpriseManaged)
joined_fromobjectMap with information about the members origin if they joined by requesting access. (wire: joinedFrom)
projectsarrayArray of project memberships
rolestringRole of this user in the team. (BILLING, CONTRIBUTOR, DEVELOPER, MEMBER, OWNER, SECURITY, VIEWER, VIEWER_FOR_PLUS) (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
listselectteam_idlimit, since, until, search, role, exclude_project, eligible_members_for_project_id, slugGet a paginated list of team members for the provided team.
inviteinsertteam_idslugInvite 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 to be invited must be specified by email.
updateupdateuid, team_idUpdate 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.
removedeleteuid, team_idnew_default_team_idRemove a Team Member from the Team, or dismiss a user that requested access, or leave a team. Directory Sync members can be removed when their directory email is absent or does not match the user's primary or verified secondary emails.
delete_invitedeleteinvite_id, team_idDelete an active Team invite code.
joinexecteam_idJoin a team with a provided invite code or team ID.

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
invite_idstringThe Team invite code ID.
team_idstring
uidstringThe user ID of the member.
eligible_members_for_project_idstringInclude team members who are eligible to be members of the specified project. (wire: eligibleMembersForProjectId)
exclude_projectstringExclude members who belong to the specified project. (wire: excludeProject)
limitnumberLimit how many teams should be returned
new_default_team_idstringThe ID of the team to set as the new default team for the Northstar user. (wire: newDefaultTeamId)
rolestringOnly return members with the specified team role.
sincenumberTimestamp in milliseconds to only include members added since then.
slugstringThe Team slug to perform the request on behalf of.
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,
access_requested_at,
avatar,
bitbucket,
confirmed,
created_at,
email,
github,
gitlab,
is_enterprise_managed,
joined_from,
projects,
role,
uid,
username
FROM vercel.teams.members
WHERE team_id = '{{ team_id }}' -- required
AND limit = '{{ limit }}'
AND since = '{{ since }}'
AND until = '{{ until }}'
AND search = '{{ search }}'
AND role = '{{ role }}'
AND exclude_project = '{{ exclude_project }}'
AND eligible_members_for_project_id = '{{ eligible_members_for_project_id }}'
AND slug = '{{ slug }}'
;

INSERT examples​

Invite 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 to be invited must be specified by email.

INSERT INTO vercel.teams.members (
team_id,
slug
)
SELECT
'{{ team_id }}',
'{{ slug }}'
RETURNING
email,
role,
team_permissions,
team_roles,
uid,
username
;

UPDATE examples​

Update 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.

UPDATE vercel.teams.members
SET
confirmed = {{ confirmed }},
role = '{{ role }}',
team_permissions = '{{ team_permissions }}',
projects = '{{ projects }}',
joined_from = '{{ joined_from }}'
WHERE
uid = '{{ uid }}' --required
AND team_id = '{{ team_id }}' --required
RETURNING
id;

DELETE examples​

Remove a Team Member from the Team, or dismiss a user that requested access, or leave a team. Directory Sync members can be removed when their directory email is absent or does not match the user's primary or verified secondary emails.

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

Lifecycle Methods​

EXEC variables use wire (API) names.

Join a team with a provided invite code or team ID.

EXEC vercel.teams.members.join
@team_id='{{ team_id }}' --required
@@json=
'{
"inviteCode": "{{ inviteCode }}"
}'
;