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, measures each one’s monthly volume, scores a sample of real posts, 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, needs_narrowing or failed (typically 40–75 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
The draft the proposal belongs to — also the {id} to poll.
proposing → measuring → sampling → proposing (the agent) → ready | needs_narrowing | failed. Poll until it is one of the last three.
scanning, scanned, proposing, measuring, sampling, ready, needs_narrowing, failed, applied The profile was edited after this proposal: propose again.
balanced, thorough Present once the status is ready or needs_narrowing.
