Delete an approval gate that has no pending approvals.
DELETE/v1/projects/{projectId}/approval-gates/{gateId}Try it
Session token
Delete a gate. Approvals already decided against it — approved or rejected — are deleted with it. A gate that still has pending approvals cannot be deleted: decide them first, or switch the gate off with enabled: false instead.
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.
Warning
Deleting a gate also deletes the history of every decided approval filed against it. Switch the gate off if you want to keep that history.
Path Parameters
NameDescription
projectId:stringpathRequired
The project ID.
gateId:stringpathRequired
The gate ID. A gate that belongs to another project returns 404.
Response — 200 OK
The response has no data field. The deletion is recorded in the audit log as approval_gate.delete.
Error Responses
401 Unauthorized
No session JWT, an expired one, or an API key.
403 Forbidden
forbidden — your role is below admin (details.requiredRole, details.currentRole), or you are not a member of the organization that owns the project.
404 Not Found
not_found — the project does not exist or was deleted, or the gate is not one of this project's.
409 Conflict
gate_in_use — approvals are still pending on the gate. details.pending is how many. Nothing was deleted.
json
{
"error": {
"code": "gate_in_use",
"message": "This gate has 2 pending approvals. Decide them or switch the gate off instead.",