> ## Documentation Index
> Fetch the complete documentation index at: https://zerodrift.mintlify.site/llms.txt
> Use this file to discover all available pages before exploring further.

# Edit Imported Rule

> Partially edit a pending imported rule before activation

Partially edit `prompt`, remediation guidance (`fix_note`), or extraction
`confidence` for one rule while its customer-owned import is pending review.

Requires a full-access API key. The import must still be in a pending-review
state (or equivalent pending status that allows edit); concurrent changes return
`409`.

## Path Parameters

<ParamField path="import_id" type="string" required>
  Policy import identifier
</ParamField>

<ParamField path="rule_id" type="string" required>
  Extracted rule ID within the import (unprefixed)
</ParamField>

## Request Body

At least one field is required. Explicit `null` clears `prompt` or `fix_note`.
`prompt` is accepted only for `AI_SIGNAL` rules.

<ParamField body="prompt" type="string">
  AI instruction for `AI_SIGNAL` rules. Nullable to clear.
</ParamField>

<ParamField body="fix_note" type="string">
  Remediation guidance. Nullable to clear.
</ParamField>

<ParamField body="confidence" type="number">
  Extraction confidence from 0 through 1
</ParamField>

## Response

Returns the updated extracted rule object (same shape as entries under
[Get Import Details](/api-reference/custom-policies/get-import-details)).

## Errors

| Status | Meaning                                               |
| ------ | ----------------------------------------------------- |
| `400`  | Invalid imported rule update                          |
| `403`  | Full-access API key required                          |
| `404`  | Import or imported rule not found                     |
| `409`  | Import is not pending review, or changed concurrently |

## Example

```bash theme={null}
curl -X PATCH "https://api.zerodrift.ai/api/policies/import/550e8400-e29b-41d4-a716-446655440000/rules/no_misleading_claims" \
  -H "x-api-key: YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "prompt": "Flag claims that promise guaranteed returns without risk disclosure.",
    "confidence": 0.91
  }'
```
