Skip to main content
POST
Clean up an applied setup

Authorizations

Authorization
string
header
required

Clerk API key. Create one in Settings → API Keys. Pass as Authorization: Bearer <key>. Keys carry a scope — read, write (implies read) or admin (implies write) — chosen when the key is minted. Each operation's security requirement (and its x-required-scope extension) names the minimum scope it needs; request the least-privileged key that covers the operations you call.

Path Parameters

id
string
required

The setup draft id (draft_…) or the proposal id it carries.

Required string length: 1 - 191
Example:

"draft_x2Yk9…"

Body

application/json
decision
enum<string>
default:cleanup

cleanup (default) applies the whole clean-up proposal and removes the posts it covers; keep = Keep everything (records the decision, changes nothing); undo reverses a Clean up.

Available options:
cleanup,
keep,
undo

Response

200 response

The outcome of the Clean up commit, Keep everything, or an undo.

draftId
string
required
decision
enum<string>
required

cleanup = the proposal was applied and the posts it covers were removed; keep = Keep everything (nothing changed); undone = a Clean up that was reversed.

Available options:
cleanup,
keep,
undone
decidedAt
string
required
undoneAt
string | null
required
removedPosts
integer
required
Required range: 0 <= x <= 9007199254740991
restoredPosts
integer
default:0
required
Required range: 0 <= x <= 9007199254740991
summary
object[]
required
quietSettings
string[]
required

The settings apply wrote without asking, one plain line each.

feeds
object[]
required
feedsSkipped
object[]
required
undoAvailableUntil
string | null
required
undoSkipped
object
required

Undo skipped these because they changed after the Clean up (kept as they are now).