Get Import Details
curl --request GET \
--url https://api.zerodrift.ai/api/policies/import/{import_id} \
--header 'x-api-key: <api-key>'import requests
url = "https://api.zerodrift.ai/api/policies/import/{import_id}"
headers = {"x-api-key": "<api-key>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {'x-api-key': '<api-key>'}};
fetch('https://api.zerodrift.ai/api/policies/import/{import_id}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.zerodrift.ai/api/policies/import/{import_id}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"x-api-key: <api-key>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.zerodrift.ai/api/policies/import/{import_id}"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("x-api-key", "<api-key>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://api.zerodrift.ai/api/policies/import/{import_id}")
.header("x-api-key", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.zerodrift.ai/api/policies/import/{import_id}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["x-api-key"] = '<api-key>'
response = http.request(request)
puts response.read_body{
"import_id": "10f4ed8e-5240-4d87-8828-6e95f3e58a93",
"customer_id": "9a06364f-17c7-4a3f-9d98-61bde8696a2a",
"status": "pending_review",
"origin": "uploaded",
"source_type": "file",
"document_kind": "raw",
"filename": "Client_Communications_Policy.pdf",
"rule_count": 2,
"created_at": "2026-10-05T09:23:39.277706+00:00",
"extracted_rules": [
{
"id": "no_performance_guarantees",
"name": "No Performance Guarantees",
"type": "AI_SIGNAL",
"severity": "do_not_send",
"action": "flag",
"prompt": "Check if the document states or implies guaranteed returns, risk-free outcomes, or certainty of future investment performance. Return 1 if violation found, 0 if compliant.",
"source_text": "Employees must not state or imply guaranteed returns, risk-free outcomes, or certainty of future investment performance in any client communication.",
"keywords": [
"guaranteed returns",
"risk-free outcomes",
"certainty of future investment performance",
"can't lose"
],
"window": "document",
"fix_note": "Remove any statements or implications of guaranteed returns or risk-free outcomes from the communication.",
"confidence": 0.95,
"regex_pattern": null,
"anchor": null,
"near": null,
"distance_chars": null,
"direction": null,
"case_insensitive": null,
"mode": null,
"min_hits": null,
"simulatable": true,
"activated_rule_id": null
},
{
"id": "risk_disclosure_present",
"name": "Risk Disclosure Near Performance Data",
"type": "REQUIRE_NEAR",
"severity": "send_with_caution",
"action": "flag",
"source_text": "Any presentation of past performance must appear alongside the standard risk disclosure.",
"keywords": [
"past performance",
"risk disclosure"
],
"window": null,
"anchor": "past performance",
"near": [
"past performance is not indicative of future results"
],
"distance_chars": 300,
"direction": "either",
"case_insensitive": true,
"mode": "document",
"min_hits": 1,
"fix_note": "Add the standard risk disclosure near the performance figures.",
"confidence": 0.92,
"regex_pattern": null,
"simulatable": true,
"activated_rule_id": null
}
]
}
{
"error": "Import 10f4ed8e-5240-4d87-8828-6e95f3e58a93 not found"
}
Policy
Get Import Details
Retrieve details and extracted rules for a specific policy import
GET
/
api
/
policies
/
import
/
{import_id}
Get Import Details
curl --request GET \
--url https://api.zerodrift.ai/api/policies/import/{import_id} \
--header 'x-api-key: <api-key>'import requests
url = "https://api.zerodrift.ai/api/policies/import/{import_id}"
headers = {"x-api-key": "<api-key>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {'x-api-key': '<api-key>'}};
fetch('https://api.zerodrift.ai/api/policies/import/{import_id}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.zerodrift.ai/api/policies/import/{import_id}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"x-api-key: <api-key>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.zerodrift.ai/api/policies/import/{import_id}"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("x-api-key", "<api-key>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://api.zerodrift.ai/api/policies/import/{import_id}")
.header("x-api-key", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.zerodrift.ai/api/policies/import/{import_id}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["x-api-key"] = '<api-key>'
response = http.request(request)
puts response.read_body{
"import_id": "10f4ed8e-5240-4d87-8828-6e95f3e58a93",
"customer_id": "9a06364f-17c7-4a3f-9d98-61bde8696a2a",
"status": "pending_review",
"origin": "uploaded",
"source_type": "file",
"document_kind": "raw",
"filename": "Client_Communications_Policy.pdf",
"rule_count": 2,
"created_at": "2026-10-05T09:23:39.277706+00:00",
"extracted_rules": [
{
"id": "no_performance_guarantees",
"name": "No Performance Guarantees",
"type": "AI_SIGNAL",
"severity": "do_not_send",
"action": "flag",
"prompt": "Check if the document states or implies guaranteed returns, risk-free outcomes, or certainty of future investment performance. Return 1 if violation found, 0 if compliant.",
"source_text": "Employees must not state or imply guaranteed returns, risk-free outcomes, or certainty of future investment performance in any client communication.",
"keywords": [
"guaranteed returns",
"risk-free outcomes",
"certainty of future investment performance",
"can't lose"
],
"window": "document",
"fix_note": "Remove any statements or implications of guaranteed returns or risk-free outcomes from the communication.",
"confidence": 0.95,
"regex_pattern": null,
"anchor": null,
"near": null,
"distance_chars": null,
"direction": null,
"case_insensitive": null,
"mode": null,
"min_hits": null,
"simulatable": true,
"activated_rule_id": null
},
{
"id": "risk_disclosure_present",
"name": "Risk Disclosure Near Performance Data",
"type": "REQUIRE_NEAR",
"severity": "send_with_caution",
"action": "flag",
"source_text": "Any presentation of past performance must appear alongside the standard risk disclosure.",
"keywords": [
"past performance",
"risk disclosure"
],
"window": null,
"anchor": "past performance",
"near": [
"past performance is not indicative of future results"
],
"distance_chars": 300,
"direction": "either",
"case_insensitive": true,
"mode": "document",
"min_hits": 1,
"fix_note": "Add the standard risk disclosure near the performance figures.",
"confidence": 0.92,
"regex_pattern": null,
"simulatable": true,
"activated_rule_id": null
}
]
}
{
"error": "Import 10f4ed8e-5240-4d87-8828-6e95f3e58a93 not found"
}
Retrieve the full details of a policy import, including all extracted rules and their properties. Use this endpoint to poll for results after submitting an import, and to review rules before activation.
Extraction runs in the background. Small documents are usually
pending_review within seconds;
large documents (hundreds of pages) are extracted in chunks and can stay in processing for
several minutes. Poll until the status is no longer processing.Path Parameters
string
required
The import ID returned from the import endpoint
Response
string
Unique import identifier
string
Account the import belongs to
string
Import status:
processing, pending_review, no_rules_found, failed, activated, or partially_activatedstring
Where the document came from: a connector’s provider slug (
notion, linear, atlassian,
google_drive) when a connected workspace produced it, uploaded when it was staged through
this API as a file, or built when it was authored in your own UI. Treat this as an open set —
a new connector adds a new slug.string
How the content was submitted:
file or textstring
How the stored document is read during extraction:
raw for uploaded bytes, text for plain textstring
Original filename, when the import was submitted with one
integer
Number of extracted rules (present once extraction completes)
string
ISO 8601 timestamp of the import
string
ISO 8601 timestamp of the most recent activation, when any rules have been activated
array
Customer-prefixed rule IDs activated from this import, sorted. Present once at least one rule has
been activated.
string
Error details when status is
failedarray
Full list of extracted rules with details. Every rule carries the whole field set; fields that do
not apply to the rule’s
type are returned as null.Show rule properties
Show rule properties
string
Rule identifier within the import
string
Rule type:
AI_SIGNAL, REGEX, or REQUIRE_NEARstring
Human-readable rule name
string
Longer description of the rule, when the extraction produced one
string
do_not_send or send_with_caution. Rules extracted before these values existed are
normalized on read, so the response never returns low, medium, or high.string
Suggested action:
flag (warn only) or fix (suggest replacement text). Unknown labels may
be preserved for review, but activation rejects unsupported actions.string
Source policy text retained as provenance, not an editable runtime condition
string
AI instruction (
AI_SIGNAL only). Omitted for other rule types, and null when cleared via
Edit Imported Rule.array
Present on every extracted rule; used as a runtime gate only by
AI_SIGNAL rulesstring
Context window used by
AI_SIGNAL rules: sentence, paragraph, or documentstring
Raw Python regex (
REGEX only)string
Remediation guidance extracted from the source policy, when present
string
Exact suggestion preserved by the import. Explicit
null suppresses the fix_note fallback;
when omitted, a warning rule may derive its suggestion from fix_note.number
Extraction confidence from 0 through 1
boolean
Derived at read time;
true when the pending rule can run against a text snippetstring
Derived at read time: the customer-prefixed rule ID once this rule has been activated,
null
while it is still pending — including pending siblings in a partially_activated importstring
Anchor regex (
REQUIRE_NEAR only)array
Regex patterns checked near the anchor (
REQUIRE_NEAR only)integer
Character distance from the anchor (
REQUIRE_NEAR, default 100)string
before, after, or either (REQUIRE_NEAR, default either)boolean
Case-insensitive matching (
REQUIRE_NEAR, default false)string
document or page (REQUIRE_NEAR, default document)integer
Minimum near hits (
REQUIRE_NEAR, default 1)Connector provenance
Imports produced by a connected workspace also carry the audit trail of where the document came from. These fields are absent on documents uploaded through this API.string
Connector that produced the document
string
The connection the document was fetched through
string
The provider’s own identifier for the source document
string
The document’s URL at the provider, recorded verbatim
string
The document’s title at the provider, when it has one
string
Who the provider says last edited the document
string
When the provider says it last changed, in the provider’s own format
string
The MCP tool whose result carried the document
string
Digest of the imported content as
sha256:<hex>. Re-importing content with this digest is a no-op.integer
Size of the document the connector fetched, as the connector measured it
string
Media type the provider reported for the document, e.g.
text/markdownstring
When the connector fetched the document, ISO 8601 UTC
{
"import_id": "10f4ed8e-5240-4d87-8828-6e95f3e58a93",
"customer_id": "9a06364f-17c7-4a3f-9d98-61bde8696a2a",
"status": "pending_review",
"origin": "uploaded",
"source_type": "file",
"document_kind": "raw",
"filename": "Client_Communications_Policy.pdf",
"rule_count": 2,
"created_at": "2026-10-05T09:23:39.277706+00:00",
"extracted_rules": [
{
"id": "no_performance_guarantees",
"name": "No Performance Guarantees",
"type": "AI_SIGNAL",
"severity": "do_not_send",
"action": "flag",
"prompt": "Check if the document states or implies guaranteed returns, risk-free outcomes, or certainty of future investment performance. Return 1 if violation found, 0 if compliant.",
"source_text": "Employees must not state or imply guaranteed returns, risk-free outcomes, or certainty of future investment performance in any client communication.",
"keywords": [
"guaranteed returns",
"risk-free outcomes",
"certainty of future investment performance",
"can't lose"
],
"window": "document",
"fix_note": "Remove any statements or implications of guaranteed returns or risk-free outcomes from the communication.",
"confidence": 0.95,
"regex_pattern": null,
"anchor": null,
"near": null,
"distance_chars": null,
"direction": null,
"case_insensitive": null,
"mode": null,
"min_hits": null,
"simulatable": true,
"activated_rule_id": null
},
{
"id": "risk_disclosure_present",
"name": "Risk Disclosure Near Performance Data",
"type": "REQUIRE_NEAR",
"severity": "send_with_caution",
"action": "flag",
"source_text": "Any presentation of past performance must appear alongside the standard risk disclosure.",
"keywords": [
"past performance",
"risk disclosure"
],
"window": null,
"anchor": "past performance",
"near": [
"past performance is not indicative of future results"
],
"distance_chars": 300,
"direction": "either",
"case_insensitive": true,
"mode": "document",
"min_hits": 1,
"fix_note": "Add the standard risk disclosure near the performance figures.",
"confidence": 0.92,
"regex_pattern": null,
"simulatable": true,
"activated_rule_id": null
}
]
}
{
"error": "Import 10f4ed8e-5240-4d87-8828-6e95f3e58a93 not found"
}
Errors
| Status | Meaning |
|---|---|
403 | Invalid API key, or the import belongs to another customer |
404 | Import not found |
500 | Failed to retrieve import |

