curl --request POST \
--url https://api.example.com/api/policies/ingest \
--header 'Content-Type: application/json' \
--data '{}'{
"policy": {
"id": "<string>",
"name": "<string>",
"rules": [
{
"rule_id": "<string>",
"name": "<string>",
"description": "<string>",
"type": "<string>",
"severity": {},
"threshold": {},
"time_window": {},
"conditions": {},
"policy_excerpt": "<string>",
"policy_section": "<string>",
"requires_clarification": true,
"clarification_notes": "<string>"
}
],
"created_at": "<string>"
},
"error": "<string>",
"message": "<string>"
}Upload a PDF policy document and extract compliance rules using Gemini AI
curl --request POST \
--url https://api.example.com/api/policies/ingest \
--header 'Content-Type: application/json' \
--data '{}'{
"policy": {
"id": "<string>",
"name": "<string>",
"rules": [
{
"rule_id": "<string>",
"name": "<string>",
"description": "<string>",
"type": "<string>",
"severity": {},
"threshold": {},
"time_window": {},
"conditions": {},
"policy_excerpt": "<string>",
"policy_section": "<string>",
"requires_clarification": true,
"clarification_notes": "<string>"
}
],
"created_at": "<string>"
},
"error": "<string>",
"message": "<string>"
}Documentation Index
Fetch the complete documentation index at: https://mintlify.com/Basit-Ali0/Yggdrasil/llms.txt
Use this file to discover all available pages before exploring further.
401 UNAUTHORIZED if not authenticated.
multipart/form-data
curl -X POST https://yourdomain.com/api/policies/ingest \
-H "Cookie: session=your_session_token" \
-F "file=@compliance-policy.pdf"
DATA_RETENTION_VIOLATION)retention, encryption, access_control, consent)CRITICAL, HIGH, or MEDIUMfield, operator, and value.Supported operators: equals, not_equals, greater_than, less_than, greater_than_or_equal, less_than_or_equal, contains, exists, not_exists, IN, BETWEEN, MATCH (regex){
"policy": {
"id": "550e8400-e29b-41d4-a716-446655440000",
"name": "GDPR Data Protection Policy",
"rules": [
{
"rule_id": "DATA_RETENTION_VIOLATION",
"name": "Data Retention Limit Exceeded",
"description": "Personal data retained beyond maximum allowed period",
"type": "retention",
"severity": "HIGH",
"threshold": null,
"time_window": 8760,
"conditions": {
"AND": [
{
"field": "data_type",
"operator": "equals",
"value": "personal"
},
{
"field": "retention_days",
"operator": "greater_than",
"value": 365
}
]
},
"policy_excerpt": "Personal data must not be retained for longer than 12 months unless explicitly required by law.",
"policy_section": "Article 5.1.e",
"requires_clarification": false
}
],
"created_at": "2026-02-28T10:30:00Z"
}
}
{
"error": "VALIDATION_ERROR",
"message": "No PDF file provided"
}
{
"error": "VALIDATION_ERROR",
"message": "Failed to parse PDF. Ensure the file is a valid, non-encrypted PDF."
}
{
"error": "VALIDATION_ERROR",
"message": "PDF contains no extractable text. It may be a scanned image."
}
{
"error": "UNAUTHORIZED",
"message": "Authentication required"
}
{
"error": "INTERNAL_ERROR",
"message": "An unexpected error occurred"
}
unpdf library with fallback to UTF-8 text decodingis_active: true by defaultpdf to distinguish from prebuilt policies