members
Creates, updates, deletes, gets or lists a members resource.
Overview​
| Name | members |
| Type | Resource |
| Id | vercel.teams.members |
Fields​
The following fields are returned by SELECT queries:
- list
| Name | Datatype | Description |
|---|---|---|
name | string | The name of this user. (example: Jane Doe) |
access_requested_at | number | Timestamp in milliseconds for when this team member was accepted by an owner. (wire: accessRequestedAt) |
avatar | string | ID of the file for the Avatar of this member. (example: 123a6c5209bc3778245d011443644c8d27dc2c50) |
bitbucket | object | Information about the Bitbucket account of this user. |
confirmed | boolean | Boolean that indicates if this member was confirmed by an owner. (false, true) |
created_at | number | Timestamp in milliseconds when this member was added. (wire: createdAt) |
email | string | The email of this member. (example: jane.doe@example.com) |
github | object | Information about the GitHub account for this user. |
gitlab | object | Information about the GitLab account of this user. |
is_enterprise_managed | boolean | Indicates whether the user is managed by an enterprise. (false, true) (wire: isEnterpriseManaged) |
joined_from | object | Map with information about the members origin if they joined by requesting access. (wire: joinedFrom) |
projects | array | Array of project memberships |
role | string | Role of this user in the team. (BILLING, CONTRIBUTOR, DEVELOPER, MEMBER, OWNER, SECURITY, VIEWER, VIEWER_FOR_PLUS) (example: OWNER) |
uid | string | The ID of this user. (example: zTuNVUXEAvvnNN3IaqinkyMw) |
username | string | The unique username of this user. (example: jane-doe) |
Methods​
The following methods are available for this resource:
| Name | Accessible by | Required Params | Optional Params | Description |
|---|---|---|---|---|
list | select | team_id | limit, since, until, search, role, exclude_project, eligible_members_for_project_id, slug | Get a paginated list of team members for the provided team. |
invite | insert | team_id | slug | 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. |
update | update | uid, team_id | 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. | |
remove | delete | uid, team_id | new_default_team_id | 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_invite | delete | invite_id, team_id | Delete an active Team invite code. | |
join | exec | team_id | Join 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.
| Name | Datatype | Description |
|---|---|---|
invite_id | string | The Team invite code ID. |
team_id | string | |
uid | string | The user ID of the member. |
eligible_members_for_project_id | string | Include team members who are eligible to be members of the specified project. (wire: eligibleMembersForProjectId) |
exclude_project | string | Exclude members who belong to the specified project. (wire: excludeProject) |
limit | number | Limit how many teams should be returned |
new_default_team_id | string | The ID of the team to set as the new default team for the Northstar user. (wire: newDefaultTeamId) |
role | string | Only return members with the specified team role. |
search | string | Search team members by their name, username, and email. |
since | number | Timestamp in milliseconds to only include members added since then. |
slug | string | The Team slug to perform the request on behalf of. |
until | number | Timestamp in milliseconds to only include members added until then. |
SELECT examples​
- list
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
- Manifest
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
;
# Description fields are for documentation purposes
- name: members
props:
- name: team_id
value: "{{ team_id }}"
description: Required parameter for the members resource.
- name: slug
value: "{{ slug }}"
description: The Team slug to perform the request on behalf of.
description: The Team slug to perform the request on behalf of.
UPDATE examples​
- update
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
- delete_invite
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 }}'
;
Delete an active Team invite code.
DELETE FROM vercel.teams.members
WHERE invite_id = '{{ invite_id }}' --required
AND team_id = '{{ team_id }}' --required
;
Lifecycle Methods​
EXEC variables use wire (API) names.
- join
Join a team with a provided invite code or team ID.
EXEC vercel.teams.members.join
@team_id='{{ team_id }}' --required
@@json=
'{
"inviteCode": "{{ inviteCode }}"
}'
;