Skip to main content
PATCH
/
v1
/
data-cache
/
projects
/
{projectId}
updateProjectDataCache
import { Vercel } from "@vercel/sdk";  const vercel = new Vercel({  bearerToken: "<YOUR_BEARER_TOKEN_HERE>", });  async function run() {  const result = await vercel.projects.updateProjectDataCache({  projectId: "prj_12HKQaOmR5t5Uy6vdcQsNIiZgHGB",  teamId: "team_1a2b3c4d5e6f7g8h9i0j1k2l",  slug: "my-team-url-slug",  requestBody: {  disabled: true,  },  });   console.log(result); }  run();
{  "accountId": "<string>",  "analytics": {  "id": "<string>",  "canceledAt": 123,  "disabledAt": 123,  "enabledAt": 123,  "paidAt": 123,  "sampleRatePercent": 123,  "spendLimitInDollars": 123  },  "speedInsights": {  "id": "<string>",  "enabledAt": 123,  "disabledAt": 123,  "canceledAt": 123,  "hasData": true,  "paidAt": 123  },  "autoExposeSystemEnvs": true,  "autoAssignCustomDomains": true,  "autoAssignCustomDomainsUpdatedBy": "<string>",  "buildCommand": "<string>",  "commandForIgnoringBuildStep": "<string>",  "connectConfigurations": [  {  "envId": "<string>",  "connectConfigurationId": "<string>",  "dc": "<string>",  "passive": true,  "buildsEnabled": true,  "aws": {  "subnetIds": [  "<string>"  ],  "securityGroupId": "<string>"  },  "createdAt": 123,  "updatedAt": 123  }  ],  "connectConfigurationId": "<string>",  "connectBuildsEnabled": true,  "passiveConnectConfigurationId": "<string>",  "createdAt": 123,  "customerSupportCodeVisibility": true,  "crons": {  "enabledAt": 123,  "disabledAt": 123,  "updatedAt": 123,  "deploymentId": "<string>",  "definitions": [  {  "host": "vercel.com",  "path": "/api/crons/sync-something?hello=world",  "schedule": "0 0 * * *"  }  ]  },  "dataCache": {  "userDisabled": true,  "storageSizeBytes": 123,  "unlimited": true  },  "deploymentExpiration": {  "expirationDays": 123,  "expirationDaysProduction": 123,  "expirationDaysCanceled": 123,  "expirationDaysErrored": 123,  "deploymentsToKeep": 123  },  "devCommand": "<string>",  "directoryListing": true,  "installCommand": "<string>",  "env": [  {  "target": [  "production"  ],  "type": "secret",  "sunsetSecretId": "<string>",  "decrypted": true,  "value": "<string>",  "vsmValue": "<string>",  "id": "<string>",  "key": "<string>",  "configurationId": "<string>",  "createdAt": 123,  "updatedAt": 123,  "createdBy": "<string>",  "updatedBy": "<string>",  "gitBranch": "<string>",  "edgeConfigId": "<string>",  "edgeConfigTokenId": "<string>",  "contentHint": {  "type": "redis-url",  "storeId": "<string>"  },  "internalContentHint": {  "type": "flags-secret",  "encryptedValue": "<string>"  },  "comment": "<string>",  "customEnvironmentIds": [  "<string>"  ]  }  ],  "customEnvironments": [  {  "id": "<string>",  "slug": "<string>",  "type": "preview",  "description": "<string>",  "branchMatcher": {  "type": "endsWith",  "pattern": "<string>"  },  "domains": [  {  "name": "<string>",  "apexName": "<string>",  "projectId": "<string>",  "redirect": "<string>",  "redirectStatusCode": 307,  "gitBranch": "<string>",  "customEnvironmentId": "<string>",  "updatedAt": 123,  "createdAt": 123,  "verified": true,  "verification": [  {  "type": "<string>",  "domain": "<string>",  "value": "<string>",  "reason": "<string>"  }  ]  }  ],  "currentDeploymentAliases": [  "<string>"  ],  "createdAt": 123,  "updatedAt": 123  }  ],  "framework": "blitzjs",  "gitForkProtection": true,  "gitLFS": true,  "id": "<string>",  "ipBuckets": [  {  "bucket": "<string>",  "supportUntil": 123  }  ],  "latestDeployments": [  {  "id": "<string>",  "alias": [  "<string>"  ],  "aliasAssigned": 123,  "aliasError": {  "code": "<string>",  "message": "<string>"  },  "aliasFinal": "<string>",  "automaticAliases": [  "<string>"  ],  "branchMatcher": {  "type": "endsWith",  "pattern": "<string>"  },  "buildingAt": 123,  "builds": [  {  "use": "<string>",  "src": "<string>",  "dest": "<string>"  }  ],  "checksConclusion": "succeeded",  "checksState": "registered",  "connectBuildsEnabled": true,  "connectConfigurationId": "<string>",  "createdAt": 123,  "createdIn": "<string>",  "creator": {  "email": "<string>",  "githubLogin": "<string>",  "gitlabLogin": "<string>",  "uid": "<string>",  "username": "<string>"  },  "deletedAt": 123,  "deploymentHostname": "<string>",  "forced": true,  "name": "<string>",  "meta": {},  "monorepoManager": "<string>",  "oidcTokenClaims": {  "iss": "<string>",  "sub": "<string>",  "scope": "<string>",  "aud": "<string>",  "owner": "<string>",  "owner_id": "<string>",  "project": "<string>",  "project_id": "<string>",  "environment": "<string>"  },  "plan": "pro",  "previewCommentsEnabled": false,  "private": true,  "readyAt": 123,  "readyState": "BUILDING",  "readySubstate": "STAGED",  "requestedAt": 123,  "target": "<string>",  "teamId": "<string>",  "type": "LAMBDAS",  "url": "<string>",  "userId": "<string>",  "withCache": true  }  ],  "link": {  "org": "<string>",  "repoOwnerId": 123,  "repo": "<string>",  "repoId": 123,  "type": "github",  "createdAt": 123,  "deployHooks": [  {  "createdAt": 123,  "id": "<string>",  "name": "<string>",  "ref": "<string>",  "url": "<string>"  }  ],  "gitCredentialId": "<string>",  "updatedAt": 123,  "sourceless": true,  "productionBranch": "<string>"  },  "microfrontends": {  "updatedAt": 123,  "groupIds": [  "<string>"  ],  "enabled": true,  "isDefaultApp": true,  "defaultRoute": "<string>",  "routeObservabilityToThisProject": true  },  "name": "<string>",  "nodeVersion": "22.x",  "optionsAllowlist": {  "paths": [  {  "value": "<string>"  }  ]  },  "outputDirectory": "<string>",  "passwordProtection": {},  "productionDeploymentsFastLane": true,  "publicSource": true,  "resourceConfig": {  "fluid": true,  "functionDefaultRegions": [  "<string>"  ],  "functionDefaultTimeout": 123,  "functionDefaultMemoryType": "standard_legacy",  "functionZeroConfigFailover": true,  "elasticConcurrencyEnabled": true,  "buildMachineType": "enhanced",  "isNSNBDisabled": true  },  "rollbackDescription": {  "userId": "<string>",  "username": "<string>",  "description": "<string>",  "createdAt": 123  },  "rollingRelease": {  "target": "production",  "stages": [  {  "targetPercentage": 25,  "requireApproval": false,  "duration": 600,  "linearShift": false  }  ],  "canaryResponseHeader": false  },  "defaultResourceConfig": {  "fluid": true,  "functionDefaultRegions": [  "<string>"  ],  "functionDefaultTimeout": 123,  "functionDefaultMemoryType": "standard_legacy",  "functionZeroConfigFailover": true,  "elasticConcurrencyEnabled": true,  "buildMachineType": "enhanced",  "isNSNBDisabled": true  },  "rootDirectory": "<string>",  "serverlessFunctionZeroConfigFailover": true,  "skewProtectionBoundaryAt": 123,  "skewProtectionMaxAge": 123,  "skipGitConnectDuringLink": true,  "sourceFilesOutsideRootDirectory": true,  "enableAffectedProjectsDeployments": true,  "ssoProtection": {  "deploymentType": "preview"  },  "targets": {},  "transferCompletedAt": 123,  "transferStartedAt": 123,  "transferToAccountId": "<string>",  "transferredFromAccountId": "<string>",  "updatedAt": 123,  "live": true,  "enablePreviewFeedback": true,  "enableProductionFeedback": true,  "permissions": {  "oauth2Connection": [  "create"  ],  "user": [  "create"  ],  "userConnection": [  "create"  ],  "userSudo": [  "create"  ],  "webAuthn": [  "create"  ],  "accessGroup": [  "create"  ],  "aliasGlobal": [  "create"  ],  "analyticsSampling": [  "create"  ],  "analyticsUsage": [  "create"  ],  "auditLog": [  "create"  ],  "billingAddress": [  "create"  ],  "billingInformation": [  "create"  ],  "billingInvoice": [  "create"  ],  "billingInvoiceEmailRecipient": [  "create"  ],  "billingInvoiceLanguage": [  "create"  ],  "billingPlan": [  "create"  ],  "billingPurchaseOrder": [  "create"  ],  "billingRefund": [  "create"  ],  "billingTaxId": [  "create"  ],  "blob": [  "create"  ],  "budget": [  "create"  ],  "cacheArtifact": [  "create"  ],  "cacheArtifactUsageEvent": [  "create"  ],  "codeChecks": [  "create"  ],  "concurrentBuilds": [  "create"  ],  "connect": [  "create"  ],  "connectConfiguration": [  "create"  ],  "defaultDeploymentProtection": [  "create"  ],  "domain": [  "create"  ],  "domainAcceptDelegation": [  "create"  ],  "domainAuthCodes": [  "create"  ],  "domainCertificate": [  "create"  ],  "domainCheckConfig": [  "create"  ],  "domainMove": [  "create"  ],  "domainPurchase": [  "create"  ],  "domainRecord": [  "create"  ],  "domainTransferIn": [  "create"  ],  "event": [  "create"  ],  "ownEvent": [  "create"  ],  "sensitiveEnvironmentVariablePolicy": [  "create"  ],  "fileUpload": [  "create"  ],  "flagsExplorerSubscription": [  "create"  ],  "gitRepository": [  "create"  ],  "ipBlocking": [  "create"  ],  "imageOptimizationNewPrice": [  "create"  ],  "integration": [  "create"  ],  "integrationAccount": [  "create"  ],  "integrationConfiguration": [  "create"  ],  "integrationConfigurationTransfer": [  "create"  ],  "integrationConfigurationProjects": [  "create"  ],  "integrationVercelConfigurationOverride": [  "create"  ],  "integrationConfigurationRole": [  "create"  ],  "integrationSSOSession": [  "create"  ],  "integrationResource": [  "create"  ],  "integrationEvent": [  "create"  ],  "integrationResourceSecrets": [  "create"  ],  "integrationDeploymentAction": [  "create"  ],  "marketplaceInstallationMember": [  "create"  ],  "marketplaceBillingData": [  "create"  ],  "marketplaceInvoice": [  "create"  ],  "marketplaceSettings": [  "create"  ],  "marketplaceExperimentationItem": [  "create"  ],  "marketplaceExperimentationEdgeConfigData": [  "create"  ],  "jobGlobal": [  "create"  ],  "drain": [  "create"  ],  "logDrain": [  "create"  ],  "Monitoring": [  "create"  ],  "monitoringSettings": [  "create"  ],  "monitoringQuery": [  "create"  ],  "monitoringChart": [  "create"  ],  "monitoringAlert": [  "create"  ],  "notificationDeploymentFailed": [  "create"  ],  "notificationDomainConfiguration": [  "create"  ],  "notificationDomainExpire": [  "create"  ],  "notificationDomainMoved": [  "create"  ],  "notificationDomainPurchase": [  "create"  ],  "notificationDomainRenewal": [  "create"  ],  "notificationDomainTransfer": [  "create"  ],  "notificationDomainUnverified": [  "create"  ],  "NotificationMonitoringAlert": [  "create"  ],  "notificationPaymentFailed": [  "create"  ],  "notificationUsageAlert": [  "create"  ],  "notificationPreferences": [  "create"  ],  "notificationCustomerBudget": [  "create"  ],  "notificationStatementOfReasons": [  "create"  ],  "observabilityConfiguration": [  "create"  ],  "alerts": [  "create"  ],  "observabilityNotebook": [  "create"  ],  "observabilityFunnel": [  "create"  ],  "openTelemetryEndpoint": [  "create"  ],  "vercelAppInstallation": [  "create"  ],  "vercelAppInstallationRequest": [  "create"  ],  "paymentMethod": [  "create"  ],  "permissions": [  "create"  ],  "postgres": [  "create"  ],  "previewDeploymentSuffix": [  "create"  ],  "proTrialOnboarding": [  "create"  ],  "sharedEnvVars": [  "create"  ],  "sharedEnvVarsProduction": [  "create"  ],  "space": [  "create"  ],  "spaceRun": [  "create"  ],  "passwordProtectionInvoiceItem": [  "create"  ],  "rateLimit": [  "create"  ],  "redis": [  "create"  ],  "repository": [  "create"  ],  "remoteCaching": [  "create"  ],  "samlConfig": [  "create"  ],  "secret": [  "create"  ],  "redisStoreTokenSet": [  "create"  ],  "blobStoreTokenSet": [  "create"  ],  "postgresStoreTokenSet": [  "create"  ],  "integrationStoreTokenSet": [  "create"  ],  "integrationResourceReplCommand": [  "create"  ],  "storeTransfer": [  "create"  ],  "supportCase": [  "create"  ],  "supportCaseComment": [  "create"  ],  "dataCacheBillingSettings": [  "create"  ],  "team": [  "create"  ],  "teamAccessRequest": [  "create"  ],  "teamFellowMembership": [  "create"  ],  "teamGitExclusivity": [  "create"  ],  "teamInvite": [  "create"  ],  "teamInviteCode": [  "create"  ],  "teamJoin": [  "create"  ],  "teamMemberMfaStatus": [  "create"  ],  "teamMicrofrontends": [  "create"  ],  "teamOwnMembership": [  "create"  ],  "teamOwnMembershipDisconnectSAML": [  "create"  ],  "token": [  "create"  ],  "usage": [  "create"  ],  "usageCycle": [  "create"  ],  "vpcPeeringConnection": [  "create"  ],  "webAnalyticsPlan": [  "create"  ],  "edgeConfig": [  "create"  ],  "edgeConfigItem": [  "create"  ],  "edgeConfigSchema": [  "create"  ],  "edgeConfigToken": [  "create"  ],  "webhook": [  "create"  ],  "webhook-event": [  "create"  ],  "endpointVerification": [  "create"  ],  "projectTransferIn": [  "create"  ],  "oauth2Application": [  "create"  ],  "vercelRun": [  "create"  ],  "vercelRunExec": [  "create"  ],  "apiKey": [  "create"  ],  "apiKeyOwnedBySelf": [  "create"  ],  "apiKeyAiGateway": [  "create"  ],  "aliasProject": [  "create"  ],  "aliasProtectionBypass": [  "create"  ],  "buildMachine": [  "create"  ],  "productionAliasProtectionBypass": [  "create"  ],  "connectConfigurationLink": [  "create"  ],  "dataCacheNamespace": [  "create"  ],  "deployment": [  "create"  ],  "deploymentBuildLogs": [  "create"  ],  "deploymentCheck": [  "create"  ],  "deploymentCheckPreview": [  "create"  ],  "deploymentCheckReRunFromProductionBranch": [  "create"  ],  "deploymentProductionGit": [  "create"  ],  "deploymentV0": [  "create"  ],  "deploymentPreview": [  "create"  ],  "deploymentPrivate": [  "create"  ],  "deploymentPromote": [  "create"  ],  "deploymentRollback": [  "create"  ],  "edgeCacheNamespace": [  "create"  ],  "environments": [  "create"  ],  "logs": [  "create"  ],  "logsPreset": [  "create"  ],  "passwordProtection": [  "create"  ],  "optionsAllowlist": [  "create"  ],  "job": [  "create"  ],  "observabilityData": [  "create"  ],  "onDemandBuild": [  "create"  ],  "onDemandConcurrency": [  "create"  ],  "project": [  "create"  ],  "projectFromV0": [  "create"  ],  "projectAccessGroup": [  "create"  ],  "projectAnalyticsSampling": [  "create"  ],  "projectCheck": [  "create"  ],  "projectCheckRun": [  "create"  ],  "projectDeploymentHook": [  "create"  ],  "projectDomain": [  "create"  ],  "projectDomainMove": [  "create"  ],  "projectDomainCheckConfig": [  "create"  ],  "projectEnvVars": [  "create"  ],  "projectEnvVarsProduction": [  "create"  ],  "projectEnvVarsUnownedByIntegration": [  "create"  ],  "projectFlags": [  "create"  ],  "projectId": [  "create"  ],  "projectIntegrationConfiguration": [  "create"  ],  "projectLink": [  "create"  ],  "projectMember": [  "create"  ],  "projectMonitoring": [  "create"  ],  "projectPermissions": [  "create"  ],  "projectProductionBranch": [  "create"  ],  "projectTransfer": [  "create"  ],  "projectTransferOut": [  "create"  ],  "projectProtectionBypass": [  "create"  ],  "projectUsage": [  "create"  ],  "projectAnalyticsUsage": [  "create"  ],  "projectSupportCase": [  "create"  ],  "projectSupportCaseComment": [  "create"  ],  "projectDeploymentExpiration": [  "create"  ],  "projectRollingRelease": [  "create"  ],  "projectTier": [  "create"  ],  "projectOIDCToken": [  "create"  ],  "seawallConfig": [  "create"  ],  "skewProtection": [  "create"  ],  "analytics": [  "create"  ],  "trustedIps": [  "create"  ],  "v0Chat": [  "create"  ],  "webAnalytics": [  "create"  ],  "sharedEnvVarConnection": [  "create"  ],  "sonar": [  "create"  ]  },  "lastRollbackTarget": {},  "lastAliasRequest": {  "fromDeploymentId": "<string>",  "toDeploymentId": "<string>",  "fromRollingReleaseId": "<string>",  "jobStatus": "succeeded",  "requestedAt": 123,  "type": "promote"  },  "protectionBypass": {},  "hasActiveBranches": true,  "trustedIps": {  "deploymentType": "preview",  "addresses": [  {  "value": "<string>",  "note": "<string>"  }  ],  "protectionMode": "additional"  },  "gitComments": {  "onPullRequest": true,  "onCommit": true  },  "gitProviderOptions": {  "createDeployments": "enabled",  "disableRepositoryDispatchEvents": true  },  "paused": true,  "concurrencyBucketName": "<string>",  "webAnalytics": {  "id": "<string>",  "disabledAt": 123,  "canceledAt": 123,  "enabledAt": 123,  "hasData": true  },  "security": {  "attackModeEnabled": true,  "attackModeUpdatedAt": 123,  "firewallEnabled": true,  "firewallUpdatedAt": 123,  "attackModeActiveUntil": 123,  "firewallConfigVersion": 123,  "firewallSeawallEnabled": true,  "ja3Enabled": true,  "ja4Enabled": true,  "firewallBypassIps": [  "<string>"  ],  "managedRules": {  "bot_filter": {  "active": true,  "action": "log"  },  "ai_bots": {  "active": true,  "action": "log"  },  "owasp": {  "active": true,  "action": "log"  }  },  "botIdEnabled": true  },  "oidcTokenConfig": {  "enabled": true,  "issuerMode": "team"  },  "tier": "standard",  "features": {  "webAnalytics": true  },  "v0": true,  "abuse": {  "scanner": "<string>",  "history": [  {  "scanner": "<string>",  "reason": "<string>",  "by": "<string>",  "byId": "<string>",  "at": 123  }  ],  "updatedAt": 123,  "block": {  "action": "blocked",  "reason": "<string>",  "statusCode": 123,  "createdAt": 123,  "caseId": "<string>",  "actor": "<string>",  "comment": "<string>",  "isCascading": true  },  "blockHistory": [  {  "action": "blocked",  "reason": "<string>",  "statusCode": 123,  "createdAt": 123,  "caseId": "<string>",  "actor": "<string>",  "comment": "<string>",  "isCascading": true  }  ]  },  "internalRoutes": [  {  "src": "<string>",  "status": 123  }  ] }

