---
title: "Bulk delete non-primary scenes, videos, scripts, posts, pipeline runs."
method: POST
path: "/api/v1/diagnostics/admin/cleanup"
tags: ["Diagnostics"]
---

# Bulk delete non-primary scenes, videos, scripts, posts, pipeline runs.

`POST /api/v1/diagnostics/admin/cleanup`

## Request

- Base URL: `https://api.avatarfactory.io` (the document declares no server; this is the origin it was published from)
- URL: `https://api.avatarfactory.io/api/v1/diagnostics/admin/cleanup`
- Auth: one of:
  - API key in cookie `session`
  - HTTP bearer

<br/>Dry-run by default. Pass `{"confirm": "DELETE"}` to execute.<br/>Admin only.

## Request body

- AdminCleanupRequest
  - `confirm` string, nullable

## Response `200`

OK

- AdminCleanupResponse
  - `deleted` object
  - `dry_run` boolean
  - `message` string

## Other responses

- `422`: Unprocessable Entity

---

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