policies

Update policy

Replace a policy configuration. The request body is the complete policy — any detector or custom guardrail omitted from the request is removed from the policy. A successful update creates a new policy version.

put/v1/policies/{policyId}

Request

  • Base URL: https://platform.lakera.ai/api
  • URL: https://platform.lakera.ai/api/v1/policies/{policyId}
  • Auth: HTTP bearer

Path parameters

policyIdstring required

Request body

namestring required

A descriptive name for the policy. Leading and trailing whitespace is stripped. Must be unique within your organization.

default_threshold'l1_confident' | 'l2_very_likely' | 'l3_likely' | 'l4_less_likely' required

The confidence level at or above which the policy's detectors flag content. l1_confident is the most lenient and l4_less_likely the strictest. Thresholds are inclusive — l2_very_likely flags on both l2_very_likely and l1_confident detections.

custom_guardrail_idsstring[]

IDs of the custom guardrails to attach to this policy.

Response

Policy updated

status'ok'

Response status

messagestring

Human-readable response message

idstring

Policy ID

Changes

No recorded changes to this operation across all 1 revision of this API.