Skip to main content
POST
Get Import Presigned URL
Step 1 of the large-file custom policy import flow. Returns an import_id and an S3 presigned upload_url so you can upload large policy documents directly to S3, bypassing the API Gateway and Lambda payload limits that cap the inline Import Policy endpoint. After uploading, call Start Import with the import_id to begin rule extraction.
Use the inline Import Policy endpoint for plain text and small files. Use this presigned flow for large files (above a few MB). Maximum upload size is 1 GB.Large documents (e.g. a multi-hundred-page regulatory handbook) are fully extracted — rule extraction runs in the background in chunks, so the entire document is analyzed, not just the first pages. The trade-off is time: a very large document can stay in processing for several minutes. Keep polling Get Import Details until the status leaves processing.

Request Body

string
Original filename, for reference/audit.
string
default:"application/pdf"
MIME type of the file you will upload. Must match the Content-Type header you send on the PUT.

Response

string
Unique identifier for the import. Pass this to Start Import after uploading.
string
S3 presigned URL for the file upload (HTTP PUT).
string
HTTP method to use for upload (always PUT).
string
S3 bucket name.
string
S3 object key the file will be uploaded to.
object
Important: Headers that MUST be included on the upload PUT. The presigned URL is signed with these, so omitting any results in a SignatureDoesNotMatch error from S3.
integer
Seconds until the presigned URL expires (default 900).
string
ISO 8601 timestamp when the URL expires.
integer
Maximum allowed upload size in bytes, enforced at Start Import.
object
Step-by-step instructions for uploading and starting the import.
Required headers: Include all headers from required_headers exactly as provided when uploading your file. Missing or mismatched headers (including Content-Type) can cause S3 to reject the upload with SignatureDoesNotMatch.

Example