---
title: "POST /api/database/admin/views/{view_id}/rotate-slug/"
method: POST
path: "/api/database/admin/views/{view_id}/rotate-slug/"
tags: ["Admin"]
---

# POST /api/database/admin/views/{view_id}/rotate-slug/

`POST /api/database/admin/views/{view_id}/rotate-slug/`

Rotates the slug of the specified view, permanently invalidating the current public URL, if the requesting user is staff. This works even if the requesting user is not a member of the workspace the view belongs to.

## Path parameters

- `view_id` integer, required

## Response `200`

- AdminView
  - `id` integer, required
  - `name` string, required
  - `slug` string — The unique slug where the view can be accessed publicly on.
  - `type` string, required
  - `table_id` integer, required
  - `table_name` string, required
  - `database_id` integer, required
  - `database_name` string, required
  - `workspace_id` integer, required
  - `workspace_name` string, required
  - `public` boolean — Indicates whether the view is publicly accessible to visitors.
  - `public_view_has_password` boolean, required
  - `owned_by_id` integer, required
  - `owned_by_username` string, required
  - `ownership_type` string — Indicates how the access to the view is determined. By default, views are collaborative and shared for all users that have access to the table.
  - `created_on` string, date-time, required

## Other responses

- `400`
- `401` — No response body
- `404`

---

[API](https://skmtc.net/baserow/apis/baserow-api-spec.md) · [All operations](https://skmtc.net/baserow/apis/baserow-api-spec/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/baserow/baserow-api-spec/versions/0c490e5b0c7f/schema)
