Skip to main content
New to Corsair? See API access, authentication, and error handling.

Aliases

assignAlias

aliases.assignAlias Point a hostname at a deployment. If the hostname already serves another deployment it moves, so live traffic switches; the response names the old deployment so it can be moved back. Risk: write
Input Output

deleteAlias

aliases.deleteAlias Remove an alias by id or hostname. The hostname stops serving the deployment until it is assigned again, and share links on it are lost. Risk: destructive
Input Output

getAlias

aliases.getAlias Get one alias by id or hostname: the deployment and project it points at, redirect settings and creator. Risk: read
Input Output

getAliases

aliases.getAliases List aliases (hostnames pointing at deployments), newest first, filtered by domain or project. Page with until = pagination.next. Risk: read
Input Output

getDeploymentAliases

aliases.getDeploymentAliases List the aliases (hostnames) currently pointing at a deployment. Risk: read
Input Output

Deployments

cancelDeployment

deployments.cancelDeployment Stop a deployment that is still queued or building. Fails with 400 once it is READY, ERROR or already CANCELED. Redeploy to build it again. Risk: write
Input Output

createDeployment

deployments.createDeployment Start a deployment from a Git ref, from inline files, or as a redeploy of an existing deployment. It builds in the background: follow readyState with getDeployment. target production replaces the live site once ready. Risk: destructive
Input
Output

deleteDeployment

deployments.deleteDeployment Delete a deployment by id or hostname. Its URL stops serving and its build output and logs are gone. Cannot be undone. Risk: destructive · Irreversible
Input Output

getDeployment

deployments.getDeployment Get one deployment by id or hostname: readyState (QUEUED, BUILDING, READY, ERROR, CANCELED), URL, aliases, creator, Git metadata and error details. Risk: read
Input Output

getDeploymentEvents

deployments.getDeploymentEvents Read the build logs of a deployment: stdout/stderr lines and state changes, oldest first by default. Returns what has been logged so far; it does not wait for new lines. Risk: read
Input Output: object[]

getDeploymentFiles

deployments.getDeploymentFiles Get the source file tree of a deployment made with the CLI or the API files field. Git deployments have no file tree and return 404. Risk: read
Input Output: object[]

getDeployments

deployments.getDeployments List deployments, newest first, filtered by project, environment, state, branch, commit or creator. Page with until = pagination.next. Risk: read
Input Output

Dns

createRecord

dns.createRecord Add a DNS record to a domain whose DNS is on Vercel. Fields depend on type: A, AAAA, ALIAS, CAA, CNAME, TXT and NS take value; MX takes value and mxPriority; SRV takes srv; HTTPS takes https. Takes effect on live traffic and email. Risk: write
Input: object
Output

deleteRecord

dns.deleteRecord Delete a DNS record from a domain. Takes effect on live traffic and email, and the record cannot be restored, only recreated with a new id. Risk: destructive · Irreversible
Input Output

getRecords

dns.getRecords List the DNS records in a domain’s Vercel DNS zone, 20 per page by default. Empty when the domain’s DNS is hosted elsewhere (check serviceType with domains.getDomain). For the next page pass pagination.next as until. Risk: read
Input Output

updateRecord

dns.updateRecord Change an existing DNS record by id (from getRecords): name, value, type, TTL, MX priority, SRV or HTTPS data, comment. Takes effect on live traffic and email; read the record first to be able to restore it. Risk: write
Input
Output

Domains

addDomain

domains.addDomain Add a domain you already own to the account. No purchase or transfer. It may need ownership verification through DNS before it serves; zone: true creates a Vercel DNS zone (use when its nameservers point at Vercel). To serve it from a project, also call addProjectDomain. Risk: write
Input Output

addProjectDomain

domains.addProjectDomain Assign a domain to a project, optionally as a redirect or tied to a git branch or custom environment. If verified comes back false, set the record listed in verification, then call verifyProjectDomain. Errors if the domain is already on the project. Risk: write
Input Output

deleteDomain

domains.deleteDomain Remove a domain from the account. Also removes its aliases and every DNS record in its Vercel DNS zone; the records cannot be recovered. Does not cancel a registration held at another registrar. Risk: destructive · Irreversible
Input Output

getDomain

domains.getDomain Get one account domain by name: whether ownership is verified, current and intended nameservers, whether Vercel serves its DNS (serviceType), and purchase/expiry dates when bought through Vercel. Risk: read
Input Output

getDomainConfig

domains.getDomainConfig Check whether a domain’s DNS points at Vercel: misconfigured, configuredBy (A, CNAME, http or null) and the recommended A and CNAME values to set at the DNS provider. Pass projectIdOrName for a domain not on a project yet. Risk: read
Input Output

getDomains

domains.getDomains List the domains in the account or team (apex domains, not per-project assignments), newest first, 20 per page by default. For the next page pass pagination.next as until. Risk: read
Input Output

getProjectDomain

domains.getProjectDomain Get one domain on a project, including the verification challenge (the DNS record to set) when verified is false. Risk: read
Input Output

getProjectDomains

domains.getProjectDomains List the domains assigned to a project (custom domains and *.vercel.app) with their redirect, git branch and verification state. Filters: production, target, gitBranch, verified, redirects, redirect, customEnvironmentId. Risk: read
Input Output

