Skip to main content

members

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

Overview

Namemembers
TypeResource
Idvercel.project_members.members

Fields

The following fields are returned by SELECT queries:

Paginated list of members for the project.

NameDatatypeDescription
namestringThe name of this user. (example: Jane Doe)
avatarstringID of the file for the Avatar of this member. (example: 123a6c5209bc3778245d011443644c8d27dc2c50)
computed_project_rolestringRole of this user in the project. (ADMIN, PROJECT_DEVELOPER, PROJECT_GUEST, PROJECT_VIEWER) (example: ADMIN) (wire: computedProjectRole)
created_atnumberTimestamp in milliseconds when this member was added. (wire: createdAt)
emailstringThe email of this member. (example: jane.doe@example.com)
rolestringRole of this user in the project. (ADMIN, PROJECT_DEVELOPER, PROJECT_GUEST, PROJECT_VIEWER) (example: ADMIN)
team_rolestringThe role of this user in the team. (BILLING, CONTRIBUTOR, DEVELOPER, MEMBER, OWNER, SECURITY, VIEWER, VIEWER_FOR_PLUS) (example: CONTRIBUTOR) (wire: teamRole)
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
listselectid_or_namelimit, since, until, search, team_id, slugLists all members of a project.
addinsertid_or_name, role, uid, username, emailteam_id, slugAdds a new member to the project.
removedeleteid_or_name, uidteam_id, slugRemove a member from a specific project

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
id_or_namestringThe ID or name of the Project.
uidstringThe user ID of the member.
limitintegerLimit how many project members should be returned
sinceintegerTimestamp in milliseconds to only include members added since then.
slugstringThe Team slug to perform the request on behalf of.
team_idstringThe Team identifier to perform the request on behalf of. (wire: teamId)
untilintegerTimestamp in milliseconds to only include members added until then.

SELECT examples

Lists all members of a project.

SELECT
name,
avatar,
computed_project_role,
created_at,
email,
role,
team_role,
uid,
username
FROM vercel.project_members.members
WHERE id_or_name = '{{ id_or_name }}' -- required
AND limit = '{{ limit }}'
AND since = '{{ since }}'
AND until = '{{ until }}'
AND search = '{{ search }}'
AND team_id = '{{ team_id }}'
AND slug = '{{ slug }}'
;

INSERT examples

Adds a new member to the project.

INSERT INTO vercel.project_members.members (
uid,
username,
email,
role,
id_or_name,
team_id,
slug
)
SELECT
'{{ uid }}' /* required */,
'{{ username }}' /* required */,
'{{ email }}' /* required */,
'{{ role }}' /* required */,
'{{ id_or_name }}',
'{{ team_id }}',
'{{ slug }}'
RETURNING
id
;

DELETE examples

Remove a member from a specific project

DELETE FROM vercel.project_members.members
WHERE id_or_name = '{{ id_or_name }}' --required
AND uid = '{{ uid }}' --required
AND team_id = '{{ team_id }}'
AND slug = '{{ slug }}'
;