7c5dfa63b897
List Prospecting Goals
List the org's selectable prospecting goals for the warm-leads target selector.
Excludes placeholder rows (_is_placeholder_goal) and rows already flagged for merge (suggested_merge_into_goal_id set) — those stay hidden until a merge UI exists. The canonical durable default is read via get_canonical_goal_row (NEVER resolve_active_goal — see goal_resolver.py:1046-1064), marked is_default, and always listed first; if filtering/fetch excluded it, it's prepended so the default is never missing from the selector. Each entry also carries leads_found and last_used_at (per-goal prospecting_deals aggregates) so the dropdown can show usefulness/recency and demote dupe-minted goals; the remaining (non-default) entries are ordered by last_used_at desc NULLS LAST, tiebreaking created_at desc.
Query parameters
Response
Successful Response