Deploy Button Source

Learn how to use the Vercel Deploy Button source URL parameters.
Table of Contents
ParameterTypeValue
repository-urlstringThe source Git repository URL

The Repository URL parameter allows you to define a Git repository URL, optionally including the subdirectory within a repository, that users will clone into their GitHub, GitLab, or Bitbucket account when going through the Vercel Project creation flow.

The example below shows how to use the Repository URL parameter to set the repository URL to hello-world:

repository url
https://vercel.com/new/clone?repository-url=https%3A%2F%2Fgithub.com%2Fvercel%2Fnext.js%2Ftree%2Fcanary%2Fexamples%2Fhello-world

The Repository URL parameter is required when sending a user to the Vercel Project creation flow to set up a project from a GitHub, GitLab, or Bitbucket repository.

ParameterTypeValue
project-namestringA default project name

The Project Name parameter allows you to define a default project name.

This parameter is useful for cases where already know what the user would like to name their project. For example, if you are sending the user to the Project creation flow from an application that has already set up a project for the user that will connect to the created Vercel project.

If there is an existing project using the name passed with this parameter, the user will be required to define a new project name, and therefore the project is not guaranteed to have the specified name.

The example below shows how to use the Project Name parameter to set the project name to "my-awesome-project":

project name
https://vercel.com/new/clone?repository-url=https%3A%2F%2Fgithub.com%2Fvercel%2Fnext.js%2Ftree%2Fcanary%2Fexamples%2Fhello-world&project-name=my-awesome-project
ParameterTypeValue
repository-namestringA default repository name (no spaces)

The Repository Name parameter allows you to define a default repository name.

Similar to the Project Name parameter, this parameter is useful in cases where you already know what the user wants to name their repository.

The example below shows how to use the Repository Name parameter to set the repository name to "my-awesome-project":

repository name
https://vercel.com/new/clone?repository-url=https%3A%2F%2Fgithub.com%2Fvercel%2Fnext.js%2Ftree%2Fcanary%2Fexamples%2Fhello-world&repository-name=my-awesome-project
ParameterTypeValue
storesstringA default JSON object converted to a string

The JSON object parameter allows you to define a default store product.

The example below shows how to set the parameter to the following JSON value:

{
  "type": "integration",
  "integrationSlug": "my-integration-slug",
  "productSlug": "my-product-slug"
}

First, convert the parameter to a string:

const jsonParam = encodeURIComponent(
  JSON.stringify([
    {
      type: 'integration',
      integrationSlug: 'my-integration-slug',
      productSlug: 'my-product-slug',
    },
  ]),
);

Then, use it as follows:

stores
https://vercel.com/new/clone?repository-url=https%3A%2F%2Fgithub.com%2Fvercel%2Fvercel%2Ftree%2Fmain%2Fexamples%2Fnextjs&project-name=my-awesome-project&repository-name=my-awesome-project&stores=%5B%7B%22type%22%3A%22integration%22%2C%22integrationSlug%22%3A%22aws-marketplace-integration-demo%22%2C%22productSlug%22%3A%22vector%22%7D%5D
Last updated on September 4, 2024