removeProjectDomain

domains.removeProjectDomain Unassign a domain from a project; it stops serving that project immediately. The domain stays in the account and can be added back, though it may need verifying again. removeRedirects: true also removes the project domains that redirect to it. Risk: destructive
Input Output

updateProjectDomain

domains.updateProjectDomain Change a project domain’s git branch or redirect (target domain and status code). Pass null to clear a field. Risk: write
Input Output

verifyProjectDomain

domains.verifyProjectDomain Re-check an unverified project domain’s verification challenge and mark it verified once the DNS record is in place. Errors if the challenge isn’t satisfied yet. Risk: write
Input Output

Edge Config

getEdgeConfig

edgeConfig.getEdgeConfig Get one Edge Config (Global Config) by id: slug, item count, size and digest. Risk: read
Input Output

getEdgeConfigItem

edgeConfig.getEdgeConfigItem Read one Edge Config (Global Config) item by key. Returns found: false when the key does not exist. Risk: read
Input Output

getEdgeConfigItems

edgeConfig.getEdgeConfigItems List every item (key, JSON value, description) stored in an Edge Config (Global Config). Risk: read
Input Output: object[]

getEdgeConfigs

edgeConfig.getEdgeConfigs List the team’s Edge Configs (called Global Config in Vercel’s API): id, slug, item count and size. Risk: read
Input Output: object[]

updateEdgeConfigItems

edgeConfig.updateEdgeConfigItems Change several Edge Config (Global Config) items in one request: create, update, upsert or delete items by key. A delete removes the item and its value for good. Risk: write
Input
Output

Envs

createEnvVariable

envs.createEnvVariable Add one or several environment variables to a project (key, value, type, target environments, optional Git branch). Variables that already exist are listed under failed unless upsert is true. Takes effect on the next deployment. Risk: write
Input
Output

deleteEnvVariable

envs.deleteEnvVariable Delete an environment variable by id. Its value is gone for good; deployments built after this no longer get it. Risk: destructive · Irreversible
Input Output

getEnvVariable

envs.getEnvVariable Get one environment variable by id, including its DECRYPTED value (the secret itself) for encrypted and plain variables. Sensitive variables never return a value. Risk: read
Input Output

getEnvVariables

envs.getEnvVariables List a project’s environment variables: key, type, targets, Git branch and id. Values of encrypted and sensitive variables come back encrypted (plain ones as is); use getEnvVariable to read one decrypted value. Risk: read
Input Output

updateEnvVariable

envs.updateEnvVariable Change an environment variable by id: its value, key, type, targets, Git branch or comment. Takes effect on the next deployment. Risk: write
Input Output

Projects

createProject

projects.createProject Create a project, optionally connected to a Git repo and with initial environment variables. Risk: write
Input
Output

deleteProject

projects.deleteProject Delete a project with all its deployments, domains and environment variables. Cannot be undone. Risk: destructive · Irreversible
Input Output

getProject

projects.getProject Get a project by id or name, with its settings and latest deployments. Risk: read
Input Output

getProjectMembers

projects.getProjectMembers List the members of a project and their project roles. Risk: read
Input Output

getProjects

projects.getProjects List projects in the team, newest first, with optional search and repo filters. Risk: read
Input Output

pauseProject

projects.pauseProject Pause a project: its production deployment stops serving until unpaused. Risk: write
Input Output

promoteDeployment

projects.promoteDeployment Make an existing production build (an earlier or staged production deployment) the live production deployment, without rebuilding. Vercel refuses preview deployments (422); redeploy those with target production instead. Runs in the background: getProject with rollbackInfo shows its jobStatus. Risk: write
Input Output

rollbackDeployment

projects.rollbackDeployment Roll production back to an earlier deployment (Instant Rollback). Risk: write
Input Output

unpauseProject

projects.unpauseProject Unpause a paused project so production serves again. Risk: write
Input Output

updateProject

projects.updateProject Update project settings: name, framework, build/dev/install commands, Node version, protection. Risk: write
Input
Output

Teams

getTeam

teams.getTeam Get a team by id or slug (default: the connected team): name, slug, plan, creation date and the user’s membership. Risk: read
Input Output

getTeamMembers

teams.getTeamMembers List a team’s members (default: the connected team) with their role, username and email. Filter by role or search by name, username or email. Risk: read
Input Output

getTeams

teams.getTeams List the teams the token’s user belongs to, with each team’s id, slug, name and the user’s role. Risk: read
Input Output

User

getUser

user.getUser Get the user the token belongs to: id, username, name, email and default team id. Risk: read
Input: empty object Output

Webhooks

createWebhook

webhooks.createWebhook Register a URL to receive Vercel events (deployments, projects, domains, env vars and more), for all projects or chosen ones. Returns the signing secret used to verify deliveries; it is shown only once, so store it. Risk: write
Input Output

deleteWebhook

webhooks.deleteWebhook Delete a webhook: Vercel stops sending events to its URL. A replacement gets a new id and signing secret. Risk: destructive · Irreversible
Input Output

getWebhook

webhooks.getWebhook Get one webhook by id: URL, events and projects. Risk: read
Input Output

getWebhooks

webhooks.getWebhooks List the team’s webhooks: URL, subscribed events and the projects each covers. Filter by project. Risk: read
Input Output: object[]