Skip to content
Docs

Batch remove environment variables

DELhttps://api.vercel.com/v1/projects/{idOrName}/env
Delete multiple environment variables for a given project in a single batch operation.
https://api.vercel.com/v1/projects/{idOrName}/env
const response = await fetch('https://api.vercel.com/v1/projects/idOrName/env?teamId=string&slug=string', {
method: 'DELETE',
headers: {
'Authorization': 'Bearer YOUR_ACCESS_TOKEN',
'Content-Type': 'application/json',
},
});
const data = await response.json();
console.log(data);
Response
{
"deleted": "123",
"ids": []
}
AuthorizationbearerToken

Default authentication mechanism

idOrNamestringRequired
The unique project identifier or the project name
teamIdstringOptional
The Team identifier to perform the request on behalf of.
slugstringOptional
The Team slug to perform the request on behalf of.
application/json
idsarrayRequired
Array of environment variable IDs to delete
200Success
deletednumberRequired
idsarrayRequired
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.
404Error
409Error
410Error