---
title: "Get Project Context"
method: GET
path: "/api/app-auto-gtm/projects/{project_id}"
tags: ["AppAutoGtm"]
---

# Get Project Context

`GET /api/app-auto-gtm/projects/{project_id}`

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

- `project_id` integer, required

## Query parameters

- `include_archived` boolean

## Cookies

- `ex_access` string, nullable
- `ex_org` string, nullable

## Response `200`

Successful Response

- ProjectContextResponse
  - `project` ProjectInfo, required
    - `id` integer, required
    - `domain` string, required
    - `company_name` string, nullable
    - `description` string, nullable
    - `competitors` string[]
    - `info` object
    - `auto_reply_enabled` boolean
    - `auto_reply_delay_minutes` integer
    - `autopilot_enabled` boolean
    - `reply_cc_emails` string[], required
    - `reply_instructions` string
    - `owner_email` string, nullable
    - `target_url` string, nullable
  - `segments` SegmentInfo[], required
    - `id` integer, required
    - `key` string, nullable
    - `name` string, required
    - `description` string, required
    - `status` string, required
    - `status_reason` string, nullable
    - `people_count` integer
    - `pain` string
    - `use_case` string
    - `positive_criterias` string[]
    - `example_clients` string[]
    - `daily_limit_usd` integer
    - `target_url` string, nullable
    - `instructions` string
    - `language` string
    - `followup_instructions` string
    - `followup_rules` SegmentFollowupRules
      - `max_touches` integer
      - `delay_days` integer, nullable
      - `stop_on_reply` boolean, nullable
    - `target_geo` string
    - `target_company_size` string
    - `created_by` string, nullable
    - `status_display` StatusDisplay — Unified status display object added to every client-facing segment payload. Computed once in _build_status_display; emitted as `status_display` on the wire. All legacy fields (status, paused, status_reason, agent_turn_running) remain unchanged for deploy-skew safety. Iteration-1 value vocabulary: not_started | searching | review | outreach | paused | budget_paused | listening | resuming | archived | error (`budget_paused` is the display-only $0-budget mask — see _ZERO_BUDGET_MASKED_STATES; no matching lifecycle status exists.)
      - `value` string, required
      - `label` string, required
      - `tone` string, required
      - `animated` boolean, required
      - `hint` string, required
      - `detail` string, required
      - `manual_start_blocked` boolean

## Other responses

- `422` — Validation Error

---

[API](https://skmtc.dev/explee/apis/explee-api.md) · [All operations](https://skmtc.dev/explee/apis/explee-api/llms.txt) · [OpenAPI document](https://skmtc-service-production.skmtc.workers.dev/v1/apis/explee/explee-api/revisions/f169bc6e9447/schema)
