Update a Team
PATCH
https://api.vercel.com/v2/teams/{teamId}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.Request
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", disjunctiveProductionSecretPolicy: "on", remoteCaching: { enabled: true, }, hideIpAddresses: false, hideIpAddressesInLogDrains: false, dpAccessRequestsMode: "none", requireVerifiedCommits: true, disableRepositoryDispatchEvents: false, defaultExpirationSettings: { expiration: "1y", expirationProduction: "1y", expirationCanceled: "1y", expirationErrored: "1y", }, strictDeploymentProtectionSettings: { enabled: true, }, strictShareableLinks: { enabled: true, }, strictPasswordProtectionSettings: { enabled: true, }, strictConnectors: { enabled: true, }, resourceConfig: { buildMachine: { default: "standard", }, }, }, });
console.log(result);}
run();Response
{ "apiKeysInvalidatedAt": "123", "appTokensInvalidatedAt": "123", "avatar": "6eb07268bcfadd309905ffb1579354084c24655c", "billing": { "plan": "enterprise" }, "connect": { "enabled": "false" }, "createdAt": "1630748523395", "creatorId": "R6efeCJQ2HKXywuasPDc0fOWB", "defaultContinuousUsageKind": "metered", "defaultDeploymentProtection": { "passwordProtection": { "deploymentType": "string" }, "ssoProtection": { "deploymentType": "string" } }, "defaultExpirationSettings": { "deploymentsToKeep": "123", "expirationDays": "123", "expirationDaysCanceled": "123", "expirationDaysErrored": "123", "expirationDaysProduction": "123" }, "defaultPassport": { "connectorId": "example_id", "deploymentType": "all" }, "defaultProjectJobs": { "flag-definitions-present": { "targets": [] }, "lint": { "targets": [] }, "mfe-config-present": { "targets": [] }, "typecheck": { "targets": [] } }, "defaultRoles": { "teamPermissions": [], "teamRoles": [] }, "deploymentPolicy": { "deploymentSources": [ { "enabled": "false", "environments": [ { "target": "preview", "type": "system" } ], "sources": [] } ], "gitSources": [ { "enabled": "false", "environments": [ { "target": "preview", "type": "system" } ], "sources": [ { "org": "string", "provider": "bitbucket", "repo": "string" } ] } ] }, "deploymentStorageRollout": { "cohort": "already_metered", "meteredAt": "123", "meterReason": "low_scheduled", "retentionAppliedAt": "123", "retentionOptOutAt": "123" }, "description": "Our mission is to make cloud computing accessible to everyone.", "disableHardAutoBlocks": "123", "disableRepositoryDispatchEvents": "false", "disjunctiveProductionSecretPolicy": "default", "dpAccessRequestsMode": "all", "emailDomain": "example.com", "enablePreviewFeedback": "default", "enableProductionFeedback": "default", "hideIpAddresses": "false", "hideIpAddressesInLogDrains": "false", "id": "team_nllPyCtREAqxxdyFKbbMDlxd", "integrationTokensInvalidatedAt": "123", "inviteCode": "hasihf9e89", "ipBuckets": [ { "bucket": "string", "default": "false", "supportUntil": "123" } ], "limited": "false", "membership": { "accessRequestedAt": "123", "confirmed": "true", "created": "123", "createdAt": "123", "entitlements": [ { "entitlement": "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" }, "organizationId": "example_id", "role": "BILLING", "teamId": "example_id", "teamPermissions": [], "teamRoles": [], "uid": "example_id" }, "name": "My Team", "nsnbConfig": { "preference": "auto-approval" }, "orgRootTeamId": "team_nllPyCtREAqxxdyFKbbMDlxd", "parentId": "org_nllPyCtREAqxxdyFKbbMDlxd", "personalAccessTokensInvalidatedAt": "123", "platform": "true", "previewDeploymentSuffix": "example.dev", "remoteCaching": { "enabled": "false" }, "requireVerifiedCommits": "false", "resourceConfig": { "blobStores": "123", "buildEntitlements": { "enhancedBuilds": "false" }, "buildMachine": { "default": "basic" }, "concurrentBuilds": "123", "customEnvironmentsPerProject": "123", "edgeConfigs": "123", "edgeConfigSize": "123", "elasticConcurrencyEnabled": "false", "kvDatabases": "123", "postgresDatabases": "123", "serverlessFunctionMaxMemorySize": "123" }, "saml": { "connection": { "connectedAt": "1611796915677", "lastReceivedWebhookEvent": "1611796915677", "lastSyncedAt": "1611796915677", "state": "active", "syncState": "ACTIVE", "type": "OktaSAML", "status": "string" }, "defaultRedirectUri": "v0.app", "directory": { "connectedAt": "1611796915677", "lastReceivedWebhookEvent": "1611796915677", "lastSyncedAt": "1611796915677", "state": "active", "syncState": "ACTIVE", "type": "OktaSAML" }, "enforced": "false", "roles": "value" }, "sensitiveEnvironmentVariablePolicy": "default", "slug": "my-team", "stagingPrefix": "string", "strictConnectors": { "enabled": "false", "updatedAt": "123" }, "strictDeploymentProtectionSettings": { "enabled": "false", "updatedAt": "123" }, "strictPasswordProtectionSettings": { "enabled": "false", "updatedAt": "123" }, "strictShareableLinks": { "enabled": "false", "updatedAt": "123" }, "updatedAt": "1611796915677"}AuthorizationbearerToken
Default authentication mechanism
application/json
Sensitive environment variable policy: one of on, off or default.
Require production secrets to be in their own environment group: one of on, off or default.
When enabled, all projects in the team require commits to be signed and verified by the git provider before deployments will be created.
Default for projects in the team. When
true, projects in this team will not emit GitHub repository-dispatch events on deployment events unless the project explicitly overrides this setting.Composable deployment-time policy. Each rule type holds a list of rules, one per environment scope.
When enabled, deployment protection settings require stricter permissions (owner-only).
When enabled, adding, changing, or removing project password protection requires Owner role.
Default job configuration applied to new projects created in this team.
200Success
Timestamp (ms) after which API keys created at or before this time are considered invalid for this team.
Timestamp (ms) after which Vercel App tokens created at or before this time are considered invalid for this team.
Default continuous-usage billing kind for projects under this team. Absent means projects stay unmetered.
Default deployment protection for this team null indicates protection is disabled
Default job configuration applied to new projects created in this team.
Composable deployment-time policy for the team. Used as the default for every project on the team, with optional per-project overrides on
project.deploymentPolicy.Pro deployment-storage pricing rollout cohort and milestones. Absent when the team has not been placed in a rollout cohort yet.
Default for projects in the team. When
true, projects in this team will not emit GitHub repository-dispatch events on deployment events unless the project explicitly overrides this setting via project.gitProviderOptions.disableRepositoryDispatchEvents.Require production secrets to use a different value than preview or development.
Hostname that'll be matched with emails on sign-up to automatically join the Team.
Indicates if IP addresses should be accessible in observability (o11y) tooling
Indicates if IP addresses should be accessible in log drains
Timestamp (ms) after which integration tokens created at or before this time are considered invalid for this team.
Property indicating that this Team data contains full information. Limited Team data has
limited: true.Best-effort ID of the organization’s root billing team. When present, compare
orgRootTeamId === id to identify the root team. It may be omitted even when parentId is set if organization resolution fails or the referenced organization is missing. Always omitted for non-organization teams.The organizationId for teams that belong to an organization (set on both the organization's root team and its child teams).
Timestamp (ms) after which personal access tokens created at or before this time are considered invalid for this team.
When enabled, all projects in the team require commits to be signed and verified by the git provider before deployments will be created. Projects may override this via
project.gitProviderOptions.requireVerifiedCommits (gated by Project:Update).When "Single Sign-On (SAML)" is configured, this object contains information regarding the configuration of the Identity Provider (IdP).
When enabled, creating and managing connectors requires Owner role or the ConnectorManager permission.
When enabled, deployment protection settings require stricter permissions (owner-only).
When enabled, adding, changing, or removing project password protection requires Owner role.
400One of the provided values in the request body is invalid.
401The request is not authorized.
402Error
403You do not have permission to access this resource.
Not authorized to update the team. Must be an OWNER.
404Error
409Error
410Error
428Error