Get Project Context
Project + its segments for the workspace shell.
Archived campaigns are excluded by default (T-1619): they are visible only on the Dashboard (its own endpoint) and in the archived campaign's own workspace — that page opts in with ?include_archived=1. Every other consumer gets live campaigns without having to remember to filter.
people_count is left at 0 here and NOT computed: this endpoint is HOT (SSR-prefetched on every project open + re-fetched on every SSE lifecycle event), nothing in the workspace renders the per-segment lead count, and the COUNT over the 200+GB agent_lead table was the dominant cost of this endpoint's p95 (~18s, 2026-06-30). The onboarding wizard's default-segment pick degrades gracefully — its real driver is the cheap funnel-side count (/domain-preview); this field was only a last-resort tiebreaker before "pick the first segment", and is 0 at onboarding time anyway (a just-created project has no enriched leads yet). The real per-segment count still lives on /segments/{id} (SegmentBrief), which the lead/template views use.
Path parameters
Query parameters
Cookies
Response
Successful Response
Changes
No recorded changes to this endpoint across all 1 revision of this API.