> ## Documentation Index
> Fetch the complete documentation index at: https://docs.herondata.io/llms.txt
> Use this file to discover all available pages before exploring further.

# Archive the draft policy version

> 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.




## OpenAPI

````yaml https://app.herondata.io/swagger post /api/policy_version/draft/archive
openapi: 3.0.0
info:
  contact:
    email: support@herondata.io
    name: Support
  title: Heron Data API
  version: '2021-07-19'
servers:
  - description: Production
    url: https://app.herondata.io
security:
  - ApiKeyAuth:
      - key_XXX
externalDocs:
  description: Read Tutorial
  url: https://docs.herondata.io/
paths:
  /api/policy_version/draft/archive:
    post:
      tags:
        - Policy Versions
      summary: Archive the draft policy version
      description: >
        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.
      parameters:
        - description: Account to act on. Honoured only for admins.
          in: query
          name: user_id
          required: false
          schema:
            type: integer
      responses:
        '200':
          content:
            application/json:
              schema:
                properties:
                  archived_version:
                    type: integer
                type: object
          description: OK
        '404':
          description: No draft policy version
        '422':
          description: Policy versions changed concurrently, please retry
      security:
        - ApiKeyAuth: []
components:
  securitySchemes:
    ApiKeyAuth:
      in: header
      name: x-api-key
      type: apiKey

````

This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.