Update Guardrail
Update a guardrail policy.
PUT/v1/customer/guardrails/{id}
Request Parameters
| Name | Type | Required | Description |
|---|---|---|---|
id | string (UUID) | Required | Guardrail ID. |
name | string | Updated name. | |
description | string | Updated description. | |
rules | array | Replacement rules array. | |
action | string | Updated action: block | log | flag. | |
is_enabled | boolean | Enable/disable flag. |
Request Example
bash
curl -X PUT https://api.therouter.ai/v1/customer/guardrails/8ad59f90-33d6-4a0f-89a8-d76dba8e2b0f
-H "Authorization: Bearer $THEROUTER_API_KEY"
-H "Content-Type: application/json"
-d '{
"action": "flag",
"is_enabled": true
}'Response
json
{
"id": "8ad59f90-33d6-4a0f-89a8-d76dba8e2b0f",
"name": "pii-filter",
"description": null,
"rules": [{"type": "regex", "pattern": "\b\d{3}-\d{2}-\d{4}\b"}],
"action": "flag",
"is_enabled": true,
"trigger_count": 12,
"last_triggered_at": "2026-02-25T10:10:00.000Z",
"created_at": "2026-02-10T00:00:00.000Z",
"updated_at": "2026-02-26T09:20:00.000Z"
}Notes
Guardrail update uses
PUT at this path.