PATCH
/
v2
/
teams
/
{teamId}
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();
{
  "limited": true,
  "limitedBy": [
    "scope"
  ],
  "saml": {
    "connection": {
      "type": "OktaSAML",
      "status": "linked",
      "state": "active",
      "connectedAt": 1611796915677,
      "lastReceivedWebhookEvent": 1611796915677
    },
    "directory": {
      "type": "OktaSAML",
      "state": "active",
      "connectedAt": 1611796915677,
      "lastReceivedWebhookEvent": 1611796915677
    },
    "enforced": true
  },
  "mfaEnforced": true,
  "id": "team_nllPyCtREAqxxdyFKbbMDlxd",
  "slug": "my-team",
  "name": "My Team",
  "avatar": "6eb07268bcfadd309905ffb1579354084c24655c",
  "membership": {
    "uid": "<string>",
    "entitlements": [
      {
        "entitlement": "<string>"
      }
    ],
    "teamId": "<string>",
    "confirmed": true,
    "confirmedAt": 123,
    "accessRequestedAt": 123,
    "role": "OWNER",
    "teamRoles": [
      "OWNER"
    ],
    "teamPermissions": [
      "CreateProject"
    ],
    "createdAt": 123,
    "created": 123,
    "joinedFrom": {
      "origin": "mail",
      "commitId": "<string>",
      "repoId": "<string>",
      "repoPath": "<string>",
      "gitUserId": "<string>",
      "gitUserLogin": "<string>",
      "ssoUserId": "<string>",
      "ssoConnectedAt": 123,
      "idpUserId": "<string>",
      "dsyncUserId": "<string>",
      "dsyncConnectedAt": 123
    }
  },
  "created": "<string>",
  "createdAt": 1630748523395
}

Authorizations

Authorization
string
header
required

Default authentication mechanism

Path Parameters

teamId
string
required

The Team identifier to perform the request on behalf of.

Example:

"team_1a2b3c4d5e6f7g8h9i0j1k2l"

Query Parameters

slug
string

The Team slug to perform the request on behalf of.

Example:

"my-team-url-slug"

Body

application/json

Response

200
application/json

A limited form of data representing a Team, due to the authentication token missing privileges to read the full Team data.