Create a new Team under your account. You need to send a POST request with the desired Team slug, and optionally the Team name.
Optional params
fetch-request
1await fetch("https://api.vercel.com/v1/teams", {2 "body": {3 "slug": "a-random-team",4 "attribution": {5 "sessionReferrer": "SOME_STRING_VALUE",6 "landingPage": "SOME_STRING_VALUE",7 "pageBeforeConversionPage": "SOME_STRING_VALUE",8 "utm": {9 "utmSource": "SOME_STRING_VALUE",10 "utmMedium": "SOME_STRING_VALUE",11 "utmCampaign": "SOME_STRING_VALUE",12 "utmTerm": "SOME_STRING_VALUE"13 }14 },15 "name": "A Random Team"16 },17 "headers": {18 "Authorization": "Bearer <TOKEN>"19 },20 "method": "post"21})
Body Parameter | Description | ||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
slug | string requiredThe desired slug for the Team <= 48 characters Example: "a-random-team" | ||||||||||||||||
attribution | object Attribution information for the session or current page
| ||||||||||||||||
name | string The desired name for the Team. It will be generated from the provided slug if nothing is provided <= 256 characters Example: "A Random Team" |
The team was created successfully
billingobjectRequired IMPORTANT: If extending Billing, particularly with optional fields, make sure you also update sync-orb-subscription-to-owner.ts
to handle the items when the object is recreated.idstringRequired Id of the created team Example:
team_nLlpyC6RE1qxqglFKbrMxlud
slugstringRequired
Code | Description |
---|---|
200 | The team was created successfully |
400 |
|
401 | |
403 | You do not have permission to access this resource. |
Optional params
fetch-request
1await fetch("https://api.vercel.com/v1/teams", {2 "body": {3 "slug": "a-random-team",4 "attribution": {5 "sessionReferrer": "SOME_STRING_VALUE",6 "landingPage": "SOME_STRING_VALUE",7 "pageBeforeConversionPage": "SOME_STRING_VALUE",8 "utm": {9 "utmSource": "SOME_STRING_VALUE",10 "utmMedium": "SOME_STRING_VALUE",11 "utmCampaign": "SOME_STRING_VALUE",12 "utmTerm": "SOME_STRING_VALUE"13 }14 },15 "name": "A Random Team"16 },17 "headers": {18 "Authorization": "Bearer <TOKEN>"19 },20 "method": "post"21})
Delete a team under your account. You need to send a DELETE
request with the desired team id
. An optional array of reasons for deletion may also be sent.
Optional params
fetch-request
1await fetch("https://api.vercel.com/v1/teams/SOME_STRING_VALUE?newDefaultTeamId=team_LLHUOMOoDlqOp8wPE4kFo9pE&slug=SOME_STRING_VALUE", {2 "body": {3 "reasons": [4 {5 "slug": "SOME_STRING_VALUE",6 "description": "SOME_STRING_VALUE"7 }8 ]9 },10 "headers": {11 "Authorization": "Bearer <TOKEN>"12 },13 "method": "delete"14})
Path Parameter | Description |
---|---|
teamId | string requiredThe Team identifier to perform the request on behalf of. |
The Team was successfully deleted
idstringRequired The ID of the deleted Team Example:
team_LLHUOMOoDlqOp8wPE4kFo9pE
newDefaultTeamIdErrorboolean Signifies whether the default team update has failed, when newDefaultTeamId is provided in request query. Example:
true
Code | Description |
---|---|
200 | The Team was successfully deleted |
400 |
|
401 | |
402 | |
403 |
|
404 | The team was not found |
409 |
Optional params
fetch-request
1await fetch("https://api.vercel.com/v1/teams/SOME_STRING_VALUE?newDefaultTeamId=team_LLHUOMOoDlqOp8wPE4kFo9pE&slug=SOME_STRING_VALUE", {2 "body": {3 "reasons": [4 {5 "slug": "SOME_STRING_VALUE",6 "description": "SOME_STRING_VALUE"7 }8 ]9 },10 "headers": {11 "Authorization": "Bearer <TOKEN>"12 },13 "method": "delete"14})
Delete an active Team invite code.
Optional params
fetch-request
1await fetch("https://api.vercel.com/v1/teams/teamId/invites/2wn2hudbr4chb1ecywo9dvzo7g9sscs6mzcz8htdde0txyom4l", {2 "headers": {3 "Authorization": "Bearer <TOKEN>"4 },5 "method": "delete"6})
Path Parameter | Description |
---|---|
inviteId | string requiredThe Team invite code ID. Example: 2wn2hudbr4chb1ecywo9dvzo7g9sscs6mzcz8htdde0txyom4l |
idstringRequired ID of the team.
Code | Description |
---|---|
200 | Successfully deleted Team invite code. |
400 | One of the provided values in the request query is invalid. |
401 | |
403 |
|
404 |
|
Optional params
fetch-request
1await fetch("https://api.vercel.com/v1/teams/teamId/invites/2wn2hudbr4chb1ecywo9dvzo7g9sscs6mzcz8htdde0txyom4l", {2 "headers": {3 "Authorization": "Bearer <TOKEN>"4 },5 "method": "delete"6})
Get information for the Team specified by the teamId
parameter.
Optional params
fetch-request
1await fetch("https://api.vercel.com/v2/teams/SOME_STRING_VALUE?slug=SOME_STRING_VALUE", {2 "headers": {3 "Authorization": "Bearer <TOKEN>"4 },5 "method": "get"6})
Path Parameter | Description |
---|---|
teamId | string The Team identifier to perform the request on behalf of. |
Code | Description |
---|---|
200 | The requested team |
400 | One of the provided values in the request query is invalid. |
401 | |
403 |
|
404 | Team was not found. |
Optional params
fetch-request
1await fetch("https://api.vercel.com/v2/teams/SOME_STRING_VALUE?slug=SOME_STRING_VALUE", {2 "headers": {3 "Authorization": "Bearer <TOKEN>"4 },5 "method": "get"6})
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.
Optional params
fetch-request
1await fetch("https://api.vercel.com/v1/teams/teamId/request/SOME_STRING_VALUE", {2 "headers": {3 "Authorization": "Bearer <TOKEN>"4 },5 "method": "get"6})
Path Parameter | Description |
---|---|
userId | string |
accessRequestedAtnumberRequired Timestamp in milliseconds when the user requested access to the team. Example:
1588720733602
bitbucketobject or nullRequired Map of the connected Bitbucket account. confirmedbooleanRequired Current status of the membership. Will be true
if confirmed, if pending it'll befalse
.githubobject or nullRequired Map of the connected GitHub account. gitlabobject or nullRequired Map of the connected GitLab account. joinedFromobjectRequired A map that describes the origin from where the user joined. teamNamestringRequired The name of the team. Example:
My Team
teamSlugstringRequired The slug of the team. Example:
my-team
Code | Description |
---|---|
200 | Successfully |
400 |
|
401 | |
403 | You do not have permission to access this resource. |
404 |
|
Optional params
fetch-request
1await fetch("https://api.vercel.com/v1/teams/teamId/request/SOME_STRING_VALUE", {2 "headers": {3 "Authorization": "Bearer <TOKEN>"4 },5 "method": "get"6})
Get a paginated list of team members for the provided team.
Optional params
fetch-request
1await fetch("https://api.vercel.com/v2/teams/teamId/members?eligibleMembersForProjectId=SOME_STRING_VALUE&excludeProject=SOME_STRING_VALUE&limit=20&role=OWNER&search=SOME_STRING_VALUE&since=1540095775951&until=1540095775951", {2 "headers": {3 "Authorization": "Bearer <TOKEN>"4 },5 "method": "get"6})
Query Parameter | Description |
---|---|
eligibleMembersForProjectId | string Include team members who are eligible to be members of the specified project. |
excludeProject | string Exclude members who belong to the specified project. |
limit | number Limit how many teams should be returned >=1 Example: 20 |
role | string of the following Only return members with the specified team role. Example: OWNER Allowed values: OWNER MEMBER DEVELOPER VIEWER BILLING CONTRIBUTOR |
search | string Search team members by their name, username, and email. |
since | number Timestamp in milliseconds to only include members added since then. Example: 1540095775951 |
until | number Timestamp in milliseconds to only include members added until then. Example: 1540095775951 |
emailInviteCodesarray membersarrayRequired paginationobjectRequired
Code | Description |
---|---|
200 | |
400 | One of the provided values in the request query is invalid. |
401 | |
403 | You do not have permission to access this resource. |
404 | No team was found. |
Optional params
fetch-request
1await fetch("https://api.vercel.com/v2/teams/teamId/members?eligibleMembersForProjectId=SOME_STRING_VALUE&excludeProject=SOME_STRING_VALUE&limit=20&role=OWNER&search=SOME_STRING_VALUE&since=1540095775951&until=1540095775951", {2 "headers": {3 "Authorization": "Bearer <TOKEN>"4 },5 "method": "get"6})
Get a paginated list of all the Teams the authenticated User is a member of.
Optional params
fetch-request
1await fetch("https://api.vercel.com/v2/teams?limit=20&since=1540095775951&until=1540095775951", {2 "headers": {3 "Authorization": "Bearer <TOKEN>"4 },5 "method": "get"6})
Query Parameter | Description |
---|---|
limit | number Maximum number of Teams which may be returned. Example: 20 |
since | number Timestamp (in milliseconds) to only include Teams created since then. Example: 1540095775951 |
until | number Timestamp (in milliseconds) to only include Teams created until then. Example: 1540095775951 |
A paginated list of teams.
paginationRequired teamsarrayRequired
One of:
Code | Description |
---|---|
200 | A paginated list of teams. |
400 | One of the provided values in the request query is invalid. |
401 | |
403 | You do not have permission to access this resource. |
Optional params
fetch-request
1await fetch("https://api.vercel.com/v2/teams?limit=20&since=1540095775951&until=1540095775951", {2 "headers": {3 "Authorization": "Bearer <TOKEN>"4 },5 "method": "get"6})
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 can be specified with an email or an ID. If both email and ID are provided, ID will take priority.
Optional params
fetch-request
1await fetch("https://api.vercel.com/v1/teams/teamId/members", {2 "body": {3 "email": "john@example.com",4 "projects": [5 {6 "projectId": "prj_ndlgr43fadlPyCtREAqxxdyFK",7 "role": "ADMIN"8 }9 ],10 "role": "[MEMBER,VIEWER]",11 "uid": "kr1PsOIzqEL5Xg6M4VZcZosf"12 },13 "headers": {14 "Authorization": "Bearer <TOKEN>"15 },16 "method": "post"17})
Body Parameter | Description | ||||
---|---|---|---|---|---|
string The email address of the user to invite Example: "john@example.com" | |||||
projects | array of object
| ||||
role | string of the following The role of the user to invite Example: [MEMBER,VIEWER] Allowed values: OWNER MEMBER DEVELOPER BILLING VIEWER CONTRIBUTOR | ||||
uid | string The id of the user to invite Example: "kr1PsOIzqEL5Xg6M4VZcZosf" |
One of the following objects
Code | Description |
---|---|
200 | The member was successfully added to the team |
400 |
|
401 | |
403 |
|
404 | The team was not found |
503 |
Optional params
fetch-request
1await fetch("https://api.vercel.com/v1/teams/teamId/members", {2 "body": {3 "email": "john@example.com",4 "projects": [5 {6 "projectId": "prj_ndlgr43fadlPyCtREAqxxdyFK",7 "role": "ADMIN"8 }9 ],10 "role": "[MEMBER,VIEWER]",11 "uid": "kr1PsOIzqEL5Xg6M4VZcZosf"12 },13 "headers": {14 "Authorization": "Bearer <TOKEN>"15 },16 "method": "post"17})
Join a team with a provided invite code or team ID.
Optional params
fetch-request
1await fetch("https://api.vercel.com/v1/teams/teamId/members/teams/join", {2 "body": {3 "inviteCode": "fisdh38aejkeivn34nslfore9vjtn4ls"4 },5 "headers": {6 "Authorization": "Bearer <TOKEN>"7 },8 "method": "post"9})
Body Parameter | Description |
---|---|
inviteCode | string The invite code to join the team. Example: "fisdh38aejkeivn34nslfore9vjtn4ls" |
Successfully joined a team.
fromstringRequired The origin of how the user joined. Example:
email
namestringRequired The name of the team the user joined. Example:
My Team
slugstringRequired The slug of the team the user joined. Example:
my-team
teamIdstringRequired The ID of the team the user joined. Example:
team_LLHUOMOoDlqOp8wPE4kFo9pE
Code | Description |
---|---|
200 | Successfully joined a team. |
400 | One of the provided values in the request body is invalid. |
401 | |
402 | |
403 | You do not have permission to access this resource. |
404 |
Optional params
fetch-request
1await fetch("https://api.vercel.com/v1/teams/teamId/members/teams/join", {2 "body": {3 "inviteCode": "fisdh38aejkeivn34nslfore9vjtn4ls"4 },5 "headers": {6 "Authorization": "Bearer <TOKEN>"7 },8 "method": "post"9})
Update the information of a Team specified by the teamId
parameter. The request body should contain the information that will be updated on the Team.
Optional params
fetch-request
1await fetch("https://api.vercel.com/v2/teams/SOME_STRING_VALUE?slug=SOME_STRING_VALUE", {2 "body": {3 "avatar": "SOME_STRING_VALUE",4 "description": "Our mission is to make cloud computing accessible to everyone",5 "emailDomain": "example.com",6 "enablePreviewFeedback": "on",7 "enableProductionFeedback": "on",8 "hideIpAddresses": true,9 "hideIpAddressesInLogDrains": true,10 "name": "My Team",11 "previewDeploymentSuffix": "example.dev",12 "regenerateInviteCode": true,13 "remoteCaching": {14 "enabled": true15 },16 "saml": {17 "enforced": true,18 "roles": "SOME_OBJECT_VALUE"19 },20 "sensitiveEnvironmentVariablePolicy": "on",21 "slug": "my-team"22 },23 "headers": {24 "Authorization": "Bearer <TOKEN>"25 },26 "method": "patch"27})
Path Parameter | Description |
---|---|
teamId | string requiredThe Team identifier to perform the request on behalf of. |
Code | Description |
---|---|
200 | |
400 | One of the provided values in the request body is invalid. |
401 | |
402 | |
403 |
|
404 | Team was not found. |
Optional params
fetch-request
1await fetch("https://api.vercel.com/v2/teams/SOME_STRING_VALUE?slug=SOME_STRING_VALUE", {2 "body": {3 "avatar": "SOME_STRING_VALUE",4 "description": "Our mission is to make cloud computing accessible to everyone",5 "emailDomain": "example.com",6 "enablePreviewFeedback": "on",7 "enableProductionFeedback": "on",8 "hideIpAddresses": true,9 "hideIpAddressesInLogDrains": true,10 "name": "My Team",11 "previewDeploymentSuffix": "example.dev",12 "regenerateInviteCode": true,13 "remoteCaching": {14 "enabled": true15 },16 "saml": {17 "enforced": true,18 "roles": "SOME_OBJECT_VALUE"19 },20 "sensitiveEnvironmentVariablePolicy": "on",21 "slug": "my-team"22 },23 "headers": {24 "Authorization": "Bearer <TOKEN>"25 },26 "method": "patch"27})
Remove a Team Member from the Team, or dismiss a user that requested access, or leave a team.
Optional params
fetch-request
1await fetch("https://api.vercel.com/v1/teams/teamId/members/ndlgr43fadlPyCtREAqxxdyFK?newDefaultTeamId=team_nllPyCtREAqxxdyFKbbMDlxd", {2 "headers": {3 "Authorization": "Bearer <TOKEN>"4 },5 "method": "delete"6})
Path Parameter | Description |
---|---|
uid | string requiredThe user ID of the member. Example: ndlgr43fadlPyCtREAqxxdyFK |
idstringRequired ID of the team.
Code | Description |
---|---|
200 | Successfully removed a member of the team. |
400 |
|
401 | |
403 |
|
404 |
|
503 |
Optional params
fetch-request
1await fetch("https://api.vercel.com/v1/teams/teamId/members/ndlgr43fadlPyCtREAqxxdyFK?newDefaultTeamId=team_nllPyCtREAqxxdyFKbbMDlxd", {2 "headers": {3 "Authorization": "Bearer <TOKEN>"4 },5 "method": "delete"6})
Request access to a team as a member. An owner has to approve the request. Only 10 users can request access to a team at the same time.
Optional params
fetch-request
1await fetch("https://api.vercel.com/v1/teams/teamId/request", {2 "body": {3 "joinedFrom": {4 "origin": "github",5 "commitId": "f498d25d8bd654b578716203be73084b31130cd7",6 "repoId": "67753070",7 "repoPath": "jane-doe/example",8 "gitUserId": 103053343,9 "gitUserLogin": "jane-doe"10 }11 },12 "headers": {13 "Authorization": "Bearer <TOKEN>"14 },15 "method": "post"16})
Body Parameter | Description | ||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|
joinedFrom | object required
|
accessRequestedAtnumber bitbucketobject or nullRequired confirmedboolean githubobject or nullRequired gitlabobject or nullRequired joinedFromobject teamNamestringRequired teamSlugstringRequired
Code | Description |
---|---|
200 | Successfuly requested access to the team. |
400 |
|
401 | |
403 | You do not have permission to access this resource. |
404 | The team was not found. |
503 |
Optional params
fetch-request
1await fetch("https://api.vercel.com/v1/teams/teamId/request", {2 "body": {3 "joinedFrom": {4 "origin": "github",5 "commitId": "f498d25d8bd654b578716203be73084b31130cd7",6 "repoId": "67753070",7 "repoPath": "jane-doe/example",8 "gitUserId": 103053343,9 "gitUserLogin": "jane-doe"10 }11 },12 "headers": {13 "Authorization": "Bearer <TOKEN>"14 },15 "method": "post"16})
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.
Optional params
fetch-request
1await fetch("https://api.vercel.com/v1/teams/teamId/members/ndfasllgPyCtREAqxxdyFKb", {2 "body": {3 "confirmed": true,4 "joinedFrom": {5 "ssoUserId": "SOME_NULL_VALUE"6 },7 "projects": [8 {9 "projectId": "prj_ndlgr43fadlPyCtREAqxxdyFK",10 "role": "ADMIN"11 }12 ],13 "role": "[MEMBER,VIEWER]"14 },15 "headers": {16 "Authorization": "Bearer <TOKEN>"17 },18 "method": "patch"19})
Path Parameter | Description |
---|---|
uid | string requiredThe ID of the member. Example: ndfasllgPyCtREAqxxdyFKb |
idstringRequired ID of the team.
Code | Description |
---|---|
200 | Successfully updated the membership. |
400 |
|
401 | Team members can only be updated by an owner, or by the authenticated user if they are only disconnecting their SAML connection to the Team. |
402 | |
403 | You do not have permission to access this resource. |
404 |
|
500 |
Optional params
fetch-request
1await fetch("https://api.vercel.com/v1/teams/teamId/members/ndfasllgPyCtREAqxxdyFKb", {2 "body": {3 "confirmed": true,4 "joinedFrom": {5 "ssoUserId": "SOME_NULL_VALUE"6 },7 "projects": [8 {9 "projectId": "prj_ndlgr43fadlPyCtREAqxxdyFK",10 "role": "ADMIN"11 }12 ],13 "role": "[MEMBER,VIEWER]"14 },15 "headers": {16 "Authorization": "Bearer <TOKEN>"17 },18 "method": "patch"19})
Was this helpful?