CreateDeploymentRequestBody

August 10, 2026 ยท View on GitHub

Example Usage

import { CreateDeploymentRequestBody } from "@vercel/sdk/models/createdeploymentmissingdeploymentstype.js";

let value: CreateDeploymentRequestBody = {
  customEnvironmentSlugOrId: "staging",
  deploymentId: "dpl_2qn7PZrx89yxY34vEZPD31Y9XVj6",
  files: [
    {
      file: "folder/file.js",
    },
  ],
  gitMetadata: {
    remoteUrl: "https://github.com/vercel/next.js",
    commitAuthorName: "kyliau",
    commitAuthorEmail: "kyliau@example.com",
    commitMessage:
      "add method to measure Interaction to Next Paint (INP) (#36490)",
    commitRef: "main",
    commitSha: "dc36199b2234c6586ebe05ec94078a895c707e29",
    dirty: true,
    ci: true,
    ciType: "github-actions",
    ciGitProviderUsername: "rauchg",
    ciGitRepoVisibility: "private",
    rootDirectory: "apps/web",
  },
  gitSource: {
    ref: "main",
    repoId: 123456789,
    sha: "a1b2c3d4e5f6g7h8i9j0k1l2m3n4o5p6q7r8s9t0",
    type: "github-limited",
  },
  meta: {
    "foo": "bar",
  },
  name: "my-instant-deployment",
  project: "my-deployment-project",
  projectSettings: {
    buildCommand: "next build",
    installCommand: "pnpm install",
  },
  target: "production",
};

Fields

FieldTypeRequiredDescriptionExample
customEnvironmentSlugOrIdstring:heavy_minus_sign:The slug or ID of a custom environment to deploy to, overriding the default target environment. When omitted, the deployment targets the environment inferred from the branch (production or preview).staging
deploymentIdstring:heavy_minus_sign:The ID of an existing deployment to redeploy. All project settings and environment variables are inherited from the original unless explicitly overridden in this request. The redeployment gets a new ID, URL, and build.dpl_2qn7PZrx89yxY34vEZPD31Y9XVj6
filesmodels.Files[]:heavy_minus_sign:The files to include in the deployment. Each entry is either an inlined file (with data and encoding) or a reference to a previously uploaded file (with sha and size). Required for non-git deployments. Cannot be used together with gitSource.
gitMetadatamodels.GitMetadata:heavy_minus_sign:Populates initial git metadata for different git providers.
gitSourcemodels.GitSource:heavy_minus_sign:Defines the Git Repository source to be deployed. This property can not be used in combination with files.
metaRecord<string, string>:heavy_minus_sign:An object containing the deployment's metadata. Multiple key-value pairs can be attached to a deployment{
"foo": "bar"
}
monorepoManagerstring:heavy_minus_sign:The monorepo manager that is being used for this deployment. When null is used no monorepo manager is selected
namestring:heavy_check_mark:A string with the project name used in the deployment URLmy-instant-deployment
projectstring:heavy_minus_sign:The target project identifier in which the deployment will be created. When defined, this parameter overrides namemy-deployment-project
projectSettingsmodels.ProjectSettings:heavy_minus_sign:Project settings that will be applied to the deployment. It is required for the first deployment of a project and will be saved for any following deployments
targetstring:heavy_minus_sign:Either not defined, staging, production, or a custom environment identifier. If staging, a staging alias in the format <project>-<team>.vercel.app will be assigned. If production, any aliases defined in alias will be assigned. If omitted, the target will be preview.production
withLatestCommitboolean:heavy_minus_sign:When true and deploymentId is passed in, the sha from the previous deployment's gitSource is removed forcing the latest commit to be used.