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

## Request

- Base URL: `https://api.vercel.com`
- URL: `https://api.vercel.com/v1/projects/{idOrName}/protection-bypass`
- Auth: HTTP bearer

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`

## Changes

- **2026-07-21** `2ae10ee9d21c`: 1 info
  - added the non-success response with the status `410`
- **2026-01-22** `c12186034433`: 1 breaking, 4 info
  - request body became required
  - added the new optional request property `generate/note`
  - added the new optional request property `update`
  - added the optional property `protectionBypass/additionalProperties/oneOf[subschema #2]/isEnvVar` to the response with the `200` status
  - …1 more
- **2025-05-17** `67f6a93c3cd8`: 5 breaking
  - added `subschema #1, subschema #2` to the `protectionBypass/additionalProperties/` response property `oneOf` list for the response status `200`
  - the `protectionBypass/additionalProperties/` response's property type changed from `object` to no type for status `200`
  - removed the required property `protectionBypass/additionalProperties/createdAt` from the response with the `200` status
  - removed the required property `protectionBypass/additionalProperties/createdBy` from the response with the `200` status
  - …1 more
- **2025-03-19** `37b482c58c92`: 1 info
  - endpoint added

[Operation history](https://skmtc.dev/vercel/apis/vercel-api/changes/v1/projects/:idOrName/protection-bypass/patch.md)

---

[API](https://skmtc.dev/vercel/apis/vercel-api.md) - [All operations](https://skmtc.dev/vercel/apis/vercel-api/llms.txt) - [OpenAPI document](https://skmtc.dev/vercel/apis/vercel-api/revisions/60686c0e1f6a?raw)
