Vercel MCP

# Teams (*teams*) ## Overview ### Available Operations * [getTeamMembers](#getteammembers) - List team members * [inviteUserToTeam](#inviteusertoteam) - Invite a user * [requestAccessToTeam](#requestaccesstoteam) - Request access to a team * [getTeamAccessRequest](#getteamaccessrequest) - Get access request status * [joinTeam](#jointeam) - Join a team * [updateTeamMember](#updateteammember) - Update a Team Member * [removeTeamMember](#removeteammember) - Remove a Team Member * [getTeam](#getteam) - Get a Team * [patchTeam](#patchteam) - Update a Team * [getTeams](#getteams) - List all teams * [createTeam](#createteam) - Create a Team * [deleteTeam](#deleteteam) - Delete a Team * [deleteTeamInviteCode](#deleteteaminvitecode) - Delete a Team invite code ## getTeamMembers Get a paginated list of team members for the provided team. ### Example Usage ```typescript import { Vercel } from "@vercel/sdk"; const vercel = new Vercel({ bearerToken: "<YOUR_BEARER_TOKEN_HERE>", }); async function run() { const result = await vercel.teams.getTeamMembers({ limit: 20, since: 1540095775951, until: 1540095775951, role: "OWNER", teamId: "team_1a2b3c4d5e6f7g8h9i0j1k2l", }); // Handle the result console.log(result); } run(); ``` ### Standalone function The standalone function version of this method: ```typescript import { VercelCore } from "@vercel/sdk/core.js"; import { teamsGetTeamMembers } from "@vercel/sdk/funcs/teamsGetTeamMembers.js"; // Use `VercelCore` for best tree-shaking performance. // You can create one instance of it to use across an application. const vercel = new VercelCore({ bearerToken: "<YOUR_BEARER_TOKEN_HERE>", }); async function run() { const res = await teamsGetTeamMembers(vercel, { limit: 20, since: 1540095775951, until: 1540095775951, role: "OWNER", teamId: "team_1a2b3c4d5e6f7g8h9i0j1k2l", }); if (!res.ok) { throw res.error; } const { value: result } = res; // Handle the result console.log(result); } run(); ``` ### Parameters | Parameter | Type | Required | Description | | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | | `request` | [models.GetTeamMembersRequest](../../models/getteammembersrequest.md) | :heavy_check_mark: | The request object to use for the request. | | `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. | | `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. | | `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. | ### Response **Promise\<[models.GetTeamMembersResponseBody](../../models/getteammembersresponsebody.md)\>** ### Errors | Error Type | Status Code | Content Type | | ---------------------------- | ---------------------------- | ---------------------------- | | models.VercelBadRequestError | 400 | application/json | | models.VercelForbiddenError | 401 | application/json | | models.VercelNotFoundError | 404 | application/json | | models.SDKError | 4XX, 5XX | \*/\* | ## inviteUserToTeam 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. ### Example Usage ```typescript import { Vercel } from "@vercel/sdk"; const vercel = new Vercel({ bearerToken: "<YOUR_BEARER_TOKEN_HERE>", }); async function run() { const result = await vercel.teams.inviteUserToTeam({ teamId: "team_1a2b3c4d5e6f7g8h9i0j1k2l", requestBody: { uid: "kr1PsOIzqEL5Xg6M4VZcZosf", email: "john@example.com", role: "VIEWER", projects: [ { projectId: "prj_ndlgr43fadlPyCtREAqxxdyFK", role: "ADMIN", }, { projectId: "prj_ndlgr43fadlPyCtREAqxxdyFK", role: "ADMIN", }, ], }, }); // Handle the result console.log(result); } run(); ``` ### Standalone function The standalone function version of this method: ```typescript import { VercelCore } from "@vercel/sdk/core.js"; import { teamsInviteUserToTeam } from "@vercel/sdk/funcs/teamsInviteUserToTeam.js"; // Use `VercelCore` for best tree-shaking performance. // You can create one instance of it to use across an application. const vercel = new VercelCore({ bearerToken: "<YOUR_BEARER_TOKEN_HERE>", }); async function run() { const res = await teamsInviteUserToTeam(vercel, { teamId: "team_1a2b3c4d5e6f7g8h9i0j1k2l", requestBody: { uid: "kr1PsOIzqEL5Xg6M4VZcZosf", email: "john@example.com", role: "VIEWER", projects: [ { projectId: "prj_ndlgr43fadlPyCtREAqxxdyFK", role: "ADMIN", }, { projectId: "prj_ndlgr43fadlPyCtREAqxxdyFK", role: "ADMIN", }, ], }, }); if (!res.ok) { throw res.error; } const { value: result } = res; // Handle the result console.log(result); } run(); ``` ### Parameters | Parameter | Type | Required | Description | | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | | `request` | [models.InviteUserToTeamRequest](../../models/inviteusertoteamrequest.md) | :heavy_check_mark: | The request object to use for the request. | | `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. | | `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. | | `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. | ### Response **Promise\<[models.InviteUserToTeamResponseBody](../../models/inviteusertoteamresponsebody.md)\>** ### Errors | Error Type | Status Code | Content Type | | ---------------------------- | ---------------------------- | ---------------------------- | | models.VercelBadRequestError | 400 | application/json | | models.VercelForbiddenError | 401 | application/json | | models.VercelNotFoundError | 404 | application/json | | models.SDKError | 4XX, 5XX | \*/\* | ## requestAccessToTeam 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. ### Example Usage ```typescript 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", }, }, }); // Handle the result console.log(result); } run(); ``` ### Standalone function The standalone function version of this method: ```typescript import { VercelCore } from "@vercel/sdk/core.js"; import { teamsRequestAccessToTeam } from "@vercel/sdk/funcs/teamsRequestAccessToTeam.js"; // Use `VercelCore` for best tree-shaking performance. // You can create one instance of it to use across an application. const vercel = new VercelCore({ bearerToken: "<YOUR_BEARER_TOKEN_HERE>", }); async function run() { const res = await teamsRequestAccessToTeam(vercel, { teamId: "team_1a2b3c4d5e6f7g8h9i0j1k2l", requestBody: { joinedFrom: { origin: "github", commitId: "f498d25d8bd654b578716203be73084b31130cd7", repoId: "67753070", repoPath: "jane-doe/example", gitUserId: 103053343, gitUserLogin: "jane-doe", }, }, }); if (!res.ok) { throw res.error; } const { value: result } = res; // Handle the result console.log(result); } run(); ``` ### Parameters | Parameter | Type | Required | Description | | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | | `request` | [models.RequestAccessToTeamRequest](../../models/requestaccesstoteamrequest.md) | :heavy_check_mark: | The request object to use for the request. | | `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. | | `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. | | `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. | ### Response **Promise\<[models.RequestAccessToTeamResponseBody](../../models/requestaccesstoteamresponsebody.md)\>** ### Errors | Error Type | Status Code | Content Type | | ---------------------------- | ---------------------------- | ---------------------------- | | models.VercelBadRequestError | 400 | application/json | | models.VercelForbiddenError | 401 | application/json | | models.VercelNotFoundError | 404 | application/json | | models.SDKError | 4XX, 5XX | \*/\* | ## getTeamAccessRequest 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. ### Example Usage ```typescript import { Vercel } from "@vercel/sdk"; const vercel = new Vercel({ bearerToken: "<YOUR_BEARER_TOKEN_HERE>", }); async function run() { const result = await vercel.teams.getTeamAccessRequest({ userId: "<id>", teamId: "team_1a2b3c4d5e6f7g8h9i0j1k2l", }); // Handle the result console.log(result); } run(); ``` ### Standalone function The standalone function version of this method: ```typescript import { VercelCore } from "@vercel/sdk/core.js"; import { teamsGetTeamAccessRequest } from "@vercel/sdk/funcs/teamsGetTeamAccessRequest.js"; // Use `VercelCore` for best tree-shaking performance. // You can create one instance of it to use across an application. const vercel = new VercelCore({ bearerToken: "<YOUR_BEARER_TOKEN_HERE>", }); async function run() { const res = await teamsGetTeamAccessRequest(vercel, { userId: "<id>", teamId: "team_1a2b3c4d5e6f7g8h9i0j1k2l", }); if (!res.ok) { throw res.error; } const { value: result } = res; // Handle the result console.log(result); } run(); ``` ### Parameters | Parameter | Type | Required | Description | | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | | `request` | [models.GetTeamAccessRequestRequest](../../models/getteamaccessrequestrequest.md) | :heavy_check_mark: | The request object to use for the request. | | `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. | | `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. | | `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. | ### Response **Promise\<[models.GetTeamAccessRequestResponseBody](../../models/getteamaccessrequestresponsebody.md)\>** ### Errors | Error Type | Status Code | Content Type | | ---------------------------- | ---------------------------- | ---------------------------- | | models.VercelBadRequestError | 400 | application/json | | models.VercelForbiddenError | 401 | application/json | | models.VercelNotFoundError | 404 | application/json | | models.SDKError | 4XX, 5XX | \*/\* | ## joinTeam Join a team with a provided invite code or team ID. ### Example Usage ```typescript import { Vercel } from "@vercel/sdk"; const vercel = new Vercel({ bearerToken: "<YOUR_BEARER_TOKEN_HERE>", }); async function run() { const result = await vercel.teams.joinTeam({ teamId: "team_1a2b3c4d5e6f7g8h9i0j1k2l", requestBody: { inviteCode: "fisdh38aejkeivn34nslfore9vjtn4ls", }, }); // Handle the result console.log(result); } run(); ``` ### Standalone function The standalone function version of this method: ```typescript import { VercelCore } from "@vercel/sdk/core.js"; import { teamsJoinTeam } from "@vercel/sdk/funcs/teamsJoinTeam.js"; // Use `VercelCore` for best tree-shaking performance. // You can create one instance of it to use across an application. const vercel = new VercelCore({ bearerToken: "<YOUR_BEARER_TOKEN_HERE>", }); async function run() { const res = await teamsJoinTeam(vercel, { teamId: "team_1a2b3c4d5e6f7g8h9i0j1k2l", requestBody: { inviteCode: "fisdh38aejkeivn34nslfore9vjtn4ls", }, }); if (!res.ok) { throw res.error; } const { value: result } = res; // Handle the result console.log(result); } run(); ``` ### Parameters | Parameter | Type | Required | Description | | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | | `request` | [models.JoinTeamRequest](../../models/jointeamrequest.md) | :heavy_check_mark: | The request object to use for the request. | | `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. | | `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. | | `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. | ### Response **Promise\<[models.JoinTeamResponseBody](../../models/jointeamresponsebody.md)\>** ### Errors | Error Type | Status Code | Content Type | | ---------------------------- | ---------------------------- | ---------------------------- | | models.VercelBadRequestError | 400 | application/json | | models.VercelForbiddenError | 401 | application/json | | models.VercelNotFoundError | 404 | application/json | | models.SDKError | 4XX, 5XX | \*/\* | ## updateTeamMember 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. ### Example Usage ```typescript import { Vercel } from "@vercel/sdk"; const vercel = new Vercel({ bearerToken: "<YOUR_BEARER_TOKEN_HERE>", }); async function run() { const result = await vercel.teams.updateTeamMember({ uid: "ndfasllgPyCtREAqxxdyFKb", teamId: "team_1a2b3c4d5e6f7g8h9i0j1k2l", requestBody: { confirmed: true, role: "[\"MEMBER\",\"VIEWER\"]", projects: [ { projectId: "prj_ndlgr43fadlPyCtREAqxxdyFK", role: "ADMIN", }, { projectId: "prj_ndlgr43fadlPyCtREAqxxdyFK", role: "ADMIN", }, ], }, }); // Handle the result console.log(result); } run(); ``` ### Standalone function The standalone function version of this method: ```typescript import { VercelCore } from "@vercel/sdk/core.js"; import { teamsUpdateTeamMember } from "@vercel/sdk/funcs/teamsUpdateTeamMember.js"; // Use `VercelCore` for best tree-shaking performance. // You can create one instance of it to use across an application. const vercel = new VercelCore({ bearerToken: "<YOUR_BEARER_TOKEN_HERE>", }); async function run() { const res = await teamsUpdateTeamMember(vercel, { uid: "ndfasllgPyCtREAqxxdyFKb", teamId: "team_1a2b3c4d5e6f7g8h9i0j1k2l", requestBody: { confirmed: true, role: "[\"MEMBER\",\"VIEWER\"]", projects: [ { projectId: "prj_ndlgr43fadlPyCtREAqxxdyFK", role: "ADMIN", }, { projectId: "prj_ndlgr43fadlPyCtREAqxxdyFK", role: "ADMIN", }, ], }, }); if (!res.ok) { throw res.error; } const { value: result } = res; // Handle the result console.log(result); } run(); ``` ### Parameters | Parameter | Type | Required | Description | | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | | `request` | [models.UpdateTeamMemberRequest](../../models/updateteammemberrequest.md) | :heavy_check_mark: | The request object to use for the request. | | `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. | | `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. | | `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. | ### Response **Promise\<[models.UpdateTeamMemberResponseBody](../../models/updateteammemberresponsebody.md)\>** ### Errors | Error Type | Status Code | Content Type | | ---------------------------- | ---------------------------- | ---------------------------- | | models.VercelBadRequestError | 400 | application/json | | models.VercelForbiddenError | 401 | application/json | | models.VercelNotFoundError | 404 | application/json | | models.SDKError | 4XX, 5XX | \*/\* | ## removeTeamMember Remove a Team Member from the Team, or dismiss a user that requested access, or leave a team. ### Example Usage ```typescript import { Vercel } from "@vercel/sdk"; const vercel = new Vercel({ bearerToken: "<YOUR_BEARER_TOKEN_HERE>", }); async function run() { const result = await vercel.teams.removeTeamMember({ uid: "ndlgr43fadlPyCtREAqxxdyFK", newDefaultTeamId: "team_nllPyCtREAqxxdyFKbbMDlxd", teamId: "team_1a2b3c4d5e6f7g8h9i0j1k2l", }); // Handle the result console.log(result); } run(); ``` ### Standalone function The standalone function version of this method: ```typescript import { VercelCore } from "@vercel/sdk/core.js"; import { teamsRemoveTeamMember } from "@vercel/sdk/funcs/teamsRemoveTeamMember.js"; // Use `VercelCore` for best tree-shaking performance. // You can create one instance of it to use across an application. const vercel = new VercelCore({ bearerToken: "<YOUR_BEARER_TOKEN_HERE>", }); async function run() { const res = await teamsRemoveTeamMember(vercel, { uid: "ndlgr43fadlPyCtREAqxxdyFK", newDefaultTeamId: "team_nllPyCtREAqxxdyFKbbMDlxd", teamId: "team_1a2b3c4d5e6f7g8h9i0j1k2l", }); if (!res.ok) { throw res.error; } const { value: result } = res; // Handle the result console.log(result); } run(); ``` ### Parameters | Parameter | Type | Required | Description | | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | | `request` | [models.RemoveTeamMemberRequest](../../models/removeteammemberrequest.md) | :heavy_check_mark: | The request object to use for the request. | | `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. | | `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. | | `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. | ### Response **Promise\<[models.RemoveTeamMemberResponseBody](../../models/removeteammemberresponsebody.md)\>** ### Errors | Error Type | Status Code | Content Type | | ---------------------------- | ---------------------------- | ---------------------------- | | models.VercelBadRequestError | 400 | application/json | | models.VercelForbiddenError | 401 | application/json | | models.VercelNotFoundError | 404 | application/json | | models.SDKError | 4XX, 5XX | \*/\* | ## getTeam Get information for the Team specified by the `teamId` parameter. ### Example Usage ```typescript import { Vercel } from "@vercel/sdk"; const vercel = new Vercel({ bearerToken: "<YOUR_BEARER_TOKEN_HERE>", }); async function run() { const result = await vercel.teams.getTeam({ slug: "my-team-url-slug", teamId: "team_1a2b3c4d5e6f7g8h9i0j1k2l", }); // Handle the result console.log(result); } run(); ``` ### Standalone function The standalone function version of this method: ```typescript import { VercelCore } from "@vercel/sdk/core.js"; import { teamsGetTeam } from "@vercel/sdk/funcs/teamsGetTeam.js"; // Use `VercelCore` for best tree-shaking performance. // You can create one instance of it to use across an application. const vercel = new VercelCore({ bearerToken: "<YOUR_BEARER_TOKEN_HERE>", }); async function run() { const res = await teamsGetTeam(vercel, { slug: "my-team-url-slug", teamId: "team_1a2b3c4d5e6f7g8h9i0j1k2l", }); if (!res.ok) { throw res.error; } const { value: result } = res; // Handle the result console.log(result); } run(); ``` ### Parameters | Parameter | Type | Required | Description | | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | | `request` | [models.GetTeamRequest](../../models/getteamrequest.md) | :heavy_check_mark: | The request object to use for the request. | | `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. | | `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. | | `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. | ### Response **Promise\<[{ [k: string]: any }](../../models/.md)\>** ### Errors | Error Type | Status Code | Content Type | | ---------------------------- | ---------------------------- | ---------------------------- | | models.VercelBadRequestError | 400 | application/json | | models.VercelForbiddenError | 401 | application/json | | models.VercelNotFoundError | 404 | application/json | | models.SDKError | 4XX, 5XX | \*/\* | ## patchTeam 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. ### Example Usage ```typescript import { Vercel } from "@vercel/sdk"; const vercel = new Vercel({ bearerToken: "<YOUR_BEARER_TOKEN_HERE>", }); async function run() { const result = await vercel.teams.patchTeam({ teamId: "team_1a2b3c4d5e6f7g8h9i0j1k2l", slug: "my-team-url-slug", requestBody: { description: "Our mission is to make cloud computing accessible to everyone", emailDomain: "example.com", name: "My Team", previewDeploymentSuffix: "example.dev", regenerateInviteCode: true, saml: { enforced: true, }, slug: "my-team", enablePreviewFeedback: "on", enableProductionFeedback: "on", sensitiveEnvironmentVariablePolicy: "on", remoteCaching: { enabled: true, }, hideIpAddresses: false, hideIpAddressesInLogDrains: false, }, }); // Handle the result console.log(result); } run(); ``` ### Standalone function The standalone function version of this method: ```typescript import { VercelCore } from "@vercel/sdk/core.js"; import { teamsPatchTeam } from "@vercel/sdk/funcs/teamsPatchTeam.js"; // Use `VercelCore` for best tree-shaking performance. // You can create one instance of it to use across an application. const vercel = new VercelCore({ bearerToken: "<YOUR_BEARER_TOKEN_HERE>", }); async function run() { const res = await teamsPatchTeam(vercel, { teamId: "team_1a2b3c4d5e6f7g8h9i0j1k2l", slug: "my-team-url-slug", requestBody: { description: "Our mission is to make cloud computing accessible to everyone", emailDomain: "example.com", name: "My Team", previewDeploymentSuffix: "example.dev", regenerateInviteCode: true, saml: { enforced: true, }, slug: "my-team", enablePreviewFeedback: "on", enableProductionFeedback: "on", sensitiveEnvironmentVariablePolicy: "on", remoteCaching: { enabled: true, }, hideIpAddresses: false, hideIpAddressesInLogDrains: false, }, }); if (!res.ok) { throw res.error; } const { value: result } = res; // Handle the result console.log(result); } run(); ``` ### Parameters | Parameter | Type | Required | Description | | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | | `request` | [models.PatchTeamRequest](../../models/patchteamrequest.md) | :heavy_check_mark: | The request object to use for the request. | | `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. | | `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. | | `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. | ### Response **Promise\<[{ [k: string]: any }](../../models/.md)\>** ### Errors | Error Type | Status Code | Content Type | | ---------------------------- | ---------------------------- | ---------------------------- | | models.VercelBadRequestError | 400 | application/json | | models.VercelForbiddenError | 401 | application/json | | models.VercelNotFoundError | 404 | application/json | | models.SDKError | 4XX, 5XX | \*/\* | ## getTeams Get a paginated list of all the Teams the authenticated User is a member of. ### Example Usage ```typescript import { Vercel } from "@vercel/sdk"; const vercel = new Vercel({ bearerToken: "<YOUR_BEARER_TOKEN_HERE>", }); async function run() { const result = await vercel.teams.getTeams({ limit: 20, since: 1540095775951, until: 1540095775951, }); // Handle the result console.log(result); } run(); ``` ### Standalone function The standalone function version of this method: ```typescript import { VercelCore } from "@vercel/sdk/core.js"; import { teamsGetTeams } from "@vercel/sdk/funcs/teamsGetTeams.js"; // Use `VercelCore` for best tree-shaking performance. // You can create one instance of it to use across an application. const vercel = new VercelCore({ bearerToken: "<YOUR_BEARER_TOKEN_HERE>", }); async function run() { const res = await teamsGetTeams(vercel, { limit: 20, since: 1540095775951, until: 1540095775951, }); if (!res.ok) { throw res.error; } const { value: result } = res; // Handle the result console.log(result); } run(); ``` ### Parameters | Parameter | Type | Required | Description | | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | | `request` | [models.GetTeamsRequest](../../models/getteamsrequest.md) | :heavy_check_mark: | The request object to use for the request. | | `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. | | `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. | | `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. | ### Response **Promise\<[models.GetTeamsResponseBody](../../models/getteamsresponsebody.md)\>** ### Errors | Error Type | Status Code | Content Type | | ---------------------------- | ---------------------------- | ---------------------------- | | models.VercelBadRequestError | 400 | application/json | | models.VercelForbiddenError | 401 | application/json | | models.SDKError | 4XX, 5XX | \*/\* | ## createTeam Create a new Team under your account. You need to send a POST request with the desired Team slug, and optionally the Team name. ### Example Usage ```typescript import { Vercel } from "@vercel/sdk"; const vercel = new Vercel({ bearerToken: "<YOUR_BEARER_TOKEN_HERE>", }); async function run() { const result = await vercel.teams.createTeam({ slug: "a-random-team", name: "A Random Team", }); // Handle the result console.log(result); } run(); ``` ### Standalone function The standalone function version of this method: ```typescript import { VercelCore } from "@vercel/sdk/core.js"; import { teamsCreateTeam } from "@vercel/sdk/funcs/teamsCreateTeam.js"; // Use `VercelCore` for best tree-shaking performance. // You can create one instance of it to use across an application. const vercel = new VercelCore({ bearerToken: "<YOUR_BEARER_TOKEN_HERE>", }); async function run() { const res = await teamsCreateTeam(vercel, { slug: "a-random-team", name: "A Random Team", }); if (!res.ok) { throw res.error; } const { value: result } = res; // Handle the result console.log(result); } run(); ``` ### Parameters | Parameter | Type | Required | Description | | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | | `request` | [models.CreateTeamRequestBody](../../models/createteamrequestbody.md) | :heavy_check_mark: | The request object to use for the request. | | `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. | | `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. | | `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. | ### Response **Promise\<[models.CreateTeamResponseBody](../../models/createteamresponsebody.md)\>** ### Errors | Error Type | Status Code | Content Type | | ---------------------------- | ---------------------------- | ---------------------------- | | models.VercelBadRequestError | 400 | application/json | | models.VercelForbiddenError | 401 | application/json | | models.SDKError | 4XX, 5XX | \*/\* | ## deleteTeam 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. ### Example Usage ```typescript import { Vercel } from "@vercel/sdk"; const vercel = new Vercel({ bearerToken: "<YOUR_BEARER_TOKEN_HERE>", }); async function run() { const result = await vercel.teams.deleteTeam({ newDefaultTeamId: "team_LLHUOMOoDlqOp8wPE4kFo9pE", teamId: "team_1a2b3c4d5e6f7g8h9i0j1k2l", slug: "my-team-url-slug", requestBody: {}, }); // Handle the result console.log(result); } run(); ``` ### Standalone function The standalone function version of this method: ```typescript import { VercelCore } from "@vercel/sdk/core.js"; import { teamsDeleteTeam } from "@vercel/sdk/funcs/teamsDeleteTeam.js"; // Use `VercelCore` for best tree-shaking performance. // You can create one instance of it to use across an application. const vercel = new VercelCore({ bearerToken: "<YOUR_BEARER_TOKEN_HERE>", }); async function run() { const res = await teamsDeleteTeam(vercel, { newDefaultTeamId: "team_LLHUOMOoDlqOp8wPE4kFo9pE", teamId: "team_1a2b3c4d5e6f7g8h9i0j1k2l", slug: "my-team-url-slug", requestBody: {}, }); if (!res.ok) { throw res.error; } const { value: result } = res; // Handle the result console.log(result); } run(); ``` ### Parameters | Parameter | Type | Required | Description | | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | | `request` | [models.DeleteTeamRequest](../../models/deleteteamrequest.md) | :heavy_check_mark: | The request object to use for the request. | | `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. | | `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. | | `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. | ### Response **Promise\<[models.DeleteTeamResponseBody](../../models/deleteteamresponsebody.md)\>** ### Errors | Error Type | Status Code | Content Type | | ---------------------------- | ---------------------------- | ---------------------------- | | models.VercelBadRequestError | 400 | application/json | | models.VercelForbiddenError | 401 | application/json | | models.VercelNotFoundError | 404 | application/json | | models.SDKError | 4XX, 5XX | \*/\* | ## deleteTeamInviteCode Delete an active Team invite code. ### Example Usage ```typescript import { Vercel } from "@vercel/sdk"; const vercel = new Vercel({ bearerToken: "<YOUR_BEARER_TOKEN_HERE>", }); async function run() { const result = await vercel.teams.deleteTeamInviteCode({ inviteId: "2wn2hudbr4chb1ecywo9dvzo7g9sscs6mzcz8htdde0txyom4l", teamId: "team_1a2b3c4d5e6f7g8h9i0j1k2l", }); // Handle the result console.log(result); } run(); ``` ### Standalone function The standalone function version of this method: ```typescript import { VercelCore } from "@vercel/sdk/core.js"; import { teamsDeleteTeamInviteCode } from "@vercel/sdk/funcs/teamsDeleteTeamInviteCode.js"; // Use `VercelCore` for best tree-shaking performance. // You can create one instance of it to use across an application. const vercel = new VercelCore({ bearerToken: "<YOUR_BEARER_TOKEN_HERE>", }); async function run() { const res = await teamsDeleteTeamInviteCode(vercel, { inviteId: "2wn2hudbr4chb1ecywo9dvzo7g9sscs6mzcz8htdde0txyom4l", teamId: "team_1a2b3c4d5e6f7g8h9i0j1k2l", }); if (!res.ok) { throw res.error; } const { value: result } = res; // Handle the result console.log(result); } run(); ``` ### Parameters | Parameter | Type | Required | Description | | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | | `request` | [models.DeleteTeamInviteCodeRequest](../../models/deleteteaminvitecoderequest.md) | :heavy_check_mark: | The request object to use for the request. | | `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. | | `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. | | `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. | ### Response **Promise\<[models.DeleteTeamInviteCodeResponseBody](../../models/deleteteaminvitecoderesponsebody.md)\>** ### Errors | Error Type | Status Code | Content Type | | ---------------------------- | ---------------------------- | ---------------------------- | | models.VercelBadRequestError | 400 | application/json | | models.VercelForbiddenError | 401 | application/json | | models.VercelNotFoundError | 404 | application/json | | models.SDKError | 4XX, 5XX | \*/\* |