Propose a keyword setup for a scanned draft
Beta — behind the sonar-onboarding feature flag. Workspaces the flag is off for get 404 FEATURE_DISABLED.
Starts the setup agent on a draft returned by POST /api/v2/setup/scan: it proposes keyword candidates, samples each one’s recent posts (an activity band per keyword — no monthly volume is estimated), scores that sample, and decides a setup of at most 5 keywords with scoping options, feeds and platforms — every decision with its reasons[] and a plain explanation. Asynchronous: answers 202 with the draft id and status at once; poll GET /api/v2/setup/proposals/{id} until the status is ready or failed (typically 20–40 s). A draft with a running or current proposal gets that one back (force: true starts over once it has finished; while a run is live it returns 409 SETUP_PROPOSAL_RUNNING). A run that stops mid-way is finished by the degradation ladder on the next poll (propose_interrupted). Rate-limited to 5 new proposals per workspace per day (429 RATE_LIMITED). Creates nothing in the workspace and consumes no mention quota.
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.
Body
Response
202 response
proposing → measuring (the first search pass) → sampling → proposing (the agent) → ready | failed. Poll until it is one of the last two (needs_narrowing is a legacy terminal status no run produces any more).
scanning, scanned, proposing, measuring, sampling, ready, needs_narrowing, failed, applied 