---
title: "Update Protection Bypass for Automation"
method: PATCH
path: "/v1/projects/{idOrName}/protection-bypass"
tags: ["projects"]
---

# Update Protection Bypass for Automation

`PATCH /v1/projects/{idOrName}/protection-bypass`

Update the deployment protection automation bypass for a project

## Path parameters

- `idOrName` string, required — The unique project identifier or the project name

## Query parameters

- `teamId` string
- `slug` string

## Request body

- object
  - `revoke` object — Optional instructions for revoking and regenerating a automation bypass
    - `secret` string, required — Automation bypass to revoked
    - `regenerate` boolean, required — Whether or not a new automation bypass should be created after the provided secret is revoked
  - `generate` object — Generate a new secret. If neither generate or revoke are provided, a new random secret will be generated.
    - `secret` string — Optional value of the secret to generate, don't send it for oauth2 tokens
    - `note` string — Note to be displayed in the UI for this bypass
  - `update` object — Update an existing bypass
    - `secret` string, required — Automation bypass to updated
    - `isEnvVar` boolean — Whether or not this bypass is set as the VERCEL_AUTOMATION_BYPASS_SECRET environment variable on deployments
    - `note` string — Note to be displayed in the UI for this bypass

## Response `200`

- object
  - `protectionBypass` 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`

---

[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/b4d86a3e3479/schema)
