Update the protection bypass for a URL
PATCH
https://api.vercel.com/aliases/{id}/protection-bypassUpdate 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