---
title: "Set Gate Enforce"
method: POST
path: "/environments/{env_id}/gate-enforce"
---

# Set Gate Enforce

`POST /environments/{env_id}/gate-enforce`

## Request

- Base URL: `https://api-docs.session-exchange.com` (the document declares no server; this is the origin it was published from)
- URL: `https://api-docs.session-exchange.com/environments/{env_id}/gate-enforce`
- Auth: none declared

Per-environment STRICT at_target-gate opt-in. `legs` REPLACES the env's own
enforced-leg set — a leg listed here makes that gate hard for THIS environment
even when the tenant-wide MODEL_GATE_ENFORCE doesn't list it (per-env can only
ADD enforcement; it never relaxes a tenant-wide gate). Governed/meta: admin only
— a loop can never opt its own env into (or out of) strict grading. Empty list
clears the env's enforcement.

## Path parameters

- `env_id` string, required

## Request body

- EnvironmentGateEnforceRequest: Per-environment STRICT at_target-gate opt-in (model-gate hardening). `legs` REPLACES this environment's enforced-leg set: a leg listed here makes that gate hard for THIS env even when the tenant-wide MODEL_GATE_ENFORCE does not list it (per-env can only ADD enforcement, never relax a tenant-wide gate). Empty list clears the env's own enforcement. Unknown legs are rejected.
  - `legs` string[]

## Response `200`

Successful Response

- unknown

## Other responses

- `422`: Validation Error

---

[API](https://skmtc.dev/session-exchange/apis/a4sx.md) · [All operations](https://skmtc.dev/session-exchange/apis/a4sx/llms.txt) · [OpenAPI document](https://skmtc.dev/session-exchange/apis/a4sx/revisions/abaefc33dfc7?raw)
