Skip to main content
POST
Import Policy
Upload a policy document (file or plain text) and extract enforceable rules using AI. The endpoint returns immediately with a processing status while rule extraction runs in the background. Poll Get Import Details to check when extraction is complete.
This endpoint sends the document inline in the request body (base64-encoded when source is file), which is capped by API Gateway / Lambda payload limits (a few MB after encoding). For large policy files, use the presigned upload flow instead: Get Import Presigned URL → upload to S3 → Start Import.

Request Body

source
string
required
Content type indicator: file for base64-encoded documents or text for plain text.
content
string
required
The policy content. Base64-encoded document bytes when source is file, or plain text when source is text.
filename
string
Original filename for reference (optional, used with file source).

Response

import_id
string
Unique identifier for the import. Use this to poll for status, view details, or activate rules.
status
string
Initial status: processing. Poll the Get Import Details endpoint until status transitions to pending_review, no_rules_found, or failed.
message
string
Human-readable message with next steps.

Status Lifecycle

Example