Authorizations

Authorization
string
header
required

Default authentication mechanism

Path Parameters

projectId
string
required

The unique project identifier

Example:

"prj_12HKQaOmR5t5Uy6vdcQsNIiZgHGB"

Query Parameters

teamId
string

The Team identifier to perform the request on behalf of.

Example:

"team_1a2b3c4d5e6f7g8h9i0j1k2l"

slug
string

The Team slug to perform the request on behalf of.

Example:

"my-team-url-slug"

Body

application/json
disabled
boolean

Enable or disable data cache for the project - default: false

Example:

true

Response

accountId
string
required
directoryListing
boolean
required
id
string
required
name
string
required
nodeVersion
enum<string>
required
Available options:
22.x,
20.x,
18.x,
16.x,
14.x,
12.x,
10.x,
8.10.x
resourceConfig
object
required
defaultResourceConfig
object
required
analytics
object
speedInsights
object
autoExposeSystemEnvs
boolean
autoAssignCustomDomains
boolean
autoAssignCustomDomainsUpdatedBy
string
buildCommand
string | null
commandForIgnoringBuildStep
string | null
connectConfigurations
object[] | null
connectConfigurationId
string | null
connectBuildsEnabled
boolean
passiveConnectConfigurationId
string | null
createdAt
number
customerSupportCodeVisibility
boolean
crons
object
dataCache
object
deploymentExpiration
object | null

