PATCH/v1/projects/{projectId}/approval-gates/{gateId}Try it
Session token
Edit a gate's name, path pattern, approver rules — or switch it off without deleting it. Send only the fields you want to change; the response is the full gate.
Note
Requires the admin or owner role, signed in with a session JWT — API keys are refused with 401. A member gets 403 forbidden with details.requiredRole: "admin" and details.currentRole — see Role errors. You must belong to the organization that owns {projectId}. Available on every plan.
Path Parameters
NameDescription
projectId:stringpathRequired
The project ID.
gateId:stringpathRequired
The gate ID. A gate that belongs to another project returns 404.
Request Body
Every field is optional. Unknown keys are ignored, and an empty body returns the gate unchanged.
NameDescription
name:stringbody
1–200 characters. Leading and trailing whitespace is trimmed.
description:string | nullbody
Up to 2000 characters. null clears it.
pagePattern:stringbody
The paths the gate covers, e.g. api-reference/**. 1–500 characters.
requiredApprovers:integerbody
How many distinct people must approve, 1–20.
approverRoles:string[]body
1–3 of owner, admin, member. Each entry is a minimum role, so ["member"] admits everyone. Duplicates are removed. Any other value — viewer, for example — returns 400.
enabled:booleanbody
false switches the gate off. A disabled gate still appears in GET /approval-gates.
Response — 200 OK
The change is recorded in the audit log as approval_gate.update.
Error Responses
400 Bad Request
validation_error — the body failed schema validation: a field out of range, or an unknown approver role. details.issues lists each problem: