---
title: "Admin Cancelled Audio Cleanup"
method: POST
path: "/v1/admin/cancelled-audio/cleanup"
---

# Admin Cancelled Audio Cleanup

`POST /v1/admin/cancelled-audio/cleanup`

## Request

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

Delete R2 audio orphaned by cancelled render_jobs for a publisher.

Pairs with ``scripts/cleanup_cancelled_audio.py`` — same core logic,
same idempotency semantics, just exposed as HTTP so the operator
can drive it without a fly-ssh session.

Auth: admin token (X-Storyflo-Email-Token).

Body:
    publisher_name_pattern: SQL LIKE pattern, default 'Google News%'
    dry_run: bool, default true (recommended first pass)
    limit:   int, default 5000  (max render_job rows per call)
    batch_size: int, default 1000 (S3 delete_objects batch size)

Response: ``{rows_scanned, object_keys_targeted, deleted, rows_nulled,
             errors[], dry_run, publisher_name_pattern}``.

## Headers

- `x-storyflo-email-token` string, nullable

## Request body

- AdminCancelledAudioCleanupRequest
  - `publisher_name_pattern` string
  - `dry_run` boolean
  - `limit` integer
  - `batch_size` integer

## Response `200`

Successful Response

- object

## Other responses

- `422`: Validation Error

---

[API](https://skmtc.dev/storyflo/apis/storyflo-inference-router.md) · [All operations](https://skmtc.dev/storyflo/apis/storyflo-inference-router/llms.txt) · [OpenAPI document](https://skmtc.dev/storyflo/apis/storyflo-inference-router/revisions/c3a1a735ac7a?raw)
