# Update Guardrail Governance

`PUT /api/governance/guardrails`

Update workspace guardrail governance policy. Requires admin role (level <= 2).

## Request body

Content type: `application/json`

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `default_mode` | enum | no |  |
| `systemone_model_id` | string \| null | no |  |
| `systemone_threshold` | number | no |  |
| `classic_input_regex` | boolean | no |  |
| `classic_inject_prompt_clause` | boolean | no |  |
| `output_protection_mode` | enum | no |  |
| `output_overlap_threshold` | number | no |  |

```json
{
  "default_mode": "hybrid",
  "systemone_model_id": "string",
  "systemone_threshold": 0.7,
  "classic_input_regex": true,
  "classic_inject_prompt_clause": true,
  "output_protection_mode": "off",
  "output_overlap_threshold": 0.3
}
```

## Responses

### 200 — Successful Response

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `policy` | object | yes |  |
| `policy.default_mode` | enum | no |  |
| `policy.systemone_model_id` | string \| null | no |  |
| `policy.systemone_threshold` | number | no |  |
| `policy.classic_input_regex` | boolean | no |  |
| `policy.classic_inject_prompt_clause` | boolean | no |  |
| `policy.output_protection_mode` | enum | no |  |
| `policy.output_overlap_threshold` | number | no |  |
| `systemone_status` | object | yes |  |
| `systemone_status.configured` | boolean | yes |  |
| `systemone_status.active_model_id` | string \| null | no |  |
| `systemone_status.active_model_name` | string \| null | no |  |
| `systemone_status.active_key_name` | string \| null | no |  |
| `systemone_status.available_models` | object[] | no |  |
| `systemone_status.available_models[].id` | string | yes |  |
| `systemone_status.available_models[].name` | string | yes |  |
| `systemone_status.available_models[].model_id` | string | yes |  |
| `systemone_status.available_models[].key_name` | string \| null | no |  |
| `systemone_status.available_models[].is_active` | boolean | yes |  |

```json
{
  "policy": {
    "default_mode": "hybrid",
    "systemone_model_id": "string",
    "systemone_threshold": 0.7,
    "classic_input_regex": true,
    "classic_inject_prompt_clause": true,
    "output_protection_mode": "off",
    "output_overlap_threshold": 0.3
  },
  "systemone_status": {
    "configured": true,
    "active_model_id": "string",
    "active_model_name": "string",
    "active_key_name": "string",
    "available_models": []
  }
}
```

### 400 — Bad Request - The request parameters or headers are invalid (e.g. unsupported API-Version).

### 401 — Unauthorized - Missing, invalid, or expired JWT Bearer token.

### 403 — Forbidden - Insufficient role permissions or resource access denied by RBAC policy.

### 404 — Not Found - The requested resource ID was not found.

### 422 — Validation Error

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `detail` | object[] | no |  |
| `detail[].loc` | string | integer[] | yes |  |
| `detail[].msg` | string | yes |  |
| `detail[].type` | string | yes |  |
| `detail[].input` | object | no |  |
| `detail[].ctx` | object | no |  |

```json
{
  "detail": [
    {
      "loc": [
        null
      ],
      "msg": "string",
      "type": "string",
      "input": null,
      "ctx": {}
    }
  ]
}
```

## Example

```bash
curl -X PUT "$PINTER_URL/api/governance/guardrails" \
  -H "Authorization: Bearer $ACCESS_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{"default_mode":"hybrid","systemone_model_id":"string","systemone_threshold":0.7,"classic_input_regex":true,"classic_inject_prompt_clause":true,"output_protection_mode":"off","output_overlap_threshold":0.3}'
```
