Skip to content
Docs

Delete a Deployment

DELhttps://api.vercel.com/v13/deployments/{id}
This API allows you to delete a deployment, either by supplying its id in the URL or the url of the deployment as a query parameter. You can obtain the ID, for example, by listing all deployments.
https://api.vercel.com/v13/deployments/{id}
const response = await fetch('https://api.vercel.com/v13/deployments/id?url=string&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
{
"state": "DELETED",
"uid": "dpl_5WJWYSyB7BpgTj3EuwF37WMRBXBtPQ2iTMJHJBJyRfd"
}
AuthorizationbearerToken

Default authentication mechanism

idstringRequired
The ID of the deployment to be deleted
urlstringOptional
A Deployment or Alias URL. In case it is passed, the ID will be ignored
teamIdstringOptional
The Team identifier to perform the request on behalf of.
slugstringOptional
The Team slug to perform the request on behalf of.
200The deployment was successfully deleted
statestringRequired
A constant with the final state of the deployment.
uidstringRequired
The removed deployment ID.
400One of the provided values in the request query is invalid.
401The request is not authorized.
403You do not have permission to access this resource.
404The deployment was not found
410Error