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.https://api.vercel.com/v2/teams/{teamId}
const response = await fetch('https://api.vercel.com/v2/teams/teamId?slug=string', { method: 'PATCH', headers: { 'Authorization': 'Bearer YOUR_ACCESS_TOKEN', 'Content-Type': 'application/json', }, body: JSON.stringify({ "avatar": "string", "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", "roles": "value" }, "slug": "my-team", "enablePreviewFeedback": "on", "enableProductionFeedback": "on", "sensitiveEnvironmentVariablePolicy": "on", "disjunctiveProductionSecretPolicy": "on", "remoteCaching": { "enabled": "true" }, "hideIpAddresses": "false", "hideIpAddressesInLogDrains": "false", "dpAccessRequestsMode": "none", "requireVerifiedCommits": "true", "disableRepositoryDispatchEvents": "false", "defaultDeploymentProtection": { "passwordProtection": { "deploymentType": "all", "password": "string" }, "ssoProtection": { "deploymentType": "all" } }, "defaultPassport": { "connectorId": "example_id", "deploymentType": "all" }, "defaultExpirationSettings": { "expiration": "1y", "expirationProduction": "1y", "expirationCanceled": "1y", "expirationErrored": "1y" }, "deploymentPolicy": { "gitSources": [ { "enabled": "true", "environments": [ { "type": "system", "target": "production" } ], "sources": [ { "provider": "github", "org": "string", "repo": "string" } ] } ], "deploymentSources": [ { "enabled": "true", "environments": [ { "type": "system", "target": "production" } ], "sources": [] } ] }, "strictDeploymentProtectionSettings": { "enabled": "true" }, "strictShareableLinks": { "enabled": "true" }, "strictPasswordProtectionSettings": { "enabled": "true" }, "strictConnectors": { "enabled": "true" }, "nsnbConfig": { "preference": "auto-approval" }, "defaultProjectJobs": { "lint": { "targets": [] }, "typecheck": { "targets": [] } }, "resourceConfig": { "buildMachine": { "default": "standard" } } }),});
const data = await response.json();console.log(data);Response
{ "connect": { "enabled": "false" }, "creatorId": "R6efeCJQ2HKXywuasPDc0fOWB", "updatedAt": "1611796915677", "emailDomain": "example.com", "saml": { "connection": { "type": "OktaSAML", "state": "active", "connectedAt": "1611796915677", "lastReceivedWebhookEvent": "1611796915677", "lastSyncedAt": "1611796915677", "syncState": "ACTIVE", "status": "string" }, "directory": { "type": "OktaSAML", "state": "active", "connectedAt": "1611796915677", "lastReceivedWebhookEvent": "1611796915677", "lastSyncedAt": "1611796915677", "syncState": "ACTIVE" }, "enforced": "false", "defaultRedirectUri": "v0.app", "roles": "value" }, "inviteCode": "hasihf9e89", "billing": { "plan": "enterprise" }, "description": "Our mission is to make cloud computing accessible to everyone.", "defaultRoles": { "teamRoles": [], "teamPermissions": [] }, "stagingPrefix": "string", "resourceConfig": { "concurrentBuilds": "123", "elasticConcurrencyEnabled": "false", "edgeConfigSize": "123", "edgeConfigs": "123", "kvDatabases": "123", "blobStores": "123", "postgresDatabases": "123", "customEnvironmentsPerProject": "123", "serverlessFunctionMaxMemorySize": "123", "buildEntitlements": { "enhancedBuilds": "false" }, "buildMachine": { "default": "basic" } }, "previewDeploymentSuffix": "example.dev", "platform": "true", "disableHardAutoBlocks": "123", "remoteCaching": { "enabled": "false" }, "defaultDeploymentProtection": { "passwordProtection": { "deploymentType": "string" }, "ssoProtection": { "deploymentType": "string" } }, "defaultPassport": { "connectorId": "example_id", "deploymentType": "all" }, "defaultExpirationSettings": { "expirationDays": "123", "expirationDaysProduction": "123", "expirationDaysCanceled": "123", "expirationDaysErrored": "123", "deploymentsToKeep": "123" }, "defaultProjectJobs": { "lint": { "targets": [] }, "typecheck": { "targets": [] }, "mfe-config-present": { "targets": [] } }, "enablePreviewFeedback": "default", "enableProductionFeedback": "default", "sensitiveEnvironmentVariablePolicy": "default", "disjunctiveProductionSecretPolicy": "default", "hideIpAddresses": "false", "hideIpAddressesInLogDrains": "false", "dpAccessRequestsMode": "all", "ipBuckets": [ { "bucket": "string", "supportUntil": "123", "default": "false" } ], "requireVerifiedCommits": "false", "disableRepositoryDispatchEvents": "false", "strictDeploymentProtectionSettings": { "enabled": "false", "updatedAt": "123" }, "strictShareableLinks": { "enabled": "false", "updatedAt": "123" }, "strictPasswordProtectionSettings": { "enabled": "false", "updatedAt": "123" }, "strictConnectors": { "enabled": "false", "updatedAt": "123" }, "nsnbConfig": { "preference": "auto-approval" }, "deploymentPolicy": { "gitSources": [ { "sources": [ { "provider": "bitbucket", "org": "string", "repo": "string" } ], "enabled": "false", "environments": [ { "type": "system", "target": "preview" } ] } ], "deploymentSources": [ { "sources": [], "enabled": "false", "environments": [ { "type": "system", "target": "preview" } ] } ] }, "personalAccessTokensInvalidatedAt": "123", "appTokensInvalidatedAt": "123", "apiKeysInvalidatedAt": "123", "integrationTokensInvalidatedAt": "123", "id": "team_nllPyCtREAqxxdyFKbbMDlxd", "slug": "my-team", "name": "My Team", "avatar": "6eb07268bcfadd309905ffb1579354084c24655c", "membership": { "uid": "example_id", "entitlements": [ { "entitlement": "string" } ], "teamId": "example_id", "confirmed": "true", "accessRequestedAt": "123", "role": "BILLING", "teamRoles": [], "teamPermissions": [], "createdAt": "123", "created": "123", "joinedFrom": { "origin": "account-update", "commitId": "example_id", "repoId": "example_id", "repoPath": "string", "gitUserId": "example_id", "gitUserLogin": "string", "ssoUserId": "example_id", "ssoConnectedAt": "123", "idpUserId": "example_id", "dsyncUserId": "example_id", "dsyncConnectedAt": "123" } }, "createdAt": "1630748523395", "parentId": "org_nllPyCtREAqxxdyFKbbMDlxd", "orgRootTeamId": "team_nllPyCtREAqxxdyFKbbMDlxd"}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
Hostname that'll be matched with emails on sign-up to automatically join the Team.
When "Single Sign-On (SAML)" is configured, this object contains information regarding the configuration of the Identity Provider (IdP).
Default deployment protection for this team null indicates protection is disabled
Default job configuration applied to new projects created in this team.
Require production secrets to use a different value than preview or development.
Indicates if IP addresses should be accessible in observability (o11y) tooling
Indicates if IP addresses should be accessible in log drains
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).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.When enabled, deployment protection settings require stricter permissions (owner-only).
When enabled, adding, changing, or removing project password protection requires Owner role.
When enabled, creating and managing connectors requires Owner role or the ConnectorManager permission.
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.Timestamp (ms) after which personal access tokens 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.
Timestamp (ms) after which API keys created at or before this time are considered invalid for this team.
Timestamp (ms) after which integration tokens created at or before this time are considered invalid for this team.
The organizationId for teams that belong to an organization (set on both the organization's root team and its child teams).
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.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.
410Error
428Owner does not have protection add-on