---
title: "Update the protection bypass for a URL"
method: PATCH
path: "/aliases/{id}/protection-bypass"
tags: ["aliases"]
---

# Update the protection bypass for a URL

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

## Path parameters

- `id` string, required — The alias or deployment ID

## Query parameters

- `teamId` string
- `slug` string

## Request body

- union
  - object
    - `ttl` number — Optional time the shareable link is valid for in seconds. If not provided, the shareable link will never expire.
    - `revoke` object — Optional instructions for revoking and regenerating a shareable link
      - `secret` string, required — Sharebale link to revoked
      - `regenerate` boolean, required — Whether or not a new shareable link should be created after the provided secret is revoked
  - object
    - `scope` union, required
      - object — Instructions for creating a user scoped protection bypass
        - `userId` string, required — Specified user id for the scoped bypass.
        - `email` string, email — Specified email for the scoped bypass.
        - `access` 'denied' | 'granted', required — Invitation status for the user scoped bypass.
      - object — Instructions for creating a user scoped protection bypass
        - `userId` string — Specified user id for the scoped bypass.
        - `email` string, email, required — Specified email for the scoped bypass.
        - `access` 'denied' | 'granted', required — Invitation status for the user scoped bypass.
  - object
    - `override` object, required
      - `scope` 'alias-protection-override', required
      - `action` 'create' | 'revoke', required

## Response `200`

- object

## Other responses

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

---

[API](https://skmtc.net/vercel/apis/api.md) · [All operations](https://skmtc.net/vercel/apis/api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/vercel/api/versions/61d1ba3f6dac/schema)
