# Create a Draft Policy Set

A new draft, the tenant's next version: empty, with the rules you give, or a copy of any version's rules.

## Overview

- `rules`: the rules in order ([Rules](https://docs.aureahub.com/docs/guide-policy-sets.md)), or `copyFromSetId`: a version of any status to copy them from — not both (`400` `POLICY_REQUEST_INVALID` `Give rules or copyFromSetId, not both`). Neither: an empty draft.
- `description`: optional, trimmed. The caller is the author: only the author edits and submits the draft.
- `201` with the set and its rules, each with its `id` and `position` (from 0). A draft decides nothing: only the active set does.
- `400` `POLICY_RULES_INVALID` for a rule written wrong; `404` `POLICY_COPY_SOURCE_NOT_FOUND` for a set to copy that is not your tenant's.

## Endpoint

### `POST /v1/policy-sets`

Authentication: bearer token required.

Creates a draft policy set, the tenant's next version.

**Request body**

| Name | Type | Required | Description |
| --- | --- | --- | --- |
| `description` | string \| null | no | What the version is for |
| `rules` | object[] | no | Up to 500 rules, in order |
| `copyFromSetId` | string | no | A version whose rules to copy |

**Responses**

`201` Created

```json
{
  "id": "4c8a1e5f-9b2d-4e73-a6c0-1d7f3b9e2a58",
  "tenantId": "6f1e2d3c-4b5a-4968-8776-a5b4c3d2e1f0",
  "version": 3,
  "status": "draft",
  "description": "Block deployments",
  "authorUserId": "0d2f6b8a-4c1e-4a93-b7d5-2e9f1c3a8b60",
  "requiredApprovals": 0,
  "approverUserIds": [],
  "submittedAt": null,
  "activatedAt": null,
  "archivedAt": null,
  "createdAt": "2026-10-06T12:10:05.331Z",
  "copiedFromSetId": null,
  "activatedBy": null,
  "archivedBy": null,
  "ruleCount": 1,
  "rules": [
    {
      "id": "e2b6d9f1-7a3c-4c58-8b0e-5f1a4d2c9b73",
      "position": 0,
      "name": "No contract deployments",
      "verdict": "BLOCK",
      "operationTypes": ["DEPLOY"],
      "initiatorKinds": null,
      "initiatorIds": null,
      "sourceKinds": null,
      "sourceIds": null,
      "destinationKinds": null,
      "destinationAddresses": null,
      "chains": null,
      "assets": null,
      "amountMinRef": null,
      "amountMaxRef": null,
      "windowScope": null,
      "windowSeconds": null,
      "windowMinRef": null,
      "windowMaxRef": null,
      "methodSelectors": null,
      "timeDays": null,
      "timeFromMinute": null,
      "timeToMinute": null,
      "screeningResults": null,
      "approvalThreshold": null,
      "approverIds": null,
      "approversExcludeInitiator": true,
      "designatedSignerIds": null
    }
  ]
}
```

`400` Rule refused

```json
{
  "statusCode": 400,
  "error": "BadRequestError",
  "message": "Invalid policy rules",
  "details": {
    "code": "POLICY_RULES_INVALID",
    "errors": ["0.verdict: Invalid enum value. Expected 'ALLOW' | 'SCREEN' | 'REQUIRE_APPROVAL' | 'BLOCK' | 'FREEZE', received 'DENY'"]
  }
}
```

---

Web version: https://docs.aureahub.com/#policy-set-create
