---
title: "Create Cleanup Batch"
method: POST
path: "/api/admin/cleanup-batches"
tags: ["admin-cleanup-batches"]
---

# Create Cleanup Batch

`POST /api/admin/cleanup-batches`

## Request

- Base URL: `https://app.thinqos.com` (the document declares no server; this is the origin it was published from)
- URL: `https://app.thinqos.com/api/admin/cleanup-batches`
- Auth: none declared

Save a batch from a list of ids; the plan is built in the background.

## Request body

- CreateCleanupBatchIn: Either ``rows`` (an action per row) or ``ids`` with one ``action`` for all. ``destination`` with ``ids`` applies to every row (move_contents only), and so does ``target_identity_id`` (transfer_connection only).
  - `rows` CleanupRowIn[], nullable
    - `id` string, required
    - `action` 'soft_delete' | 'restore' | 'purge' | 'move_contents' | 'move_connection' | 'transfer_connection', required
    - `kind` 'folder' | 'identity' | 'connection', nullable
    - `destination` string, nullable
    - `target_identity_id` string, nullable
  - `ids` string[], nullable
  - `action` 'soft_delete' | 'restore' | 'purge' | 'move_contents' | 'move_connection' | 'transfer_connection', nullable
  - `kind` 'folder' | 'identity' | 'connection', nullable
  - `destination` string, nullable
  - `target_identity_id` string, nullable

## Response `201`

Successful Response

- object

## Other responses

- `422`: Validation Error

---

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