environment

Create a custom environment for the current project.

Changed on

Creates a custom environment for the current project. Cannot be named 'Production' or 'Preview'.

post/v9/projects/{idOrName}/custom-environments

Request

  • Base URL: https://api.vercel.com
  • URL: https://api.vercel.com/v9/projects/{idOrName}/custom-environments
  • Auth: HTTP bearer

Path parameters

idOrNamestring required

The unique project identifier or the project name

Query parameters

teamIdstring
Example:team_1a2b3c4d5e6f7g8h9i0j1k2l

The Team identifier to perform the request on behalf of.

slugstring
Example:my-team-url-slug

The Team slug to perform the request on behalf of.

Request body

slugstring

The slug of the custom environment to create.

descriptionstring

Description of the custom environment. This is optional.

copyEnvVarsFromstring

Where to copy environment variables from. This is optional.

Response

createdAtnumber required

Timestamp when the environment was created

currentDeploymentAliasesstring[]

List of aliases for the current deployment

descriptionstring

Optional description of the environment's purpose

idstring required

Unique identifier for the custom environment (format: env_*)

slugstring required

URL-friendly name of the environment

type'development' | 'preview' | 'production' required

The type of environment (production, preview, or development)

updatedAtnumber required

Timestamp when the environment was last updated

Changes