---
sidebar_label: Publishing & versions
toc_max_heading_level: 3
doc_id: c7d2a3ba-4738-4297-ab1e-70f535875d7f
description: >-
  Publish dynamic reports in nullplatform and manage their version lifecycle:
  publish, roll back, restore, change visibility, and unpublish.
keywords:
  - reports
  - publish report
  - report versions
  - rollback
  - restore
  - unpublish
---

# Publishing and versions

Publishing is what makes a [dynamic report](/docs/insights/reports/overview) available to other people and surfaces it in [Insights](/docs/insights/dashboard-builder).

Every report has two sides:

- A **draft**: your editable working copy. Every update you make changes the draft.
- **Published versions**: immutable snapshots of the draft.

When you publish, nullplatform takes a snapshot of the current draft and stores it as a new numbered version, starting at `1`. The latest snapshot you publish becomes the report's *published version*, the one other users see.

```mermaid
flowchart LR
  Draft["Draft (editable)"] -->|publish| V["New version (published)"]
  V -.->|rollback| Older["Earlier version becomes published"]
  V -.->|restore| Draft
```

## Publish a report

Send a [POST request](/docs/api/report-publish) to the report's `/publish` endpoint. Nullplatform snapshots the current draft, stores it as a new version, and marks it as the published one:

```bash
curl -L -X POST 'https://api.nullplatform.com/report/ff5970bf-592d-4a8d-b858-3175ec444562/publish' \
-H 'Authorization: Bearer <token>'
```

## Work with versions

The rest of the version operations follow the same pattern. Each link takes you to the full reference, with request and response details:

- [List published reports](/docs/api/report-list-published): every report that's currently published and visible to you.
- [List a report's versions](/docs/api/report-list-versions): the published version history. Most useful for finding a version ID to roll back or restore.
- [Get the published version](/docs/api/report-get-published-version): the report's currently published version, with all fields.
- [Roll back to a version](/docs/api/report-rollback): makes an earlier version the published one.
- [Restore a version into the draft](/docs/api/report-restore): copies a version's content back into your draft so you can keep editing from it.

:::tip
**Rollback** and **restore** act on opposite sides. Rollback changes *what's published* (the draft stays as is). Restore changes *your draft* (what's published stays as is).
:::

## Visibility and unpublishing

To change who can see a published report, [change its visibility](/docs/api/report-change-visibility): nullplatform publishes a new version with the current published content and the new `visibility`, and updates the draft to match.

To take a report out of Insights, [unpublish it](/docs/api/report-unpublish). The version history is kept, so you can publish or roll back again later.
