Skip to content
Docs

Delete routing rules

DELhttps://api.vercel.com/v1/projects/{projectId}/routes
Delete one or more routing rules from a project by ID. Stages a new version with the routes removed.
https://api.vercel.com/v1/projects/{projectId}/routes
const response = await fetch('https://api.vercel.com/v1/projects/projectId/routes?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
{
"deletedCount": "123",
"version": {
"alias": "string",
"createdBy": "string",
"id": "icfg_1234567890",
"isLive": "false",
"isStaging": "false",
"lastModified": "123",
"ruleCount": "123",
"s3Key": "string"
}
}
AuthorizationbearerToken

Default authentication mechanism

projectIdstringRequired
teamIdstringOptional
The Team identifier to perform the request on behalf of.
slugstringOptional
The Team slug to perform the request on behalf of.
application/json
routeIdsarrayRequired
The IDs of the routes to delete
200Success
deletedCountnumberRequired
versionobjectRequired
A version of routing rules stored in S3.
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
500Error