VercelVercel
Menu

Update the protection bypass for a URL

PATCHhttps://api.vercel.com/aliases/{id}/protection-bypass
Update the protection bypass for the alias or deployment URL (used for user access & comment access for deployments). Used as shareable links and user scoped access for Vercel Authentication and also to allow external (logged in) people to comment on previews for Preview Comments (next-live-mode).
https://api.vercel.com/aliases/{id}/protection-bypass
const response = await fetch('https://api.vercel.com/aliases/id/protection-bypass?teamId=string&slug=string', {
method: 'PATCH',
headers: {
'Authorization': 'Bearer YOUR_ACCESS_TOKEN',
'Content-Type': 'application/json',
},
body: JSON.stringify({
"ttl": "123",
"revoke": {
"secret": "string",
"regenerate": "true"
}
}),
});
const data = await response.json();
console.log(data);
Response
"value"
AuthorizationbearerToken

Default authentication mechanism

idstringRequired
The alias or deployment ID
teamIdstringOptional
The Team identifier to perform the request on behalf of.
slugstringOptional
The Team slug to perform the request on behalf of.
application/json
ttlnumberOptional
Optional time the shareable link is valid for in seconds. If not provided, the shareable link will never expire.
revokeobjectOptional
Optional instructions for revoking and regenerating a shareable link
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.
404Error
409Error
428Error