cURL
curl --request PATCH \ --url https://api.enkryptai.com/guardrails/modify-policy \ --header 'Content-Type: application/json' \ --header 'X-Enkrypt-Policy: <x-enkrypt-policy>' \ --header 'apikey: <api-key>' \ --data ' { "name": "<string>", "description": "<string>", "detectors": {} } '
{ "message": "Policy details updated successfully", "data": { "name": "<string>", "description": "<string>", "detectors": { "topic_detector": { "enabled": true, "topic": [ "<string>" ], "block_message": "<string>" }, "nsfw": { "enabled": true, "block_message": "<string>" }, "toxicity": { "enabled": true, "block_message": "<string>" }, "pii": { "enabled": true, "entities": [] }, "injection_attack": { "enabled": true, "block_message": "<string>" }, "keyword_detector": { "enabled": true, "banned_keywords": [ "<string>" ] }, "system_prompt": { "enabled": false, "index": "system", "block_message": "<string>" }, "copyright_ip": { "enabled": false, "block_message": "<string>" }, "policy_violation": { "enabled": true, "policy_text": "<string>", "coc_policy_name": "<string>", "need_explanation": true, "block_message": "<string>" }, "bias": { "enabled": true }, "sponge_attack": { "enabled": false, "block_message": "<string>" } }, "created_at": "2024-10-07T11:23:03.695943+00:00", "updated_at": "2024-10-07T11:23:03.695943+00:00", "policy_id": 1234567890, "project_name": "default" } }
Update an existing policy
Documentation IndexFetch the complete documentation index at: https://docs.enkryptai.com/llms.txtUse this file to discover all available pages before exploring further.
Fetch the complete documentation index at: https://docs.enkryptai.com/llms.txt
Use this file to discover all available pages before exploring further.
The policy name
"Test Guardrails Policy"
Show child attributes
Successful Response
"Policy details updated successfully"