Import Policy
Custom Policies
Import Policy
Upload a policy document and extract custom rules using AI
POST
Import Policy
Upload a policy document (file or plain text) and extract enforceable rules using AI. The endpoint returns immediately with aDocumentation Index
Fetch the complete documentation index at: https://zerodrift.mintlify.app/llms.txt
Use this file to discover all available pages before exploring further.
processing status while rule extraction runs in the background. Poll Get Import Details to check when extraction is complete.
Request Body
Content type indicator:
file for base64-encoded documents or text for plain text.The policy content. Base64-encoded document bytes when
source is file, or plain text when source is text.Original filename for reference (optional, used with
file source).Response
Unique identifier for the import. Use this to poll for status, view details, or activate rules.
Initial status:
processing. Poll the Get Import Details endpoint until status transitions to pending_review, no_rules_found, or failed.Human-readable message with next steps.
Status Lifecycle
| Status | Description |
|---|---|
processing | Import accepted, AI extraction in progress |
pending_review | Extraction complete, rules ready for review and activation |
no_rules_found | Extraction complete but no compliance rules were identified |
failed | Extraction failed (see error_message in Get Import Details) |
activated | All extracted rules have been activated |
partially_activated | Some rules activated, others still pending |

