---
title: "Change published visibility"
method: PATCH
path: "/report/{id}/visibility"
tags: ["Report versions"]
---

# Change published visibility

`PATCH /report/{id}/visibility`

## Request

- Base URL: `https://api.nullplatform.com`
- URL: `https://api.nullplatform.com/report/{id}/visibility`
- Auth: HTTP bearer

Publishes a new version using the current published content with the new visibility, and updates the draft to match. Returns `204` if the visibility is unchanged, and `400` if the report has no published version.

## Path parameters

- `id` string, uuid, required

## Request body

- ChangeVisibilityBody
  - `visibility` 'user' | 'organization', required: Who can see the report. `user` keeps it private to its owner; `organization` shares it with the whole organization.

## Response `200`

The new published version created with the new visibility.

- ReportVersion: An immutable snapshot of a report's draft, taken when the report was published.
  - `id` string, uuid: The unique identifier of this version.
  - `report_id` string, uuid: The ID of the report this version belongs to.
  - `version_number` integer: The sequential version number, starting at 1.
  - `name` string: The report's display name at the time this version was published.
  - `slug` string: The report's slug at the time this version was published.
  - `description` string: The report's description at the time this version was published.
  - `schema` object: The JSON Schema snapshot included in this version.
  - `ui_schema` object: The UI Schema snapshot included in this version.
  - `queries` Queries: A map of query IDs to query definitions. Each ID is a name you choose to identify the query within the report.
  - `visibility` 'user' | 'organization': Who can see the report. `user` keeps it private to its owner; `organization` shares it with the whole organization.
  - `published_by` string: The ID of the user who published this version.
  - `created_at` string, date-time: The ISO 8601 timestamp of when this version was published.
  - `updated_at` string, date-time: The ISO 8601 timestamp of this version's last update.

## Other responses

- `204`: The visibility was already set to the requested value; nothing changed.
- `4XX`: Client error responses due to invalid input or missing parameters.
- `5XX`: Internal server error due to an unexpected issue.

## Changes

- **2026-09-17** `43b3c1ecdfd8`: 1 info
  - endpoint added

[Operation history](https://skmtc.dev/nullplatform/apis/nullplatform-api/changes/report/:id/visibility/patch.md)

---

[API](https://skmtc.dev/nullplatform/apis/nullplatform-api.md) - [All operations](https://skmtc.dev/nullplatform/apis/nullplatform-api/llms.txt) - [OpenAPI document](https://skmtc.dev/nullplatform/apis/nullplatform-api/revisions/d3f66bc633d4?raw)
