API referenceEndpoints

Set application guardrail policy

Requires an application credential holding the application-admin role; the credential names the application it acts for. Generated from the production route registered in `internal/features/guardrail/inbound/http_application.go`.

PUT/v1/application/guardrails

Requires an application credential holding the application-admin role; the credential names the application it acts for. Generated from the production route registered in internal/features/guardrail/inbound/http_application.go.

Authorization

bearerAuth
AuthorizationBearer <token>

Engine-issued API key or tenant-signed JWT.

In: header

Request Body

application/json

TypeScript Definitions

Use the request body type in TypeScript.

A COMPLETE guardrail policy: the four known checks (safety, pii, topic, injection) and the directions it governs. A write replaces the whole policy — an omitted check is absent, never inherited from a previous version or from another layer — and at least one direction must be enabled.

Response Body

application/json

application/json

application/json

application/json

application/json

application/json

application/json

application/json

curl -X PUT "https://example.com/v1/application/guardrails" \  -H "Content-Type: application/json" \  -d '{    "checks": {      "property1": {        "enabled": true,        "action": "monitor"      },      "property2": {        "enabled": true,        "action": "monitor"      }    },    "apply_to": {      "input": true,      "output": true    }  }'
{  "source": "application",  "version": 0,  "config": {    "checks": {      "property1": {        "enabled": true,        "action": "monitor",        "categories": [          "string"        ],        "entities": [          "string"        ],        "terms": [          "string"        ],        "patterns": [          "string"        ],        "threshold": "low"      },      "property2": {        "enabled": true,        "action": "monitor",        "categories": [          "string"        ],        "entities": [          "string"        ],        "terms": [          "string"        ],        "patterns": [          "string"        ],        "threshold": "low"      }    },    "apply_to": {      "input": true,      "output": true    }  }}