---
title: "Draft an executable policy pack from unstructured sources"
method: POST
path: "/v1/orgs/{org_id}/policies/packs/draft"
---

# Draft an executable policy pack from unstructured sources

`POST /v1/orgs/{org_id}/policies/packs/draft`

## Request

- Base URL: `https://api.decionis.com`
- URL: `https://api.decionis.com/v1/orgs/{org_id}/policies/packs/draft`
- Auth: HTTP bearer

Same inputs as the strategy draft, but the output is the executable
Decionis policy pack — `{ name, all|any: [{field, op, value}], action }`
rules. Every synthesized rule is validated through the rules compiler
before it is returned; anything that cannot become an executable
predicate is returned under `review`, never as a broken rule. The
draft is persisted for the org (`pack_id`) so it can be reviewed,
edited, and finalized. Requires an org API key with the ADMIN role
and the `autonomous:manage` or `org:*` scope.

## Path parameters

- `org_id` string, uuid, required

## Headers

- `X-Correlation-ID` string

## Request body

- PolicyDraftRequest: Provide manual sources, live connector ids, or both — at least one of the two is required.
  - `suggested_name` string
  - `workflow_key` string
  - `sources` PolicyDraftSource[]
    - `label` string, required
    - `source_type` string, required: Caller-chosen tag, e.g. upload, jira, confluence, audit_log.
    - `content` string
    - `content_base64` string
    - `content_type` string
    - `file_name` string
    - `external_reference` string
  - `live_connector_ids` string[]: Org policy-source connectors to pull live at draft time (Jira, Confluence, Notion, Google Drive, Git repository, SAP).

## Response `200`

Persisted executable policy pack draft

- PolicyPackDraftResponse
  - `org` object, required
    - `id` string
    - `name` string
  - `generated_at` string, date-time, required
  - `pack_id` string, uuid, required: The persisted draft pack, ready for review and finalization.
  - `draft` object, required
    - `status` string
    - `used_llm` boolean, required
    - `suggested_name` string, required
    - `workflow_key` string, required
    - `pack` object, required: The executable pack: compiler-validated rules of the shape `{ name, all|any: [{field, op, value}], action }` with action one of allow, block, restrain, escalate.
      - `rules` object[]
    - `source_summary` unknown[]
      - unknown
    - `review` unknown[], required: Clauses that could not become executable predicates — returned for human review instead of being synthesized into rules.
      - unknown

## Other responses

- `400`: Structured API error
- `401`: Structured API error
- `403`: Structured API error
- `404`: Structured API error
- `502`: Structured API error

---

[API](https://skmtc.dev/decionis/apis/decionis-policy-evaluation-api.md) · [All operations](https://skmtc.dev/decionis/apis/decionis-policy-evaluation-api/llms.txt) · [OpenAPI document](https://skmtc.dev/decionis/apis/decionis-policy-evaluation-api/revisions/357f5e459d0c?raw)
