Remove a custom environment
DEL
https://api.vercel.com/v9/projects/{idOrName}/custom-environments/{environmentSlugOrId}Remove a custom environment for the project. Must not be named 'Production' or 'Preview'.
Request
import { Vercel } from "@vercel/sdk";
const vercel = new Vercel({ bearerToken: "<YOUR_BEARER_TOKEN_HERE>",});
async function run() { const result = await vercel.environment.removeCustomEnvironment({ idOrName: "<value>", environmentSlugOrId: "<id>", teamId: "team_1a2b3c4d5e6f7g8h9i0j1k2l", slug: "my-team-url-slug", });
console.log(result);}
run();Response
{ "id": "icfg_1234567890", "slug": "string", "type": "development", "description": "string", "branchMatcher": { "type": "endsWith", "pattern": "string" }, "domains": [ { "name": "Example Name", "apexName": "Example Name", "projectId": "example_id", "redirect": "string", "redirectStatusCode": "301", "gitBranch": "string", "customEnvironmentId": "example_id", "updatedAt": "123", "createdAt": "123", "verified": "false", "verification": [ { "type": "string", "domain": "string", "value": "string", "reason": "Customer requested refund" } ] } ], "currentDeploymentAliases": [], "createdAt": "123", "updatedAt": "123"}AuthorizationbearerToken
Default authentication mechanism
200Success
400One of the provided values in the request body is invalid.
One of the provided values in the request query is invalid.
401The request is not authorized.
403You do not have permission to access this resource.
410Error