---
title: "Archive the draft policy version"
method: POST
path: "/api/policy_version/draft/archive"
tags: ["Policy Versions"]
---

# Archive the draft policy version

`POST /api/policy_version/draft/archive`

## Request

- Base URL: `https://app.herondata.io`
- URL: `https://app.herondata.io/api/policy_version/draft/archive`
- Auth: API key in header `x-api-key`

Archive the open draft so a new one can be created. Nothing goes live, and the archived draft keeps its edits and lookup tables, so it can be restored with the rollback route. An automated sync that gets `draft_exists` from creating a draft archives the open draft this way, then creates its own, so the sync never publishes edits from the draft it archived. Edits made in the sync's new draft before it publishes do go live with it.

## Query parameters

- `user_id` integer

## Response `200`

OK

- object
  - `archived_version` integer

## Other responses

- `404`: No draft policy version
- `422`: Policy versions changed concurrently, please retry

## Changes

- **2026-11-03** `bd8008e49534`: 1 info
  - endpoint added

[Operation history](https://skmtc.dev/herondata/apis/heron-data-api/changes/api/policy_version/draft/archive/post.md)

---

[API](https://skmtc.dev/herondata/apis/heron-data-api.md) - [All operations](https://skmtc.dev/herondata/apis/heron-data-api/llms.txt) - [OpenAPI document](https://skmtc.dev/herondata/apis/heron-data-api/revisions/1ec936e17fef?raw)
