/v1/orgs/:orgId/policies/strategies/draftAPI keyGenerate a non-persistent policy draft from pasted text, uploads, and optional live pull connectors.
curl -X POST https://api.decionis.com/v1/orgs/<org_id>/policies/strategies/draft \
-H "Authorization: Bearer sk_org_xxx" \
-H "Content-Type: application/json" \
-d '{
"suggested_name": "finance-routing-approval",
"workflow_key": "finance_routing_approval",
"live_connector_ids": ["<jira_connector_uuid>", "<confluence_connector_uuid>"],
"sources": [
{
"label": "Jira approval flow",
"source_type": "JIRA",
"content": "Invoices above 10000 EUR require finance manager review before payment."
},
{
"label": "Procurement policy PDF",
"source_type": "UPLOAD",
"file_name": "procurement-policy.pdf",
"content_type": "application/pdf",
"content_base64": "<base64>"
}
]
}'{
"generated_at": "2026-04-22T10:30:00.000Z",
"draft": {
"used_llm": true,
"suggested_name": "finance-routing-approval",
"workflow_key": "finance_routing_approval",
"summary": "Encoded 2 sources into a draft policy with 1 auto-execute, 2 review, and 1 block/ignore clauses.",
"strategy": {
"name": "finance-routing-approval",
"status": "DRAFT",
"rollout_percentage": 0,
"strategy_rules": {
"min_confidence": 0.85,
"require_human_review_above_risk": "medium",
"required_signal_domains": ["JIRA", "PDF"],
"encoded_policy": {
"workflow_key": "finance_routing_approval",
"auto_execute": ["Route low-risk invoices under threshold directly."],
"escalate_for_review": ["Invoices above 10000 EUR require finance manager review."],
"ignore_or_block": ["Reject requests missing a vendor reference."]
}
},
"metadata": {
"review_status": "PENDING_REVIEW",
"source_materials": [
{ "label": "Jira approval flow", "source_type": "JIRA" },
{ "label": "Finance wiki / AP thresholds", "source_type": "CONFLUENCE" }
]
}
},
"review_checklist": ["Review thresholds and owners before publish."],
"open_questions": ["Confirm the exact confidence threshold for autonomous execution."],
"warnings": []
}
}