ai

Policy Scan Auto Fix Automation

Auto-fix policy violations on a draft AutomationPayload.

Backend rewrites flagged content + applies static fixes, then re-scans. If still flagged, retries up to MAX_FIX_ATTEMPTS times until verdict=allow OR the model stops making progress. The response carries attempts and verified_clean so the UI knows whether the result was self-verified or hit the cap.

post/v1/ai/policy_scan_auto_fix_automation

Request

  • Base URL
    https://api.linktodm.com (the document declares no server; this is the origin it was published from)
  • Auth
    HTTP bearer

Query parameters

exclude_automation_idinteger nullable

When fixing an EDIT, pass the current automation id so the post-fix re-scan's keyword-reuse + content-reuse checks don't flag the automation's own keywords/text against itself.

Request body

Response

Successful Response

static_fixes_appliedstring[]

Deterministic fixes applied without LLM (e.g. capping auto_reply_limit, generating extra variations). Each entry is a human-readable summary.

attemptsinteger

How many fix → re-scan cycles the service ran before returning. 1 = first attempt produced a clean result. Higher values mean the model needed more rounds; if it equals MAX_FIX_ATTEMPTS the response may still contain unresolved violations (see static_fixes_applied for the 'reached max' note).

verified_cleanboolean

True if the final re-scan returned verdict=allow. False means we hit the attempt cap with violations still present — the frontend should surface a manual-review hint to the user.

Changes

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