Skip to main content

access_requests

Creates, updates, deletes, gets or lists an access_requests resource.

Overview​

Nameaccess_requests
TypeResource
Idvercel.teams.access_requests

Fields​

The following fields are returned by SELECT queries:

Successfully

NameDatatypeDescription
team_namestringThe name of the team. (example: My Team) (wire: teamName)
access_requested_atnumberTimestamp in milliseconds when the user requested access to the team. (wire: accessRequestedAt)
bitbucketobjectMap of the connected Bitbucket account.
confirmedbooleanCurrent status of the membership. Will be true if confirmed, if pending it'll be false. (false, true)
githubobjectMap of the connected GitHub account.
gitlabobjectMap of the connected GitLab account.
joined_fromobjectA map that describes the origin from where the user joined. (wire: joinedFrom)
team_slugstringThe slug of the team. (example: my-team) (wire: teamSlug)

Methods​

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
getselectuser_id, team_idCheck the status of a join request. It'll respond with a 404 if the request has been declined. If no userId path segment was provided, this endpoint will instead return the status of the authenticated user.
createinsertteam_id, joined_fromRequest access to a team as a member. An owner has to approve the request. Only 100 users can request access to a team at the same time.

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
team_idstring
user_idstring

SELECT examples​

Check the status of a join request. It'll respond with a 404 if the request has been declined. If no userId path segment was provided, this endpoint will instead return the status of the authenticated user.

SELECT
team_name,
access_requested_at,
bitbucket,
confirmed,
github,
gitlab,
joined_from,
team_slug
FROM vercel.teams.access_requests
WHERE user_id = '{{ user_id }}' -- required
AND team_id = '{{ team_id }}' -- required
;

INSERT examples​

Request access to a team as a member. An owner has to approve the request. Only 100 users can request access to a team at the same time.

INSERT INTO vercel.teams.access_requests (
joined_from,
team_id
)
SELECT
'{{ joined_from }}' /* required */,
'{{ team_id }}'
RETURNING
team_name,
access_requested_at,
bitbucket,
confirmed,
github,
gitlab,
joined_from,
team_slug
;