Develop. Preview. Ship.
The @vercel/sdk is a type-safe Typescript SDK that gives you full control over the entire Vercel platform through the Vercel REST API.
The SDK can be installed with either npm, pnpm, bun or yarn package managers.
npm add @vercel/sdk
pnpm add @vercel/sdk
bun add @vercel/sdk
yarn add @vercel/sdk
[!NOTE] This package is published as an ES Module (ESM) only. For applications using CommonJS, use
await import("@vercel/sdk")to import and use this package.
For supported JavaScript runtimes, please consult RUNTIMES.md.
You need to pass a valid access token to be able to use any resource or operation. Refer to Creating an Access Token to learn how to create one. Make sure that you create a token with the correct Vercel scope. If you face permission (403) errors when you are already sending a token, it can be one of the following problems:
This SDK supports the following security scheme globally:
| Name | Type | Scheme |
|---|---|---|
bearerToken | http | HTTP Bearer |
To authenticate with the API the bearerToken parameter must be set when initializing the SDK client instance. For example:
import { Vercel } from "@vercel/sdk";
const vercel = new Vercel({
bearerToken: "<YOUR_BEARER_TOKEN_HERE>",
});
async function run() {
const result = await vercel.replaceDomainsByDomainRecords({
domain: "example.com",
});
console.log(result);
}
run();
Update the fields of a project using either its name or id.
import { Vercel } from "@vercel/sdk";
const vercel = new Vercel({
bearerToken: "<YOUR_BEARER_TOKEN_HERE>",
});
async function run() {
const result = await vercel.projects.updateProject({
idOrName: "prj_12HKQaOmR5t5Uy6vdcQsNIiZgHGB",
teamId: "team_1a2b3c4d5e6f7g8h9i0j1k2l",
slug: "my-team-url-slug",
requestBody: {
name: "a-project-name",
sandbox: {
region: "iad1",
failoverRegions: [
"sfo1",
"cle1",
],
},
},
});
console.log(result);
}
run();
id (deprecated)All the methods listed above are available as standalone functions. These functions are ideal for use in applications running in the browser, serverless runtimes or other environments where application bundle size is a primary concern. When using a bundler to build your application, all unused functionality will be either excluded from the final bundle or tree-shaken away.
To read more about standalone functions, check FUNCTIONS.md.
accessGroupsCreateAccessGroup - Creates an access groupaccessGroupsCreateAccessGroupProject - Create an access group projectaccessGroupsDeleteAccessGroup - Deletes an access groupaccessGroupsDeleteAccessGroupProject - Delete an access group projectaccessGroupsListAccessGroupMembers - List members of an access groupaccessGroupsListAccessGroupProjects - List projects of an access groupaccessGroupsListAccessGroups - List access groups for a team, project or memberaccessGroupsReadAccessGroup - Reads an access groupaccessGroupsReadAccessGroupProject - Reads an access group projectaccessGroupsUpdateAccessGroup - Update an access groupaccessGroupsUpdateAccessGroupProject - Update an access group projectaiGatewayCreateAiGatewayRule - Create ruleaiGatewayDeleteAiGatewayRule - Delete ruleaiGatewayListAiGatewayRules - List rulesaiGatewayUpdateAiGatewayRule - Update rulealiasesAssignAlias - Assign an AliasaliasesDeleteAlias - Delete an AliasaliasesGetAlias - Get an AliasaliasesListAliases - List aliasesaliasesListDeploymentAliases - List Deployment AliasesaliasesPatchUrlProtectionBypass - Update the protection bypass for a URLapiAiGatewayCreateAiGatewayVirtualModelConfig - Create virtual model configapiAiGatewayDeleteAiGatewayVirtualModelConfig - Delete virtual model configapiAiGatewayGetAiGatewayVirtualModelConfig - Get virtual model configapiAiGatewayListAiGatewayVirtualModelConfigs - List virtual model configsapiAiGatewayUpdateAiGatewayVirtualModelConfig - Update virtual model configartifactsArtifactExists - Check if a cache artifact existsartifactsArtifactQuery - Query information about an artifactartifactsDeleteAllArtifacts - Delete all cache artifactsartifactsDownloadArtifact - Download a cache artifactartifactsRecordEvents - Record an artifacts cache usage eventartifactsStatus - Get status of Remote Caching for this principalartifactsUploadArtifact - Upload a cache artifactauthenticationCreateAuthToken - Create an Auth TokenauthenticationDeleteAuthToken - Delete an authentication tokenauthenticationGetAuthToken - Get Auth Token MetadataauthenticationListAuthTokens - List Auth TokensbillingBuyCredits - Purchase creditsbulkRedirectsDeleteRedirects - Delete project-level redirects.bulkRedirectsEditRedirect - Edit a project-level redirect.bulkRedirectsGetRedirects - Gets project-level redirects.bulkRedirectsGetVersions - Get the version history for a project's redirects.bulkRedirectsRestoreRedirects - Restore staged project-level redirects to their production version.bulkRedirectsStageRedirects - Stages new redirects for a project.bulkRedirectsUpdateVersion - Promote a staging version to production or restore a previous production version.certsGetCertById - Get cert by idcertsGetCerts - Get certscertsIssueCert - Issue a new certcertsRemoveCert - Remove certcertsUploadCert - Upload a certchecksV2CreateDeploymentCheckRun - Create a check runchecksV2CreateProjectCheck - Create a checkchecksV2DeleteProjectCheck - Delete a checkchecksV2GetDeploymentCheckRun - Get a check runchecksV2GetProjectCheck - Get a checkchecksV2ListCheckRuns - List runs for a checkchecksV2ListDeploymentCheckRuns - List check runs for a deploymentchecksV2ListProjectChecks - List all checks for a projectchecksV2UpdateDeploymentCheckRun - Update a check runchecksV2UpdateProjectCheck - Update a checkconnectCreateConnector - Create a connectorconnectDeleteConnector - Delete a connectorconnectDeleteConnectorProjectConnection - Disconnect a connector from a projectconnectGetConnector - Get a connectorconnectGetConnectorProjectConnection - Get a connector project connectionconnectListConnectorProjectConnections - List projects for a connectorconnectListConnectors - List connectorsconnectListProjectConnectorConnections - List connectors for a projectconnectReplaceConnectorTriggerDestinations - Update connector trigger destinationsconnectUpdateConnector - Update a connectorconnectUpsertConnectorProjectConnection - Create or update a connector project connectioncreateApiKeyscreateObservabilityQuerycreateSpeedInsightsTogglecreateWebInsightsToggledeploymentsCancelDeployment - Cancel a deploymentdeploymentsCreateDeployment - Create a new deploymentdeploymentsDeleteDeployment - Delete a DeploymentdeploymentsGetDeployment - Get a deployment by ID or URLdeploymentsGetDeploymentEvents - Get deployment eventsdeploymentsGetDeploymentFileContents - Get Deployment File ContentsdeploymentsGetDeployments - List deploymentsdeploymentsListDeploymentFiles - List Deployment FilesdeploymentsUpdateIntegrationDeploymentAction - Update deployment integration actiondeploymentsUpdateIntegrationDeploymentAction - Update deployment integration actiondeploymentsUploadFile - Upload Deployment FilesdnsCreateRecord - Create a DNS recorddnsGetRecords - List existing DNS recordsdnsRemoveRecord - Delete a DNS recorddnsUpdateRecord - Update an existing DNS recorddomainsClaimDomainOwnership - Claim Domain OwnershipdomainsCreateOrTransferDomain - Add an existing domain to the Vercel platformdomainsDeleteDomain - Remove a domain by namedomainsGetDomain - Get Information for a Single DomaindomainsGetDomainConfig - Get a Domain's configurationdomainsGetDomainProjectDomains - List Project Domains by Apex DomaindomainsGetDomains - List all the domainsdomainsGetDomainVerificationRecord - Get Domain Verification RecorddomainsPatchDomain - Update or move apex domaindomainsRegistrarBuyDomains - Buy multiple domainsdomainsRegistrarBuySingleDomain - Buy a domaindomainsRegistrarGetBulkAvailability - Get availability for multiple domainsdomainsRegistrarGetContactInfoSchema - Get contact info schemadomainsRegistrarGetDomainAuthCode - Get the auth code for a domaindomainsRegistrarGetDomainAvailability - Get availability for a domaindomainsRegistrarGetDomainContactVerification - Get contact verification status for a domaindomainsRegistrarGetDomainPrice - Get price data for a domaindomainsRegistrarGetDomainTransferIn - Get a domain's transfer statusdomainsRegistrarGetOrder - Get a domain orderdomainsRegistrarGetSupportedTlds - Get supported TLDsdomainsRegistrarGetTld - Get TLDdomainsRegistrarGetTldPrice - Get TLD price datadomainsRegistrarRenewDomain - Renew a domaindomainsRegistrarTransferInDomain - Transfer-in a domaindomainsRegistrarUpdateDomainAutoRenew - Update auto-renew for a domaindomainsRegistrarUpdateDomainNameservers - Update nameservers for a domaindrainsCreateDrain - Create a new DraindrainsDeleteDrain - Delete a draindrainsGetDrain - Find a Drain by iddrainsGetDrains - Retrieve a list of all DrainsdrainsTestDrain - Validate Drain delivery configurationdrainsUpdateDrain - Update an existing DrainedgeCacheDangerouslyDeleteBySrcImages - Dangerously delete by source imageedgeCacheDangerouslyDeleteByTags - Dangerously delete by tagedgeCacheInvalidateBySrcImages - Invalidate by source imageedgeCacheInvalidateByTags - Invalidate by tagenvironmentCreateCustomEnvironment - Create a custom environment for the current project.environmentCreateSharedEnvVariable - Create one or more shared environment variablesenvironmentDeleteSharedEnvVariable - Delete one or more Env VarenvironmentGetCustomEnvironment - Retrieve a custom environmentenvironmentGetProjectsByIdOrNameCustomEnvironments - Retrieve custom environmentsenvironmentGetSharedEnvVar - Retrieve the decrypted value of a Shared Environment Variable by id.environmentListSharedEnvVariable - Lists all Shared Environment Variables for a teamenvironmentRemoveCustomEnvironment - Remove a custom environmentenvironmentUnlinkSharedEnvVariable - Disconnects a shared environment variable for a given projectenvironmentUpdateCustomEnvironment - Update a custom environmentenvironmentUpdateSharedEnvVariable - Updates one or more shared environment variablesfeatureFlagsCreateFlag - Create a flagfeatureFlagsCreateFlagSegment - Create a segmentfeatureFlagsCreateSDKKey - Create an SDK keyfeatureFlagsDeleteFlag - Delete a flagfeatureFlagsDeleteFlagSegment - Delete a segmentfeatureFlagsDeleteSDKKey - Delete an SDK keyfeatureFlagsGetDeploymentFeatureFlags - Retrieve the feature flags of a deploymentfeatureFlagsGetFlag - Get a flagfeatureFlagsGetFlagSegment - Get a segmentfeatureFlagsGetFlagSettings - Get project flag settingsfeatureFlagsGetSDKKeys - Get all SDK keysfeatureFlagsListFlags - List flagsfeatureFlagsListFlagSegments - List segmentsfeatureFlagsListFlagsV2 - List flagsfeatureFlagsListFlagVersions - List flag versionsfeatureFlagsListTeamFlags - List all flags for a teamfeatureFlagsListTeamFlagSettings - List team project flag settingsfeatureFlagsListTeamFlagsV2 - List all flags for a teamfeatureFlagsUpdateFlag - Update a flagfeatureFlagsUpdateFlagSegment - Update a segmentfeatureFlagsUpdateFlagSettings - Update project flag settingsgetDomainsRecordsByRecordIdgetObservabilitySchemagetObservabilitySchemaByMetricIdglobalConfigCreateEdgeConfig - Create a Global ConfigglobalConfigCreateEdgeConfigToken - Create a Global Config tokenglobalConfigDeleteEdgeConfig - Delete a Global ConfigglobalConfigDeleteEdgeConfigSchema - Delete a Global Config's schemaglobalConfigDeleteEdgeConfigTokens - Delete one or more Global Config tokensglobalConfigGetEdgeConfig - Get a Global ConfigglobalConfigGetEdgeConfigBackup - Get Global Config backupglobalConfigGetEdgeConfigBackups - Get Global Config backupsglobalConfigGetEdgeConfigItem - Get a Global Config itemglobalConfigGetEdgeConfigItems - Get Global Config itemsglobalConfigGetEdgeConfigs - Get Global ConfigsglobalConfigGetEdgeConfigSchema - Get Global Config schemaglobalConfigGetEdgeConfigToken - Get Global Config token meta dataglobalConfigGetEdgeConfigTokens - Get all tokens of a Global ConfigglobalConfigPatchEdgeConfigSchema - Update Global Config schemaglobalConfigRestoreEdgeConfigBackup - Restore Global Config backupglobalConfigUpdateEdgeConfig - Update a Global ConfigintegrationsConnectIntegrationResourceToProject - Connect integration resource to projectintegrationsCreateIntegrationStoreDirect - Create integration store (free and paid plans)integrationsDeleteConfiguration - Delete an integration configurationintegrationsGetBillingPlans - List integration billing plansintegrationsGetConfiguration - Retrieve an integration configurationintegrationsGetConfigurationProducts - List products for integration configurationintegrationsGetConfigurations - Get configurations for the authenticated user or teamintegrationsGitNamespaces - List git namespaces by providerintegrationsSearchRepo - List git repositories linked to namespace by providerkmsActivateKmsSigningKey - Activate a signing keykmsCreateKmsIssuer - Create an issuerkmsCreateKmsIssuerPolicy - Create an issuer policykmsCreateKmsSigningKey - Create a signing keykmsDeleteKmsIssuer - Delete an issuerkmsDeleteKmsIssuerPolicy - Delete an issuer policykmsGetKmsIssuer - Get an issuerkmsListKmsIssuers - List issuerskmsRevokeKmsSigningKey - Revoke a signing keykmsSignKmsMessage - Sign a messagekmsSignKmsToken - Sign a tokenkmsUpdateKmsIssuer - Update an issuerkmsUpdateKmsIssuerPolicy - Update an issuer policylogDrainsCreateConfigurableLogDrain - Creates a Configurable Log Drain (deprecated)logDrainsCreateLogDrain - Creates a new Integration Log Drain (deprecated)logDrainsDeleteConfigurableLogDrain - Deletes a Configurable Log Drain (deprecated)logDrainsDeleteIntegrationLogDrain - Deletes the Integration log drain with the provided id (deprecated)logDrainsGetAllLogDrains - Retrieves a list of all the Log Drains (deprecated)logDrainsGetConfigurableLogDrain - Retrieves a Configurable Log Drain (deprecated)logDrainsGetIntegrationLogDrains - Retrieves a list of Integration log drains (deprecated)logsGetRuntimeLogs - Get logs for a deploymentmarketplaceCreateEvent - Create EventmarketplaceCreateInstallationIntegrationConfiguration - Create one or multiple experimentation itemsmarketplaceDeleteInstallationIntegrationConfiguration - Delete an existing experimentation itemmarketplaceDeleteIntegrationResource - Delete Integration ResourcemarketplaceExchangeSsoToken - SSO Token ExchangemarketplaceExchangeSsoToken - SSO Token ExchangemarketplaceFinalizeInstallation - Finalize InstallationmarketplaceGetAccountInfo - Get Account InformationmarketplaceGetInstallationsByIntegrationConfigurationIdResourcesByResourceIdExperimentationGlobalConfig - Get the data of a user-provided Global ConfigmarketplaceGetIntegrationResource - Get Integration ResourcemarketplaceGetIntegrationResources - Get Integration ResourcesmarketplaceGetInvoice - Get InvoicemarketplaceGetMember - Get Member InformationmarketplaceHeadInstallationsByIntegrationConfigurationIdResourcesByResourceIdExperimentationGlobalConfig - Get the data of a user-provided Global ConfigmarketplaceImportResource - Import ResourcemarketplaceReplaceInstallationsByIntegrationConfigurationIdResourcesByResourceIdExperimentationGlobalConfig - Push data into a user-provided Global ConfigmarketplaceRevokeInstallationCredential - Revoke Installation CredentialmarketplaceRotateInstallationCredential - Rotate Installation CredentialmarketplaceSubmitBillingData - Submit Billing DatamarketplaceSubmitInvoice - Submit InvoicemarketplaceSubmitPrepaymentBalances - Submit Prepayment BalancesmarketplaceUpdateInstallation - Update InstallationmarketplaceUpdateInstallationIntegrationConfiguration - Patch an existing experimentation itemmarketplaceUpdateInvoice - Invoice ActionsmarketplaceUpdateResource - Update ResourcemarketplaceUpdateResourceSecretsById - Update Resource SecretsmicrofrontendsCreateMicrofrontendsGroupWithApplications - Create a microfrontends group with applicationsmicrofrontendsGetMicrofrontendsConfig - Get microfrontends config for a deploymentmicrofrontendsGetMicrofrontendsConfigForProject - Get microfrontends config for a projectmicrofrontendsGetMicrofrontendsGroups - List microfrontends groupsmicrofrontendsGetMicrofrontendsInGroup - List projects in a microfrontends groupnetworkingCreateNetwork - Create a Secure Compute networknetworkingCreatePrivateLinkEndpoint - Create a PrivateLink endpointnetworkingDeleteNetwork - Delete a Secure Compute networknetworkingDeletePrivateLinkEndpoint - Delete a PrivateLink endpointnetworkingListNetworks - List Secure Compute networksnetworkingListPrivateLinkEndpoints - List PrivateLink endpointsnetworkingReadNetwork - Read a Secure Compute networknetworkingReadPrivateLinkEndpoint - Read a PrivateLink endpointnetworkingUpdateNetwork - Update a Secure Compute networknetworkingUpdatePrivateLinkEndpoint - Update a PrivateLink endpointnetworkingUpdateStaticIps - Configures Static IPs for a projectnetworkingUpdateStaticIps - Configures Static IPs for a projectobservabilityGetObservabilityConfigurationProjects - Lists disabled Observability Plus projectsobservabilityUpdateObservabilityConfigurationProject - Updates a disabled Observability Plus project settingprojectMembersAddProjectMember - Adds a new member to a project.projectMembersGetProjectMembers - List project membersprojectMembersRemoveProjectMember - Remove a Project MemberprojectRoutesAddRoute - Add a routing ruleprojectRoutesDeleteRoutes - Delete routing rulesprojectRoutesEditRoute - Edit a routing ruleprojectRoutesGenerateRoute - Generate a routing rule from natural languageprojectRoutesGetRoutes - Get project routing rulesprojectRoutesGetRouteVersions - Get routing rule version historyprojectRoutesStageRoutes - Stage routing rulesprojectRoutesUpdateRouteVersions - Promote, restore, or discard a routing rule versionprojectsAcceptProjectTransferRequest - Accept project transfer requestprojectsAddProjectDomain - Add a domain to a projectprojectsBatchRemoveProjectEnv - Batch remove environment variablesprojectsCreateProject - Create a new projectprojectsCreateProjectEnv - Create one or more environment variablesprojectsCreateProjectTransferRequest - Create project transfer requestprojectsCreateTraceSession - Create a trace session token for a deploymentprojectsDeleteProject - Delete a ProjectprojectsEditProjectEnv - Edit an environment variableprojectsFilterProjectEnvs - Retrieve the environment variables of a project by id or nameprojectsGetProject - Find a project by id or nameprojectsGetProjectDomain - Get a project domainprojectsGetProjectDomains - Retrieve project domains by project by id or nameprojectsGetProjectEnv - Retrieve the decrypted value of an environment variable of a project by idprojectsGetProjects - Retrieve a list of projectsprojectsGetProjectToken - Generate a project OIDC tokenprojectsGetProjectTrace - Get a project trace by request IDprojectsListPromoteAliases - Gets a list of aliases with status for the current promoteprojectsMoveProjectDomain - Move a project domainprojectsPauseProject - Pause a projectprojectsRemoveProjectDomain - Remove a domain from a projectprojectsRemoveProjectEnv - Remove an environment variableprojectsRequestPromote - Point production traffic to a given deploymentprojectsRequestRollback - Point production traffic to a previous production deployment by IDprojectsUnpauseProject - Unpause a projectprojectsUpdateMicrofrontends - Update the microfrontends settingsprojectsUpdateProject - Update an existing projectprojectsUpdateProjectDomain - Update a project domainprojectsUpdateProjectProtectionBypass - Update Protection Bypass for AutomationprojectsUpdateProjectsByProjectIdRollbackByDeploymentIdUpdateDescription - Updates the description for a rollbackprojectsUploadProjectAvatar - Upload a project avatarprojectsVerifyProjectDomain - Verify project domainreplaceDomainsByDomainRecordsrollingReleaseApproveRollingReleaseStage - Update the active rolling release to the next stage for a projectrollingReleaseCompleteRollingRelease - Complete the rolling release for the projectrollingReleaseDeleteRollingReleaseConfig - Delete rolling release configurationrollingReleaseGetRollingRelease - Get the active rolling release information for a projectrollingReleaseGetRollingReleaseBillingStatus - Get rolling release billing statusrollingReleaseGetRollingReleaseConfig - Get rolling release configurationrollingReleaseStartRollingRelease - Start a rolling release for the projectrollingReleaseUpdateRollingReleaseConfig - Update the rolling release settings for the projectsandboxesCreateSandboxesSessionsBySessionIdSnapshotV2 - Create a snapshotsandboxesCreateSandboxesSessionsBySessionIdSnapshotV3 - Create a snapshotsandboxesCreateSessionDirectory - Create a directorysandboxesDeleteDrive - Delete a drivesandboxesDeleteSandbox - Delete a sandboxsandboxesDeleteSessionSnapshot - Delete a snapshotsandboxesExtendSessionTimeout - Extend session timeoutsandboxesGetNamedSandbox - Get a named sandboxsandboxesGetOrCreateDrive - Get or create a drivesandboxesGetSession - Get a sessionsandboxesGetSessionCommand - Get a commandsandboxesGetSessionSnapshot - Get a snapshotsandboxesKillSessionCommand - Kill a commandsandboxesListDrives - List drivessandboxesListNamedSandboxes - List sandboxessandboxesListSessionCommands - List commandssandboxesListSessions - List sessionssandboxesListSessionSnapshots - List snapshotssandboxesReadSessionFile - Read a filesandboxesStopSession - Stop a sessionsandboxesUpdateSessionNetworkPolicy - Update network policysandboxesWriteSessionFiles - Write filessecurityAddBypassIp - Create System Bypass RulesecurityCreateSecurityFirewallConfigByConfigVersionActivate - Returns activated WAF configsecurityDeleteSecurityFirewallConfigByConfigVersion - Returns activated WAF configsecurityGenerateFirewallRule - Generate a firewall rule from natural languagesecurityGetActiveAttackStatus - Read active attack datasecurityGetBypassIp - Read System BypasssecurityGetFirewallConfig - Read Firewall ConfigurationsecurityGetSecurityFirewallConfig - Returns activated WAF configsecurityGetSecurityFirewallEvents - Read Firewall Actions by ProjectsecurityPutFirewallConfig - Put Firewall ConfigurationsecurityRemoveBypassIp - Remove System Bypass RulesecurityUpdateAttackChallengeMode - Update Attack Challenge modesecurityUpdateFirewallConfig - Update Firewall ConfigurationstorageCreateStorageStoresBlob - Create a Blob storestorageDeleteStorageStoresBlobById - Delete a Blob storestorageGetStorageStoresById - Get a storeteamsCreateTeam - Create a TeamteamsDeleteMicrofrontendsGroup - Delete a microfrontends groupteamsDeleteTeam - Delete a TeamteamsDeleteTeamInviteCode - Delete a Team invite codeteamsGetTeam - Get a TeamteamsGetTeamAccessRequest - Get access request statusteamsGetTeamMembers - List team membersteamsGetTeams - List all teamsteamsInviteUserToTeam - Invite a userteamsJoinTeam - Join a teamteamsPatchTeam - Update a TeamteamsPostTeamDsyncRoles - Update Team Directory Sync Role MappingsteamsRemoveTeamMember - Remove a Team MemberteamsRequestAccessToTeam - Request access to a teamteamsUpdateMicrofrontendsGroup - Update a microfrontends groupteamsUpdateTeamMember - Update a Team MemberuserGetAuthUser - Get the UseruserListEventTypes - List Event TypesuserListUserEvents - List User EventsuserRequestDelete - Delete User AccountvcrAddRepositoryPermission - Add a repository permissionvcrClearRepositoryPermissions - Clear all repository permissionsvcrCreateByTeamSlugByProjectSlugByRepositoryNameBlobsUploads - Start a blob uploadvcrCreateRepository - Create a repositoryvcrDeleteByTeamSlugByProjectSlugByRepositoryNameBlobsByDigest - Delete a blobvcrDeleteByTeamSlugByProjectSlugByRepositoryNameBlobsUploadsByUuid - Cancel a blob uploadvcrDeleteByTeamSlugByProjectSlugByRepositoryNameManifestsByReference - Delete an image manifestvcrDeleteRepository - Delete a repositoryvcrDeleteRepositoryImage - Delete a repository imagevcrGetByTeamSlugByProjectSlugByRepositoryNameBlobsByDigest - Download a blobvcrGetByTeamSlugByProjectSlugByRepositoryNameBlobsUploadsByUuid - Get blob upload statusvcrGetByTeamSlugByProjectSlugByRepositoryNameManifestsByReference - Pull an image manifestvcrGetByTeamSlugByProjectSlugByRepositoryNameTagsList - List image tagsvcrGetRepository - Get a repositoryvcrGetRepositoryImage - Get a repository imagevcrGetRepositoryTag - Get a repository tagvcrGetRoot - Check registry API version supportvcrHeadByTeamSlugByProjectSlugByRepositoryNameBlobsByDigest - Check if a blob existsvcrHeadByTeamSlugByProjectSlugByRepositoryNameManifestsByReference - Check if a manifest existsvcrListRepositories - List repositoriesvcrListRepositoryImages - List repository imagesvcrListRepositoryPermissions - List repository permissionsvcrListRepositoryTags - List repository tagsvcrRemoveRepositoryPermission - Remove a repository permissionvcrReplaceByTeamSlugByProjectSlugByRepositoryNameBlobsUploadsByUuid - Complete a blob uploadvcrReplaceByTeamSlugByProjectSlugByRepositoryNameManifestsByReference - Push an image manifestvcrUpdateByTeamSlugByProjectSlugByRepositoryNameBlobsUploadsByUuid - Upload a blob chunkwebAnalyticsAggregateEvents - Aggregates custom eventswebAnalyticsAggregatePageviews - Aggregates page viewswebAnalyticsCountEvents - Counts custom eventswebAnalyticsCountPageviews - Counts page viewswebhooksCreateWebhook - Creates a webhookwebhooksDeleteWebhook - Deletes a webhookwebhooksGetWebhook - Get a webhookwebhooksGetWebhooks - Get a list of webhookschecksCreateCheckchecksGetAllCheckschecksGetCheckchecksRerequestCheckchecksUpdateCheckmarketplaceUpdateResourceSecretsCertain SDK methods accept files as part of a multi-part request. It is possible and typically recommended to upload files as a stream rather than reading the entire contents into memory. This avoids excessive memory consumption and potentially crashing with out-of-memory errors when working with very large files. The following example demonstrates how to attach a file stream to a request.
[!TIP]
Depending on your JavaScript runtime, there are convenient utilities that return a handle to a file without reading the entire contents into memory:
- Node.js v20+: Since v20, Node.js comes with a native
openAsBlobfunction innode:fs.- Bun: The native
Bun.filefunction produces a file handle that can be used for streaming file uploads.- Browsers: All supported browsers return an instance to a
Filewhen reading the value from an<input type="file">element.- Node.js v18: A file stream can be created using the
fileFromhelper fromfetch-blob/from.js.
import { Vercel } from "@vercel/sdk";
import { openAsBlob } from "node:fs";
const vercel = new Vercel({
bearerToken: "<YOUR_BEARER_TOKEN_HERE>",
});
async function run() {
const result = await vercel.artifacts.uploadArtifact({
contentLength: 3848.22,
xArtifactDuration: 400,
xArtifactClientCi: "VERCEL",
xArtifactClientInteractive: 0,
xArtifactTag: "Tc0BmHvJYMIYJ62/zx87YqO0Flxk+5Ovip25NY825CQ=",
hash: "12HKQaOmR5t5Uy6vdcQsNIiZgHGB",
teamId: "team_1a2b3c4d5e6f7g8h9i0j1k2l",
slug: "my-team-url-slug",
requestBody: await openAsBlob("example.file"),
});
console.log(result);
}
run();
Some of the endpoints in this SDK support retries. If you use the SDK without any configuration, it will fall back to the default retry strategy provided by the API. However, the default retry strategy can be overridden on a per-operation basis, or across the entire SDK.
To change the default retry strategy for a single API call, simply provide a retryConfig object to the call:
import { Vercel } from "@vercel/sdk";
const vercel = new Vercel();
async function run() {
const result = await vercel.replaceDomainsByDomainRecords({
domain: "example.com",
}, {
retries: {
strategy: "backoff",
backoff: {
initialInterval: 1,
maxInterval: 50,
exponent: 1.1,
maxElapsedTime: 100,
},
retryConnectionErrors: false,
},
});
console.log(result);
}
run();
If you'd like to override the default retry strategy for all operations that support retries, you can provide a retryConfig at SDK initialization:
import { Vercel } from "@vercel/sdk";
const vercel = new Vercel({
retryConfig: {
strategy: "backoff",
backoff: {
initialInterval: 1,
maxInterval: 50,
exponent: 1.1,
maxElapsedTime: 100,
},
retryConnectionErrors: false,
},
});
async function run() {
const result = await vercel.replaceDomainsByDomainRecords({
domain: "example.com",
});
console.log(result);
}
run();
VercelError is the base class for all HTTP error responses. It has the following properties:
| Property | Type | Description |
|---|---|---|
error.message | string | Error message |
error.statusCode | number | HTTP response status code eg 404 |
error.headers | Headers | HTTP response headers |
error.body | string | HTTP body. Can be empty string if no body is returned. |
error.rawResponse | Response | Raw HTTP response |
error.data$ | Optional. Some errors may contain structured data. See Error Classes. |
import { Vercel } from "@vercel/sdk";
import { CreateApiKeysResponseResponseBody } from "@vercel/sdk/models/createapikeysop.js";
import { VercelError } from "@vercel/sdk/models/vercelerror.js.js";
const vercel = new Vercel();
async function run() {
try {
const result = await vercel.createApiKeys({
purpose: "<value>",
projectId: "prj_12HKQaOmR5t5Uy6vdcQsNIiZgHGB",
name: "API Key for App 123",
});
console.log(result);
} catch (error) {
// The base class for HTTP error responses
if (error instanceof VercelError) {
console.log(error.message);
console.log(error.statusCode);
console.log(error.body);
console.log(error.headers);
// Depending on the method different errors may be thrown
if (error instanceof CreateApiKeysResponseResponseBody) {
console.log(error.data$.error); // models.CreateApiKeysError
}
}
}
}
run();
Primary error:
VercelError: The base class for HTTP error responses.Network errors:
ConnectionError: HTTP client was unable to make a request to a server.RequestTimeoutError: HTTP request timed out due to an AbortSignal signal.RequestAbortedError: HTTP request was aborted by the client.InvalidRequestError: Any input used to create a request is invalid.UnexpectedClientError: Unrecognised or unexpected error.Inherit from VercelError:
HttpApiDecodeError: The request did not match the expected schema. Status code 400. Applicable to 17 of 404 methods.*Unauthorized: Unauthorized. Status code 401. Applicable to 17 of 404 methods.*NotAuthorizedForScope: NotAuthorizedForScope. Status code 403. Applicable to 17 of 404 methods.*TooManyRequests: TooManyRequests. Status code 429. Applicable to 17 of 404 methods.*InternalServerError: InternalServerError. Status code 500. Applicable to 17 of 404 methods.*ConnectError: Error response returned by a Connect API operation. Applicable to 11 of 404 methods.*Forbidden: NotAuthorizedForScope. Status code 403. Applicable to 10 of 404 methods.*TldNotSupported: The TLD is not currently supported. Status code 400. Applicable to 7 of 404 methods.*DomainTooShort: The domain name (excluding the TLD) is too short. Status code 400. Applicable to 5 of 404 methods.*DomainNotRegistered: The domain is not registered with Vercel. Status code 400. Applicable to 5 of 404 methods.*DomainNotFound: The domain was not found in our system. Status code 404. Applicable to 5 of 404 methods.*BadRequest: There was something wrong with the request. Status code 400. Applicable to 4 of 404 methods.*ExpectedPriceMismatch: The expected price passed does not match the actual price. Status code 400. Applicable to 4 of 404 methods.*DomainNotAvailable: The domain is not available. Status code 400. Applicable to 4 of 404 methods.*NotFound: NotFound. Status code 404. Applicable to 3 of 404 methods.*OrderTooExpensive: The total price of the order is too high. Status code 400. Applicable to 2 of 404 methods.*InvalidAdditionalContactInfo: Additional contact information provided for the TLD is invalid. Status code 400. Applicable to 2 of 404 methods.*AdditionalContactInfoRequired: Additional contact information is required for the TLD. Status code 400. Applicable to 2 of 404 methods.*LanguageCodeRequired: A language code is required for punycode domains. Status code 400. Applicable to 2 of 404 methods.*TooManyDomains: The number of domains in the order is too high. Status code 400. Applicable to 1 of 404 methods.*DuplicateDomains: Duplicate domains were provided. Status code 400. Applicable to 1 of 404 methods.*DomainAlreadyOwned: The domain is already owned by another team or user. Status code 400. Applicable to 1 of 404 methods.*DNSSECEnabled: The operation cannot be completed because DNSSEC is enabled for the domain. Status code 400. Applicable to 1 of 404 methods.*DomainAlreadyRenewing: The domain is already renewing. Status code 400. Applicable to 1 of 404 methods.*DomainNotRenewable: The domain is not renewable. Status code 400. Applicable to 1 of 404 methods.*BoughtTooRecently: The domain was bought too recently to determine verification status. Status code 400. Applicable to 1 of 404 methods.*CreateApiKeysResponseResponseBody: The request is not authorized. Status code 401. Applicable to 1 of 404 methods.*CreateApiKeysResponse403ResponseBody: You do not have permission to access this resource. Status code 403. Applicable to 1 of 404 methods.*DomainCannotBeTransferedOutUntil: The domain cannot be transfered out until the specified date. Status code 409. Applicable to 1 of 404 methods.*CreateApiKeysResponse429ResponseBody: . Status code 429. Applicable to 1 of 404 methods.*CreateApiKeysResponse500ResponseBody: . Status code 500. Applicable to 1 of 404 methods.*ResponseValidationError: Type mismatch between the data returned from the server and the structure expected by the SDK. See error.rawValue for the raw value and error.pretty() for a nicely formatted multi-line string.* Check the method documentation to see if the error is applicable.
The default server can be overridden globally by passing a URL to the serverURL: string optional parameter when initializing the SDK client instance. For example:
import { Vercel } from "@vercel/sdk";
const vercel = new Vercel({
serverURL: "https://api.vercel.com",
});
async function run() {
const result = await vercel.replaceDomainsByDomainRecords({
domain: "example.com",
});
console.log(result);
}
run();
The TypeScript SDK makes API calls using an HTTPClient that wraps the native
Fetch API. This
client is a thin wrapper around fetch and provides the ability to attach hooks
around the request lifecycle that can be used to modify the request or handle
errors and response.
The HTTPClient constructor takes an optional fetcher argument that can be
used to integrate a third-party HTTP client or when writing tests to mock out
the HTTP client and feed in fixtures.
The following example shows how to:
"beforeRequest" hook to add a custom header and a timeout to requests"requestError" hook to log errorsimport { Vercel } from "@vercel/sdk";
import { ProxyAgent } from "undici";
import { HTTPClient } from "@vercel/sdk/lib/http";
const dispatcher = new ProxyAgent("http://proxy.example.com:8080");
const httpClient = new HTTPClient({
// 'fetcher' takes a function that has the same signature as native 'fetch'.
fetcher: (input, init) =>
// 'dispatcher' is specific to undici and not part of the standard Fetch API.
fetch(input, { ...init, dispatcher } as RequestInit),
});
httpClient.addHook("beforeRequest", (request) => {
const nextRequest = new Request(request, {
signal: request.signal || AbortSignal.timeout(5000)
});
nextRequest.headers.set("x-custom-header", "custom value");
return nextRequest;
});
httpClient.addHook("requestError", (error, request) => {
console.group("Request Error");
console.log("Reason:", `${error}`);
console.log("Endpoint:", `${request.method} ${request.url}`);
console.groupEnd();
});
const sdk = new Vercel({ httpClient: httpClient });
You can setup your SDK to emit debug logs for SDK requests and responses.
You can pass a logger that matches console's interface as an SDK option.
[!WARNING] Beware that debug logging will reveal secrets, like API tokens in headers, in log messages printed to a console or files. It's recommended to use this feature only during local development and not in production.
import { Vercel } from "@vercel/sdk";
const sdk = new Vercel({ debugLogger: console });
This SDK is in beta, and there may be breaking changes between versions without a major version update. Therefore, we recommend pinning usage to a specific package version. This way, you can install the same version each time without breaking changes unless you are intentionally looking for the latest version.
While we value open-source contributions to this SDK, this library is generated programmatically. Any manual changes added to internal files will be overwritten on the next generation. We look forward to hearing your feedback. Feel free to open a PR or an issue with a proof of concept and we'll do our best to include it in a future release.
TypeScript
100.0%
Develop. Preview. Ship.
The @vercel/sdk is a type-safe Typescript SDK that gives you full control over the entire Vercel platform through the Vercel REST API.
The SDK can be installed with either npm, pnpm, bun or yarn package managers.
npm add @vercel/sdk
pnpm add @vercel/sdk
bun add @vercel/sdk
yarn add @vercel/sdk
[!NOTE] This package is published as an ES Module (ESM) only. For applications using CommonJS, use
await import("@vercel/sdk")to import and use this package.
For supported JavaScript runtimes, please consult RUNTIMES.md.
You need to pass a valid access token to be able to use any resource or operation. Refer to Creating an Access Token to learn how to create one. Make sure that you create a token with the correct Vercel scope. If you face permission (403) errors when you are already sending a token, it can be one of the following problems:
This SDK supports the following security scheme globally:
| Name | Type | Scheme |
|---|---|---|
bearerToken | http | HTTP Bearer |
To authenticate with the API the bearerToken parameter must be set when initializing the SDK client instance. For example:
import { Vercel } from "@vercel/sdk";
const vercel = new Vercel({
bearerToken: "<YOUR_BEARER_TOKEN_HERE>",
});
async function run() {
const result = await vercel.replaceDomainsByDomainRecords({
domain: "example.com",
});
console.log(result);
}
run();
Update the fields of a project using either its name or id.
import { Vercel } from "@vercel/sdk";
const vercel = new Vercel({
bearerToken: "<YOUR_BEARER_TOKEN_HERE>",
});
async function run() {
const result = await vercel.projects.updateProject({
idOrName: "prj_12HKQaOmR5t5Uy6vdcQsNIiZgHGB",
teamId: "team_1a2b3c4d5e6f7g8h9i0j1k2l",
slug: "my-team-url-slug",
requestBody: {
name: "a-project-name",
sandbox: {
region: "iad1",
failoverRegions: [
"sfo1",
"cle1",
],
},
},
});
console.log(result);
}
run();
id (deprecated)All the methods listed above are available as standalone functions. These functions are ideal for use in applications running in the browser, serverless runtimes or other environments where application bundle size is a primary concern. When using a bundler to build your application, all unused functionality will be either excluded from the final bundle or tree-shaken away.
To read more about standalone functions, check FUNCTIONS.md.
accessGroupsCreateAccessGroup - Creates an access groupaccessGroupsCreateAccessGroupProject - Create an access group projectaccessGroupsDeleteAccessGroup - Deletes an access groupaccessGroupsDeleteAccessGroupProject - Delete an access group projectaccessGroupsListAccessGroupMembers - List members of an access groupaccessGroupsListAccessGroupProjects - List projects of an access groupaccessGroupsListAccessGroups - List access groups for a team, project or memberaccessGroupsReadAccessGroup - Reads an access groupaccessGroupsReadAccessGroupProject - Reads an access group projectaccessGroupsUpdateAccessGroup - Update an access groupaccessGroupsUpdateAccessGroupProject - Update an access group projectaiGatewayCreateAiGatewayRule - Create ruleaiGatewayDeleteAiGatewayRule - Delete ruleaiGatewayListAiGatewayRules - List rulesaiGatewayUpdateAiGatewayRule - Update rulealiasesAssignAlias - Assign an AliasaliasesDeleteAlias - Delete an AliasaliasesGetAlias - Get an AliasaliasesListAliases - List aliasesaliasesListDeploymentAliases - List Deployment AliasesaliasesPatchUrlProtectionBypass - Update the protection bypass for a URLapiAiGatewayCreateAiGatewayVirtualModelConfig - Create virtual model configapiAiGatewayDeleteAiGatewayVirtualModelConfig - Delete virtual model configapiAiGatewayGetAiGatewayVirtualModelConfig - Get virtual model configapiAiGatewayListAiGatewayVirtualModelConfigs - List virtual model configsapiAiGatewayUpdateAiGatewayVirtualModelConfig - Update virtual model configartifactsArtifactExists - Check if a cache artifact existsartifactsArtifactQuery - Query information about an artifactartifactsDeleteAllArtifacts - Delete all cache artifactsartifactsDownloadArtifact - Download a cache artifactartifactsRecordEvents - Record an artifacts cache usage eventartifactsStatus - Get status of Remote Caching for this principalartifactsUploadArtifact - Upload a cache artifactauthenticationCreateAuthToken - Create an Auth TokenauthenticationDeleteAuthToken - Delete an authentication tokenauthenticationGetAuthToken - Get Auth Token MetadataauthenticationListAuthTokens - List Auth TokensbillingBuyCredits - Purchase creditsbulkRedirectsDeleteRedirects - Delete project-level redirects.bulkRedirectsEditRedirect - Edit a project-level redirect.bulkRedirectsGetRedirects - Gets project-level redirects.bulkRedirectsGetVersions - Get the version history for a project's redirects.bulkRedirectsRestoreRedirects - Restore staged project-level redirects to their production version.bulkRedirectsStageRedirects - Stages new redirects for a project.bulkRedirectsUpdateVersion - Promote a staging version to production or restore a previous production version.certsGetCertById - Get cert by idcertsGetCerts - Get certscertsIssueCert - Issue a new certcertsRemoveCert - Remove certcertsUploadCert - Upload a certchecksV2CreateDeploymentCheckRun - Create a check runchecksV2CreateProjectCheck - Create a checkchecksV2DeleteProjectCheck - Delete a checkchecksV2GetDeploymentCheckRun - Get a check runchecksV2GetProjectCheck - Get a checkchecksV2ListCheckRuns - List runs for a checkchecksV2ListDeploymentCheckRuns - List check runs for a deploymentchecksV2ListProjectChecks - List all checks for a projectchecksV2UpdateDeploymentCheckRun - Update a check runchecksV2UpdateProjectCheck - Update a checkconnectCreateConnector - Create a connectorconnectDeleteConnector - Delete a connectorconnectDeleteConnectorProjectConnection - Disconnect a connector from a projectconnectGetConnector - Get a connectorconnectGetConnectorProjectConnection - Get a connector project connectionconnectListConnectorProjectConnections - List projects for a connectorconnectListConnectors - List connectorsconnectListProjectConnectorConnections - List connectors for a projectconnectReplaceConnectorTriggerDestinations - Update connector trigger destinationsconnectUpdateConnector - Update a connectorconnectUpsertConnectorProjectConnection - Create or update a connector project connectioncreateApiKeyscreateObservabilityQuerycreateSpeedInsightsTogglecreateWebInsightsToggledeploymentsCancelDeployment - Cancel a deploymentdeploymentsCreateDeployment - Create a new deploymentdeploymentsDeleteDeployment - Delete a DeploymentdeploymentsGetDeployment - Get a deployment by ID or URLdeploymentsGetDeploymentEvents - Get deployment eventsdeploymentsGetDeploymentFileContents - Get Deployment File ContentsdeploymentsGetDeployments - List deploymentsdeploymentsListDeploymentFiles - List Deployment FilesdeploymentsUpdateIntegrationDeploymentAction - Update deployment integration actiondeploymentsUpdateIntegrationDeploymentAction - Update deployment integration actiondeploymentsUploadFile - Upload Deployment FilesdnsCreateRecord - Create a DNS recorddnsGetRecords - List existing DNS recordsdnsRemoveRecord - Delete a DNS recorddnsUpdateRecord - Update an existing DNS recorddomainsClaimDomainOwnership - Claim Domain OwnershipdomainsCreateOrTransferDomain - Add an existing domain to the Vercel platformdomainsDeleteDomain - Remove a domain by namedomainsGetDomain - Get Information for a Single DomaindomainsGetDomainConfig - Get a Domain's configurationdomainsGetDomainProjectDomains - List Project Domains by Apex DomaindomainsGetDomains - List all the domainsdomainsGetDomainVerificationRecord - Get Domain Verification RecorddomainsPatchDomain - Update or move apex domaindomainsRegistrarBuyDomains - Buy multiple domainsdomainsRegistrarBuySingleDomain - Buy a domaindomainsRegistrarGetBulkAvailability - Get availability for multiple domainsdomainsRegistrarGetContactInfoSchema - Get contact info schemadomainsRegistrarGetDomainAuthCode - Get the auth code for a domaindomainsRegistrarGetDomainAvailability - Get availability for a domaindomainsRegistrarGetDomainContactVerification - Get contact verification status for a domaindomainsRegistrarGetDomainPrice - Get price data for a domaindomainsRegistrarGetDomainTransferIn - Get a domain's transfer statusdomainsRegistrarGetOrder - Get a domain orderdomainsRegistrarGetSupportedTlds - Get supported TLDsdomainsRegistrarGetTld - Get TLDdomainsRegistrarGetTldPrice - Get TLD price datadomainsRegistrarRenewDomain - Renew a domaindomainsRegistrarTransferInDomain - Transfer-in a domaindomainsRegistrarUpdateDomainAutoRenew - Update auto-renew for a domaindomainsRegistrarUpdateDomainNameservers - Update nameservers for a domaindrainsCreateDrain - Create a new DraindrainsDeleteDrain - Delete a draindrainsGetDrain - Find a Drain by iddrainsGetDrains - Retrieve a list of all DrainsdrainsTestDrain - Validate Drain delivery configurationdrainsUpdateDrain - Update an existing DrainedgeCacheDangerouslyDeleteBySrcImages - Dangerously delete by source imageedgeCacheDangerouslyDeleteByTags - Dangerously delete by tagedgeCacheInvalidateBySrcImages - Invalidate by source imageedgeCacheInvalidateByTags - Invalidate by tagenvironmentCreateCustomEnvironment - Create a custom environment for the current project.environmentCreateSharedEnvVariable - Create one or more shared environment variablesenvironmentDeleteSharedEnvVariable - Delete one or more Env VarenvironmentGetCustomEnvironment - Retrieve a custom environmentenvironmentGetProjectsByIdOrNameCustomEnvironments - Retrieve custom environmentsenvironmentGetSharedEnvVar - Retrieve the decrypted value of a Shared Environment Variable by id.environmentListSharedEnvVariable - Lists all Shared Environment Variables for a teamenvironmentRemoveCustomEnvironment - Remove a custom environmentenvironmentUnlinkSharedEnvVariable - Disconnects a shared environment variable for a given projectenvironmentUpdateCustomEnvironment - Update a custom environmentenvironmentUpdateSharedEnvVariable - Updates one or more shared environment variablesfeatureFlagsCreateFlag - Create a flagfeatureFlagsCreateFlagSegment - Create a segmentfeatureFlagsCreateSDKKey - Create an SDK keyfeatureFlagsDeleteFlag - Delete a flagfeatureFlagsDeleteFlagSegment - Delete a segmentfeatureFlagsDeleteSDKKey - Delete an SDK keyfeatureFlagsGetDeploymentFeatureFlags - Retrieve the feature flags of a deploymentfeatureFlagsGetFlag - Get a flagfeatureFlagsGetFlagSegment - Get a segmentfeatureFlagsGetFlagSettings - Get project flag settingsfeatureFlagsGetSDKKeys - Get all SDK keysfeatureFlagsListFlags - List flagsfeatureFlagsListFlagSegments - List segmentsfeatureFlagsListFlagsV2 - List flagsfeatureFlagsListFlagVersions - List flag versionsfeatureFlagsListTeamFlags - List all flags for a teamfeatureFlagsListTeamFlagSettings - List team project flag settingsfeatureFlagsListTeamFlagsV2 - List all flags for a teamfeatureFlagsUpdateFlag - Update a flagfeatureFlagsUpdateFlagSegment - Update a segmentfeatureFlagsUpdateFlagSettings - Update project flag settingsgetDomainsRecordsByRecordIdgetObservabilitySchemagetObservabilitySchemaByMetricIdglobalConfigCreateEdgeConfig - Create a Global ConfigglobalConfigCreateEdgeConfigToken - Create a Global Config tokenglobalConfigDeleteEdgeConfig - Delete a Global ConfigglobalConfigDeleteEdgeConfigSchema - Delete a Global Config's schemaglobalConfigDeleteEdgeConfigTokens - Delete one or more Global Config tokensglobalConfigGetEdgeConfig - Get a Global ConfigglobalConfigGetEdgeConfigBackup - Get Global Config backupglobalConfigGetEdgeConfigBackups - Get Global Config backupsglobalConfigGetEdgeConfigItem - Get a Global Config itemglobalConfigGetEdgeConfigItems - Get Global Config itemsglobalConfigGetEdgeConfigs - Get Global ConfigsglobalConfigGetEdgeConfigSchema - Get Global Config schemaglobalConfigGetEdgeConfigToken - Get Global Config token meta dataglobalConfigGetEdgeConfigTokens - Get all tokens of a Global ConfigglobalConfigPatchEdgeConfigSchema - Update Global Config schemaglobalConfigRestoreEdgeConfigBackup - Restore Global Config backupglobalConfigUpdateEdgeConfig - Update a Global ConfigintegrationsConnectIntegrationResourceToProject - Connect integration resource to projectintegrationsCreateIntegrationStoreDirect - Create integration store (free and paid plans)integrationsDeleteConfiguration - Delete an integration configurationintegrationsGetBillingPlans - List integration billing plansintegrationsGetConfiguration - Retrieve an integration configurationintegrationsGetConfigurationProducts - List products for integration configurationintegrationsGetConfigurations - Get configurations for the authenticated user or teamintegrationsGitNamespaces - List git namespaces by providerintegrationsSearchRepo - List git repositories linked to namespace by providerkmsActivateKmsSigningKey - Activate a signing keykmsCreateKmsIssuer - Create an issuerkmsCreateKmsIssuerPolicy - Create an issuer policykmsCreateKmsSigningKey - Create a signing keykmsDeleteKmsIssuer - Delete an issuerkmsDeleteKmsIssuerPolicy - Delete an issuer policykmsGetKmsIssuer - Get an issuerkmsListKmsIssuers - List issuerskmsRevokeKmsSigningKey - Revoke a signing keykmsSignKmsMessage - Sign a messagekmsSignKmsToken - Sign a tokenkmsUpdateKmsIssuer - Update an issuerkmsUpdateKmsIssuerPolicy - Update an issuer policylogDrainsCreateConfigurableLogDrain - Creates a Configurable Log Drain (deprecated)logDrainsCreateLogDrain - Creates a new Integration Log Drain (deprecated)logDrainsDeleteConfigurableLogDrain - Deletes a Configurable Log Drain (deprecated)logDrainsDeleteIntegrationLogDrain - Deletes the Integration log drain with the provided id (deprecated)logDrainsGetAllLogDrains - Retrieves a list of all the Log Drains (deprecated)logDrainsGetConfigurableLogDrain - Retrieves a Configurable Log Drain (deprecated)logDrainsGetIntegrationLogDrains - Retrieves a list of Integration log drains (deprecated)logsGetRuntimeLogs - Get logs for a deploymentmarketplaceCreateEvent - Create EventmarketplaceCreateInstallationIntegrationConfiguration - Create one or multiple experimentation itemsmarketplaceDeleteInstallationIntegrationConfiguration - Delete an existing experimentation itemmarketplaceDeleteIntegrationResource - Delete Integration ResourcemarketplaceExchangeSsoToken - SSO Token ExchangemarketplaceExchangeSsoToken - SSO Token ExchangemarketplaceFinalizeInstallation - Finalize InstallationmarketplaceGetAccountInfo - Get Account InformationmarketplaceGetInstallationsByIntegrationConfigurationIdResourcesByResourceIdExperimentationGlobalConfig - Get the data of a user-provided Global ConfigmarketplaceGetIntegrationResource - Get Integration ResourcemarketplaceGetIntegrationResources - Get Integration ResourcesmarketplaceGetInvoice - Get InvoicemarketplaceGetMember - Get Member InformationmarketplaceHeadInstallationsByIntegrationConfigurationIdResourcesByResourceIdExperimentationGlobalConfig - Get the data of a user-provided Global ConfigmarketplaceImportResource - Import ResourcemarketplaceReplaceInstallationsByIntegrationConfigurationIdResourcesByResourceIdExperimentationGlobalConfig - Push data into a user-provided Global ConfigmarketplaceRevokeInstallationCredential - Revoke Installation CredentialmarketplaceRotateInstallationCredential - Rotate Installation CredentialmarketplaceSubmitBillingData - Submit Billing DatamarketplaceSubmitInvoice - Submit InvoicemarketplaceSubmitPrepaymentBalances - Submit Prepayment BalancesmarketplaceUpdateInstallation - Update InstallationmarketplaceUpdateInstallationIntegrationConfiguration - Patch an existing experimentation itemmarketplaceUpdateInvoice - Invoice ActionsmarketplaceUpdateResource - Update ResourcemarketplaceUpdateResourceSecretsById - Update Resource SecretsmicrofrontendsCreateMicrofrontendsGroupWithApplications - Create a microfrontends group with applicationsmicrofrontendsGetMicrofrontendsConfig - Get microfrontends config for a deploymentmicrofrontendsGetMicrofrontendsConfigForProject - Get microfrontends config for a projectmicrofrontendsGetMicrofrontendsGroups - List microfrontends groupsmicrofrontendsGetMicrofrontendsInGroup - List projects in a microfrontends groupnetworkingCreateNetwork - Create a Secure Compute networknetworkingCreatePrivateLinkEndpoint - Create a PrivateLink endpointnetworkingDeleteNetwork - Delete a Secure Compute networknetworkingDeletePrivateLinkEndpoint - Delete a PrivateLink endpointnetworkingListNetworks - List Secure Compute networksnetworkingListPrivateLinkEndpoints - List PrivateLink endpointsnetworkingReadNetwork - Read a Secure Compute networknetworkingReadPrivateLinkEndpoint - Read a PrivateLink endpointnetworkingUpdateNetwork - Update a Secure Compute networknetworkingUpdatePrivateLinkEndpoint - Update a PrivateLink endpointnetworkingUpdateStaticIps - Configures Static IPs for a projectnetworkingUpdateStaticIps - Configures Static IPs for a projectobservabilityGetObservabilityConfigurationProjects - Lists disabled Observability Plus projectsobservabilityUpdateObservabilityConfigurationProject - Updates a disabled Observability Plus project settingprojectMembersAddProjectMember - Adds a new member to a project.projectMembersGetProjectMembers - List project membersprojectMembersRemoveProjectMember - Remove a Project MemberprojectRoutesAddRoute - Add a routing ruleprojectRoutesDeleteRoutes - Delete routing rulesprojectRoutesEditRoute - Edit a routing ruleprojectRoutesGenerateRoute - Generate a routing rule from natural languageprojectRoutesGetRoutes - Get project routing rulesprojectRoutesGetRouteVersions - Get routing rule version historyprojectRoutesStageRoutes - Stage routing rulesprojectRoutesUpdateRouteVersions - Promote, restore, or discard a routing rule versionprojectsAcceptProjectTransferRequest - Accept project transfer requestprojectsAddProjectDomain - Add a domain to a projectprojectsBatchRemoveProjectEnv - Batch remove environment variablesprojectsCreateProject - Create a new projectprojectsCreateProjectEnv - Create one or more environment variablesprojectsCreateProjectTransferRequest - Create project transfer requestprojectsCreateTraceSession - Create a trace session token for a deploymentprojectsDeleteProject - Delete a ProjectprojectsEditProjectEnv - Edit an environment variableprojectsFilterProjectEnvs - Retrieve the environment variables of a project by id or nameprojectsGetProject - Find a project by id or nameprojectsGetProjectDomain - Get a project domainprojectsGetProjectDomains - Retrieve project domains by project by id or nameprojectsGetProjectEnv - Retrieve the decrypted value of an environment variable of a project by idprojectsGetProjects - Retrieve a list of projectsprojectsGetProjectToken - Generate a project OIDC tokenprojectsGetProjectTrace - Get a project trace by request IDprojectsListPromoteAliases - Gets a list of aliases with status for the current promoteprojectsMoveProjectDomain - Move a project domainprojectsPauseProject - Pause a projectprojectsRemoveProjectDomain - Remove a domain from a projectprojectsRemoveProjectEnv - Remove an environment variableprojectsRequestPromote - Point production traffic to a given deploymentprojectsRequestRollback - Point production traffic to a previous production deployment by IDprojectsUnpauseProject - Unpause a projectprojectsUpdateMicrofrontends - Update the microfrontends settingsprojectsUpdateProject - Update an existing projectprojectsUpdateProjectDomain - Update a project domainprojectsUpdateProjectProtectionBypass - Update Protection Bypass for AutomationprojectsUpdateProjectsByProjectIdRollbackByDeploymentIdUpdateDescription - Updates the description for a rollbackprojectsUploadProjectAvatar - Upload a project avatarprojectsVerifyProjectDomain - Verify project domainreplaceDomainsByDomainRecordsrollingReleaseApproveRollingReleaseStage - Update the active rolling release to the next stage for a projectrollingReleaseCompleteRollingRelease - Complete the rolling release for the projectrollingReleaseDeleteRollingReleaseConfig - Delete rolling release configurationrollingReleaseGetRollingRelease - Get the active rolling release information for a projectrollingReleaseGetRollingReleaseBillingStatus - Get rolling release billing statusrollingReleaseGetRollingReleaseConfig - Get rolling release configurationrollingReleaseStartRollingRelease - Start a rolling release for the projectrollingReleaseUpdateRollingReleaseConfig - Update the rolling release settings for the projectsandboxesCreateSandboxesSessionsBySessionIdSnapshotV2 - Create a snapshotsandboxesCreateSandboxesSessionsBySessionIdSnapshotV3 - Create a snapshotsandboxesCreateSessionDirectory - Create a directorysandboxesDeleteDrive - Delete a drivesandboxesDeleteSandbox - Delete a sandboxsandboxesDeleteSessionSnapshot - Delete a snapshotsandboxesExtendSessionTimeout - Extend session timeoutsandboxesGetNamedSandbox - Get a named sandboxsandboxesGetOrCreateDrive - Get or create a drivesandboxesGetSession - Get a sessionsandboxesGetSessionCommand - Get a commandsandboxesGetSessionSnapshot - Get a snapshotsandboxesKillSessionCommand - Kill a commandsandboxesListDrives - List drivessandboxesListNamedSandboxes - List sandboxessandboxesListSessionCommands - List commandssandboxesListSessions - List sessionssandboxesListSessionSnapshots - List snapshotssandboxesReadSessionFile - Read a filesandboxesStopSession - Stop a sessionsandboxesUpdateSessionNetworkPolicy - Update network policysandboxesWriteSessionFiles - Write filessecurityAddBypassIp - Create System Bypass RulesecurityCreateSecurityFirewallConfigByConfigVersionActivate - Returns activated WAF configsecurityDeleteSecurityFirewallConfigByConfigVersion - Returns activated WAF configsecurityGenerateFirewallRule - Generate a firewall rule from natural languagesecurityGetActiveAttackStatus - Read active attack datasecurityGetBypassIp - Read System BypasssecurityGetFirewallConfig - Read Firewall ConfigurationsecurityGetSecurityFirewallConfig - Returns activated WAF configsecurityGetSecurityFirewallEvents - Read Firewall Actions by ProjectsecurityPutFirewallConfig - Put Firewall ConfigurationsecurityRemoveBypassIp - Remove System Bypass RulesecurityUpdateAttackChallengeMode - Update Attack Challenge modesecurityUpdateFirewallConfig - Update Firewall ConfigurationstorageCreateStorageStoresBlob - Create a Blob storestorageDeleteStorageStoresBlobById - Delete a Blob storestorageGetStorageStoresById - Get a storeteamsCreateTeam - Create a TeamteamsDeleteMicrofrontendsGroup - Delete a microfrontends groupteamsDeleteTeam - Delete a TeamteamsDeleteTeamInviteCode - Delete a Team invite codeteamsGetTeam - Get a TeamteamsGetTeamAccessRequest - Get access request statusteamsGetTeamMembers - List team membersteamsGetTeams - List all teamsteamsInviteUserToTeam - Invite a userteamsJoinTeam - Join a teamteamsPatchTeam - Update a TeamteamsPostTeamDsyncRoles - Update Team Directory Sync Role MappingsteamsRemoveTeamMember - Remove a Team MemberteamsRequestAccessToTeam - Request access to a teamteamsUpdateMicrofrontendsGroup - Update a microfrontends groupteamsUpdateTeamMember - Update a Team MemberuserGetAuthUser - Get the UseruserListEventTypes - List Event TypesuserListUserEvents - List User EventsuserRequestDelete - Delete User AccountvcrAddRepositoryPermission - Add a repository permissionvcrClearRepositoryPermissions - Clear all repository permissionsvcrCreateByTeamSlugByProjectSlugByRepositoryNameBlobsUploads - Start a blob uploadvcrCreateRepository - Create a repositoryvcrDeleteByTeamSlugByProjectSlugByRepositoryNameBlobsByDigest - Delete a blobvcrDeleteByTeamSlugByProjectSlugByRepositoryNameBlobsUploadsByUuid - Cancel a blob uploadvcrDeleteByTeamSlugByProjectSlugByRepositoryNameManifestsByReference - Delete an image manifestvcrDeleteRepository - Delete a repositoryvcrDeleteRepositoryImage - Delete a repository imagevcrGetByTeamSlugByProjectSlugByRepositoryNameBlobsByDigest - Download a blobvcrGetByTeamSlugByProjectSlugByRepositoryNameBlobsUploadsByUuid - Get blob upload statusvcrGetByTeamSlugByProjectSlugByRepositoryNameManifestsByReference - Pull an image manifestvcrGetByTeamSlugByProjectSlugByRepositoryNameTagsList - List image tagsvcrGetRepository - Get a repositoryvcrGetRepositoryImage - Get a repository imagevcrGetRepositoryTag - Get a repository tagvcrGetRoot - Check registry API version supportvcrHeadByTeamSlugByProjectSlugByRepositoryNameBlobsByDigest - Check if a blob existsvcrHeadByTeamSlugByProjectSlugByRepositoryNameManifestsByReference - Check if a manifest existsvcrListRepositories - List repositoriesvcrListRepositoryImages - List repository imagesvcrListRepositoryPermissions - List repository permissionsvcrListRepositoryTags - List repository tagsvcrRemoveRepositoryPermission - Remove a repository permissionvcrReplaceByTeamSlugByProjectSlugByRepositoryNameBlobsUploadsByUuid - Complete a blob uploadvcrReplaceByTeamSlugByProjectSlugByRepositoryNameManifestsByReference - Push an image manifestvcrUpdateByTeamSlugByProjectSlugByRepositoryNameBlobsUploadsByUuid - Upload a blob chunkwebAnalyticsAggregateEvents - Aggregates custom eventswebAnalyticsAggregatePageviews - Aggregates page viewswebAnalyticsCountEvents - Counts custom eventswebAnalyticsCountPageviews - Counts page viewswebhooksCreateWebhook - Creates a webhookwebhooksDeleteWebhook - Deletes a webhookwebhooksGetWebhook - Get a webhookwebhooksGetWebhooks - Get a list of webhookschecksCreateCheckchecksGetAllCheckschecksGetCheckchecksRerequestCheckchecksUpdateCheckmarketplaceUpdateResourceSecretsCertain SDK methods accept files as part of a multi-part request. It is possible and typically recommended to upload files as a stream rather than reading the entire contents into memory. This avoids excessive memory consumption and potentially crashing with out-of-memory errors when working with very large files. The following example demonstrates how to attach a file stream to a request.
[!TIP]
Depending on your JavaScript runtime, there are convenient utilities that return a handle to a file without reading the entire contents into memory:
- Node.js v20+: Since v20, Node.js comes with a native
openAsBlobfunction innode:fs.- Bun: The native
Bun.filefunction produces a file handle that can be used for streaming file uploads.- Browsers: All supported browsers return an instance to a
Filewhen reading the value from an<input type="file">element.- Node.js v18: A file stream can be created using the
fileFromhelper fromfetch-blob/from.js.
import { Vercel } from "@vercel/sdk";
import { openAsBlob } from "node:fs";
const vercel = new Vercel({
bearerToken: "<YOUR_BEARER_TOKEN_HERE>",
});
async function run() {
const result = await vercel.artifacts.uploadArtifact({
contentLength: 3848.22,
xArtifactDuration: 400,
xArtifactClientCi: "VERCEL",
xArtifactClientInteractive: 0,
xArtifactTag: "Tc0BmHvJYMIYJ62/zx87YqO0Flxk+5Ovip25NY825CQ=",
hash: "12HKQaOmR5t5Uy6vdcQsNIiZgHGB",
teamId: "team_1a2b3c4d5e6f7g8h9i0j1k2l",
slug: "my-team-url-slug",
requestBody: await openAsBlob("example.file"),
});
console.log(result);
}
run();
Some of the endpoints in this SDK support retries. If you use the SDK without any configuration, it will fall back to the default retry strategy provided by the API. However, the default retry strategy can be overridden on a per-operation basis, or across the entire SDK.
To change the default retry strategy for a single API call, simply provide a retryConfig object to the call:
import { Vercel } from "@vercel/sdk";
const vercel = new Vercel();
async function run() {
const result = await vercel.replaceDomainsByDomainRecords({
domain: "example.com",
}, {
retries: {
strategy: "backoff",
backoff: {
initialInterval: 1,
maxInterval: 50,
exponent: 1.1,
maxElapsedTime: 100,
},
retryConnectionErrors: false,
},
});
console.log(result);
}
run();
If you'd like to override the default retry strategy for all operations that support retries, you can provide a retryConfig at SDK initialization:
import { Vercel } from "@vercel/sdk";
const vercel = new Vercel({
retryConfig: {
strategy: "backoff",
backoff: {
initialInterval: 1,
maxInterval: 50,
exponent: 1.1,
maxElapsedTime: 100,
},
retryConnectionErrors: false,
},
});
async function run() {
const result = await vercel.replaceDomainsByDomainRecords({
domain: "example.com",
});
console.log(result);
}
run();
VercelError is the base class for all HTTP error responses. It has the following properties:
| Property | Type | Description |
|---|---|---|
error.message | string | Error message |
error.statusCode | number | HTTP response status code eg 404 |
error.headers | Headers | HTTP response headers |
error.body | string | HTTP body. Can be empty string if no body is returned. |
error.rawResponse | Response | Raw HTTP response |
error.data$ | Optional. Some errors may contain structured data. See Error Classes. |
import { Vercel } from "@vercel/sdk";
import { CreateApiKeysResponseResponseBody } from "@vercel/sdk/models/createapikeysop.js";
import { VercelError } from "@vercel/sdk/models/vercelerror.js.js";
const vercel = new Vercel();
async function run() {
try {
const result = await vercel.createApiKeys({
purpose: "<value>",
projectId: "prj_12HKQaOmR5t5Uy6vdcQsNIiZgHGB",
name: "API Key for App 123",
});
console.log(result);
} catch (error) {
// The base class for HTTP error responses
if (error instanceof VercelError) {
console.log(error.message);
console.log(error.statusCode);
console.log(error.body);
console.log(error.headers);
// Depending on the method different errors may be thrown
if (error instanceof CreateApiKeysResponseResponseBody) {
console.log(error.data$.error); // models.CreateApiKeysError
}
}
}
}
run();
Primary error:
VercelError: The base class for HTTP error responses.Network errors:
ConnectionError: HTTP client was unable to make a request to a server.RequestTimeoutError: HTTP request timed out due to an AbortSignal signal.RequestAbortedError: HTTP request was aborted by the client.InvalidRequestError: Any input used to create a request is invalid.UnexpectedClientError: Unrecognised or unexpected error.Inherit from VercelError:
HttpApiDecodeError: The request did not match the expected schema. Status code 400. Applicable to 17 of 404 methods.*Unauthorized: Unauthorized. Status code 401. Applicable to 17 of 404 methods.*NotAuthorizedForScope: NotAuthorizedForScope. Status code 403. Applicable to 17 of 404 methods.*TooManyRequests: TooManyRequests. Status code 429. Applicable to 17 of 404 methods.*InternalServerError: InternalServerError. Status code 500. Applicable to 17 of 404 methods.*ConnectError: Error response returned by a Connect API operation. Applicable to 11 of 404 methods.*Forbidden: NotAuthorizedForScope. Status code 403. Applicable to 10 of 404 methods.*TldNotSupported: The TLD is not currently supported. Status code 400. Applicable to 7 of 404 methods.*DomainTooShort: The domain name (excluding the TLD) is too short. Status code 400. Applicable to 5 of 404 methods.*DomainNotRegistered: The domain is not registered with Vercel. Status code 400. Applicable to 5 of 404 methods.*DomainNotFound: The domain was not found in our system. Status code 404. Applicable to 5 of 404 methods.*BadRequest: There was something wrong with the request. Status code 400. Applicable to 4 of 404 methods.*ExpectedPriceMismatch: The expected price passed does not match the actual price. Status code 400. Applicable to 4 of 404 methods.*DomainNotAvailable: The domain is not available. Status code 400. Applicable to 4 of 404 methods.*NotFound: NotFound. Status code 404. Applicable to 3 of 404 methods.*OrderTooExpensive: The total price of the order is too high. Status code 400. Applicable to 2 of 404 methods.*InvalidAdditionalContactInfo: Additional contact information provided for the TLD is invalid. Status code 400. Applicable to 2 of 404 methods.*AdditionalContactInfoRequired: Additional contact information is required for the TLD. Status code 400. Applicable to 2 of 404 methods.*LanguageCodeRequired: A language code is required for punycode domains. Status code 400. Applicable to 2 of 404 methods.*TooManyDomains: The number of domains in the order is too high. Status code 400. Applicable to 1 of 404 methods.*DuplicateDomains: Duplicate domains were provided. Status code 400. Applicable to 1 of 404 methods.*DomainAlreadyOwned: The domain is already owned by another team or user. Status code 400. Applicable to 1 of 404 methods.*DNSSECEnabled: The operation cannot be completed because DNSSEC is enabled for the domain. Status code 400. Applicable to 1 of 404 methods.*DomainAlreadyRenewing: The domain is already renewing. Status code 400. Applicable to 1 of 404 methods.*DomainNotRenewable: The domain is not renewable. Status code 400. Applicable to 1 of 404 methods.*BoughtTooRecently: The domain was bought too recently to determine verification status. Status code 400. Applicable to 1 of 404 methods.*CreateApiKeysResponseResponseBody: The request is not authorized. Status code 401. Applicable to 1 of 404 methods.*CreateApiKeysResponse403ResponseBody: You do not have permission to access this resource. Status code 403. Applicable to 1 of 404 methods.*DomainCannotBeTransferedOutUntil: The domain cannot be transfered out until the specified date. Status code 409. Applicable to 1 of 404 methods.*CreateApiKeysResponse429ResponseBody: . Status code 429. Applicable to 1 of 404 methods.*CreateApiKeysResponse500ResponseBody: . Status code 500. Applicable to 1 of 404 methods.*ResponseValidationError: Type mismatch between the data returned from the server and the structure expected by the SDK. See error.rawValue for the raw value and error.pretty() for a nicely formatted multi-line string.* Check the method documentation to see if the error is applicable.
The default server can be overridden globally by passing a URL to the serverURL: string optional parameter when initializing the SDK client instance. For example:
import { Vercel } from "@vercel/sdk";
const vercel = new Vercel({
serverURL: "https://api.vercel.com",
});
async function run() {
const result = await vercel.replaceDomainsByDomainRecords({
domain: "example.com",
});
console.log(result);
}
run();
The TypeScript SDK makes API calls using an HTTPClient that wraps the native
Fetch API. This
client is a thin wrapper around fetch and provides the ability to attach hooks
around the request lifecycle that can be used to modify the request or handle
errors and response.
The HTTPClient constructor takes an optional fetcher argument that can be
used to integrate a third-party HTTP client or when writing tests to mock out
the HTTP client and feed in fixtures.
The following example shows how to:
"beforeRequest" hook to add a custom header and a timeout to requests"requestError" hook to log errorsimport { Vercel } from "@vercel/sdk";
import { ProxyAgent } from "undici";
import { HTTPClient } from "@vercel/sdk/lib/http";
const dispatcher = new ProxyAgent("http://proxy.example.com:8080");
const httpClient = new HTTPClient({
// 'fetcher' takes a function that has the same signature as native 'fetch'.
fetcher: (input, init) =>
// 'dispatcher' is specific to undici and not part of the standard Fetch API.
fetch(input, { ...init, dispatcher } as RequestInit),
});
httpClient.addHook("beforeRequest", (request) => {
const nextRequest = new Request(request, {
signal: request.signal || AbortSignal.timeout(5000)
});
nextRequest.headers.set("x-custom-header", "custom value");
return nextRequest;
});
httpClient.addHook("requestError", (error, request) => {
console.group("Request Error");
console.log("Reason:", `${error}`);
console.log("Endpoint:", `${request.method} ${request.url}`);
console.groupEnd();
});
const sdk = new Vercel({ httpClient: httpClient });
You can setup your SDK to emit debug logs for SDK requests and responses.
You can pass a logger that matches console's interface as an SDK option.
[!WARNING] Beware that debug logging will reveal secrets, like API tokens in headers, in log messages printed to a console or files. It's recommended to use this feature only during local development and not in production.
import { Vercel } from "@vercel/sdk";
const sdk = new Vercel({ debugLogger: console });
This SDK is in beta, and there may be breaking changes between versions without a major version update. Therefore, we recommend pinning usage to a specific package version. This way, you can install the same version each time without breaking changes unless you are intentionally looking for the latest version.
While we value open-source contributions to this SDK, this library is generated programmatically. Any manual changes added to internal files will be overwritten on the next generation. We look forward to hearing your feedback. Feel free to open a PR or an issue with a proof of concept and we'll do our best to include it in a future release.
TypeScript
100.0%