Clean up an applied setup
Beta — behind the sonar-onboarding feature flag. Workspaces the flag is off for get 404 FEATURE_DISABLED.
After the first collection, applies the whole clean-up proposal (decision: cleanup, the default): writes its settings through the keyword update path, removes the collected posts they cover (the usage meter is unchanged — first-collection posts are not billed) and writes the setup’s feeds. keep records Keep everything and changes no setting (always allowed — nothing about the collection’s size can refuse it); both write the feeds. undo restores the settings and the removed posts and deletes the feeds the decision created (never a view that was there before or one you made) while the draft lives; deciding again writes them again. Idempotent — repeating a decision returns the same result and creates nothing. A setup that was never applied returns 412 SETUP_NOT_APPLIED; before every collected post is scored the clean-up is not ready and cleanup / keep return 412 SETUP_COLLECTION_NOT_LANDED. The feeds are the setup’s own: a workspace view that happens to share a name is never reused (the new feed gets a numbered suffix).
Authorizations
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
Body
Response
200 response
The outcome of the Clean up commit, Keep everything, or an undo.
