---
title: "POST /projects/{projectId}/scenario-runs/{runId}/gate"
method: POST
path: "/projects/{projectId}/scenario-runs/{runId}/gate"
---

# POST /projects/{projectId}/scenario-runs/{runId}/gate

`POST /projects/{projectId}/scenario-runs/{runId}/gate`

## Request

- Base URL: `https://api.caveman.so/api/v1`
- URL: `https://api.caveman.so/api/v1/projects/{projectId}/scenario-runs/{runId}/gate`
- Auth: one of:
  - OAuth 2
    - Authorization code: `/api/v1/oauth/authorize`
    - Token URL: `/api/v1/oauth/token` scopes: `experiment:approve_s3`
  - HTTP bearer
  - API key in cookie `cave_access`
  - API key in cookie `__Secure-cave_identity.session_token`

POST /api/v1/projects/{projectId}/scenario-runs/{runId}/gate on the Caveman Cloud control plane. Requires the experiment:approve_s3 scope. Not exposed to autonomous agents: Sandbox credential management and recording rollout gate approval remain human-only.

## Request body

- object
  - `candidate` string, required

## Response `200`

Tenant-scoped simulation evidence

- ScenarioGate
  - `eligible` boolean, required
  - `reasons` string[], required
  - `evidence_basis` 'simulation', required
  - `outcome` 'ship' | 'pass' | 'worse' | 'not_cheaper' | 'need_more_data' | 'underpowered'
  - `needs_cases` integer
  - `needs_more_cases` integer

## Other responses

- `400`: Structured failure. `error.code` is stable; `error.request_id` is echoed in the x-cave-request-id header.
- `403`: Structured failure. `error.code` is stable; `error.request_id` is echoed in the x-cave-request-id header.
- `409`: Structured failure. `error.code` is stable; `error.request_id` is echoed in the x-cave-request-id header.
- `422`: Structured failure. `error.code` is stable; `error.request_id` is echoed in the x-cave-request-id header.
- `4XX`: Structured failure. `error.code` is stable; `error.request_id` is echoed in the x-cave-request-id header.
- `5XX`: Structured failure. `error.code` is stable; `error.request_id` is echoed in the x-cave-request-id header.

---

[API](https://skmtc.dev/caveman/apis/caveman-cloud-api.md) - [All operations](https://skmtc.dev/caveman/apis/caveman-cloud-api/llms.txt) - [OpenAPI document](https://skmtc.dev/caveman/apis/caveman-cloud-api/revisions/508312d01cfc?raw)
