Request access to a team
POST
https://api.vercel.com/v1/teams/{teamId}/requestRequest 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.
Request
import { Vercel } from "@vercel/sdk";
const vercel = new Vercel({ bearerToken: "<YOUR_BEARER_TOKEN_HERE>",});
async function run() { const result = await vercel.teams.requestAccessToTeam({ teamId: "team_1a2b3c4d5e6f7g8h9i0j1k2l", requestBody: { joinedFrom: { origin: "github", commitId: "f498d25d8bd654b578716203be73084b31130cd7", repoId: "67753070", repoPath: "jane-doe/example", gitUserId: 103053343, gitUserLogin: "jane-doe", }, }, });
console.log(result);}
run();Response
{ "accessRequestedAt": "123", "bitbucket": { "login": "string" }, "confirmed": "false", "github": { "login": "string" }, "gitlab": { "login": "string" }, "joinedFrom": { "commitId": "example_id", "dsyncConnectedAt": "123", "dsyncUserId": "example_id", "gitUserId": "example_id", "gitUserLogin": "string", "idpUserId": "example_id", "origin": "account-update", "repoId": "example_id", "repoPath": "string", "ssoConnectedAt": "123", "ssoUserId": "example_id" }, "teamName": "Example Name", "teamSlug": "string"}AuthorizationbearerToken
Default authentication mechanism
400One of the provided values in the request body is invalid.
One of the provided values in the request query is invalid.
401Error
403You do not have permission to access this resource.
404The team was not found.
410Error
429Error
503Error