Create a new policy and attach it to one or more Conditions.
Define the Policy with a set of rules. Each rule contains either flagged_content or allowed_content, and every Policy must have at least one rule with flagged_content.
Authorizations
Headers
Body
application/json
namestringrequiredrulesobject[] | nullRules defining content to flag or allow. Each rule must set exactly one of
flagged_contentorallowed_content, and at least one rule must setflagged_content.content_typenull | enum<string>Available options:
session,artifact,anyExample:
"session"event_selector_listobject[] | nullStructured policy selector used by Events-aware policy matching.
role_listenum<string>[] | nullRole restriction used by the new policy targeting model. Empty role lists mean any role.
Available options:
user,assistantapplies_tonull | enum<string>Available options:
input,output,anyExample:
"input"modenull | enum<string>Available options:
prod,shadowExample:
"prod"country_codesstring[] | nullseverity_level_idstring<uuid> | null
Response
Success
idstringrequirednamestringrequiredrulesobject[]requiredRules defining content to flag or allow. At least one rule contains
flagged_content.content_typeenum<string>requiredAvailable options:
session,artifact,anyExample:
"session"event_selector_listobject[]requiredStructured policy selector used by Events-aware policy matching.
role_listenum<string>[]requiredRole restriction used by the new policy targeting model. Empty role lists mean any role.
Available options:
user,assistantapplies_toenum<string>requiredAvailable options:
input,output,anyExample:
"input"modeenum<string>requiredAvailable options:
prod,shadowExample:
"prod"created_atstring<date-time>requiredstateenum<string>requiredAvailable options:
active,inactive,draftExample:
"active"country_codesstring[]requiredseverity_level_idstring<uuid> | null
Bad Request