Skip to main content
PATCH
Edit Custom Rule
Partially update an existing customer-owned AI_SIGNAL, REGEX, or REQUIRE_NEAR rule. Rule type and ownership metadata are immutable. Active status is changed via Reactivate Rules / Deactivate Rules, not this endpoint. This is the only way to edit a rule created with Create Custom Rule. Policy Studio lists those rules under API-created rules but can’t edit them. See Manage Custom Rules Created Through the API. Requires a full-access API key. Supply only fields applicable to the stored rule type.

Path Parameters

string
required
Custom rule identifier

Request Body

At least one field is required. Common editable fields:
string
Human-readable rule name
string
fix or flag
string
do_not_send or send_with_caution
string
Editable suggestion. Omit to preserve; null clears and suppresses warning fallback.
string
Remediation guidance. Nullable to clear.
Type-specific fields match Create Custom Rule (prompt / keywords / window for AI_SIGNAL, regex_pattern for REGEX, anchor / near / distance options for REQUIRE_NEAR).

Response

Returns the updated custom rule definition (same shape as Get Custom Rule).

Errors