Create guardrail policy
Create a guardrail policy with its rules in a workspace
Request
This endpoint expects an object.
name
The SDK names policies by name, so it is unique in the workspace, ignoring case
rules
At most one rule per type
id
Optional on create, generated when missing, as for prompts and datasets. Ignored on update, where the path names the policy
description
execution_scope
on_request applies the policy when the SDK names it, global applies it to every guardrail built from stored policies in the workspace. Missing or null means on_request
Allowed values:
Response headers
Location
Response
Created
Errors
400
Bad Request Error
403
Forbidden Error
409
Conflict Error
422
Unprocessable Entity Error
429
Too Many Requests Error
503
Service Unavailable Error