# Update the protection bypass for a URL

PATCH `https://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).

## Example Request

```typescript
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

```json
"value"
```

## Authentication

**Authorization** bearerToken  
Default authentication mechanism.

## Path parameters

- **id**: string  
Required - The alias or deployment ID.

## Query parameters

- **teamId**: string  
Optional - The Team identifier to perform the request on behalf of.
- **slug**: string  
Optional - The Team slug to perform the request on behalf of.

## Body

**Content-Type**: application/json

- **ttl**: number  
Optional - Optional time the shareable link is valid for in seconds. If not provided, the shareable link will never expire.
- **revoke**: object  
Optional - Optional instructions for revoking and regenerating a shareable link.

## Response

200 Success

## Errors

- **400**: One of the provided values in the request body is invalid.  
- **401**: The request is not authorized.  
- **403**: You do not have permission to access this resource.  
- **404**: Error  
- **409**: Error  
- **410**: Error  
- **428**: Error