Retention policies for deployments. These are enforced at the project level, but we also maintain an instance of this at the team level as a default policy that gets applied to new projects.

devCommand
string | null
installCommand
string | null
env
object[]
customEnvironments
object[]
framework
enum<string> | null
Available options:
blitzjs,
nextjs,
gatsby,
remix,
react-router,
astro,
hexo,
eleventy,
docusaurus-2,
docusaurus,
preact,
solidstart-1,
solidstart,
dojo,
ember,
vue,
scully,
ionic-angular,
angular,
polymer,
svelte,
sveltekit,
sveltekit-1,
ionic-react,
create-react-app,
gridsome,
umijs,
sapper,
saber,
stencil,
nuxtjs,
redwoodjs,
hugo,
jekyll,
brunch,
middleman,
zola,
hydrogen,
vite,
vitepress,
vuepress,
parcel,
fastapi,
fasthtml,
sanity-v3,
sanity,
storybook,
nitro,
hono,
express,
h3,
nestjs,
xmcp
gitForkProtection
boolean
gitLFS
boolean
ipBuckets
object[]
latestDeployments
object[]
  • Option 1
  • Option 2
  • Option 3
  • Option 4
  • Option 5
microfrontends
object
  • Option 1
  • Option 2
optionsAllowlist
object | null
outputDirectory
string | null
passwordProtection
object | null
productionDeploymentsFastLane
boolean
publicSource
boolean | null
rollbackDescription
object

Description of why a project was rolled back, and by whom. Note that lastAliasRequest contains the from/to details of the rollback.

rollingRelease
object | null

Project-level rolling release configuration that defines how deployments should be gradually rolled out

rootDirectory
string | null
serverlessFunctionZeroConfigFailover
boolean
skewProtectionBoundaryAt
number
skewProtectionMaxAge
number
sourceFilesOutsideRootDirectory
boolean
enableAffectedProjectsDeployments
boolean
ssoProtection
object | null
targets
object
transferCompletedAt
number
transferStartedAt
number
transferToAccountId
string
transferredFromAccountId
string
updatedAt
number
live
boolean
enablePreviewFeedback
boolean | null
enableProductionFeedback
boolean | null
permissions
object
lastRollbackTarget
object | null
lastAliasRequest
object | null
protectionBypass
object
hasActiveBranches
boolean
trustedIps
object
  • Option 1
  • Option 2
gitComments
object
gitProviderOptions
object
paused
boolean
concurrencyBucketName
string
webAnalytics
object
security
object
oidcTokenConfig
object
tier
enum<string>
Available options:
standard,
advanced,
critical
features
object
v0
boolean
abuse
object
internalRoutes
object[]
  • Option 1
  • Option 2
⌘I