Skip to main content
POST
/
api
/
lists
/
{id}
/
columns
/
cleanup-previews
Delete orphaned preview columns
curl --request POST \
  --url https://app.puffle.ai/api/lists/{id}/columns/cleanup-previews \
  --header 'Authorization: Bearer <token>'
{
  "success": true
}

Overview

Deletes every is_preview = true column on the list. Preview columns are created temporarily during the column-preview flow (run enrichment on the first 3 rows before committing) and are normally promoted via PATCH or explicitly cancelled. If a user dismisses the preview dialog without either action, an orphan preview column can be left behind — this endpoint sweeps them. Safe to call on lists with no previews: always returns { success: true } on clean execution. No side effects beyond deleting list_columns rows (and their cells via cascade).

AI agent notes

Idempotent. Repeated calls are safe — second call is a no-op.When to call it:
  • On dialog open in the preview flow (the UI does this defensively).
  • As a cleanup step if an agent workflow crashes between column creation and promotion.
Does not affect full columns. Only rows with is_preview = true are deleted. Non-preview columns are untouched.

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Path Parameters

id
string<uuid>
required

List UUID. Must be owned by the caller.

Pattern: ^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$

Response

Preview columns deleted (zero or more). Associated cells are cascade-deleted.

success
enum<boolean>
required
Available options:
true