cURL
curl --request PUT \ --url https://api.portkey.ai/v1/guardrails/{guardrailId} \ --header 'Content-Type: application/json' \ --header 'x-portkey-api-key: <api-key>' \ --data '{ "name": "<string>", "checks": [ { "id": "default.jwt", "parameters": "<any>", "name": "<string>", "is_enabled": true } ], "actions": { "deny": false, "async": false, "on_success": { "feedback": { "value": 5, "weight": 1, "metadata": "" } }, "on_fail": { "feedback": { "value": -5, "weight": 1, "metadata": "" } } } }'
{ "id": "<string>", "slug": "<string>", "version_id": "<string>" }
Updates an existing guardrail’s name, checks, or actions
Guardrail UUID or slug to update
Updated name of the guardrail
Updated array of guardrail checks
1
Show child attributes
Actions to take when guardrail checks fail or pass
Guardrail updated successfully
Unique identifier of the updated guardrail
URL-friendly slug for the guardrail
New version identifier after update
Was this page helpful?