---
title: "Recover the one persisted AI or MCP sandbox from current books authority"
method: GET
path: "/companies/{companyId}/forecast/active-sandbox"
tags: ["Forecast"]
---

# Recover the one persisted AI or MCP sandbox from current books authority

`GET /companies/{companyId}/forecast/active-sandbox`

## Request

- Base URL: `https://api.medianfi.com/api/v1`
- URL: `https://api.medianfi.com/api/v1/companies/{companyId}/forecast/active-sandbox`
- Auth: HTTP bearer

## Response `200`

Active sandbox recovery result, or null when no sandbox is active

- object
  - `success` boolean, required
  - `data` object, required
    - `sandbox` ForecastActiveSandboxResponse, required
      - `scenario` ForecastScenario, required
        - `id` string, uuid
        - `forecastId` string, uuid
        - `name` string
        - `kind` 'adhoc' | 'budget'
        - `isLocked` boolean
        - `baseModelId` string, uuid, nullable
        - `overrides` object
        - `createdAt` string, date-time
      - `toolCalls` object[], required
        - `name` 'apply_lever' | 'apply_driver_change' | 'add_stream' | 'remove_stream' | 'add_hire' | 'set_opex' | 'add_financing', required
        - `arguments` object, required
      - `projection` ProjectionResult, required: Full projection result with all three scenarios, runway, and KPIs
        - `scenarios` object, required
          - `worst` MonthlyPoint[], required
            - `offset` integer, required: 0-based month offset from model start
            - `label` string, required: Human-readable month label (e.g. "Jul 26")
            - `revenueCents` integer, required: Total revenue in the response's authoritative minor units
            - `byStreamCents` object, required: Revenue by stream ID in the response's authoritative minor units
            - `peopleCents` integer, required: Headcount cost in the response's authoritative minor units
            - `opexCents` integer, required: Operating expense in the response's authoritative minor units
            - `financingCents` integer, required: Timed non-revenue capital cash flow in the response's authoritative minor units
            - `netCents` integer, required: Net income excluding financing, in the response's authoritative minor units
            - `endingCents` integer, required: Ending cash balance in the response's authoritative minor units
            - `cashMovementCents` integer: Projected rows only (#2652). Cash this row adds to the prior ending cash — operating net (for offset 0, prorated to the days of the current month after cashAsOfDate, half a minor unit rounding away from zero) plus financing — so prior ending + cashMovementCents = endingCents.
            - `marginPct` number, required: Net margin (0 when revenue is 0)
          - `base` MonthlyPoint[], required
            - `offset` integer, required: 0-based month offset from model start
            - `label` string, required: Human-readable month label (e.g. "Jul 26")
            - `revenueCents` integer, required: Total revenue in the response's authoritative minor units
            - `byStreamCents` object, required: Revenue by stream ID in the response's authoritative minor units
            - `peopleCents` integer, required: Headcount cost in the response's authoritative minor units
            - `opexCents` integer, required: Operating expense in the response's authoritative minor units
            - `financingCents` integer, required: Timed non-revenue capital cash flow in the response's authoritative minor units
            - `netCents` integer, required: Net income excluding financing, in the response's authoritative minor units
            - `endingCents` integer, required: Ending cash balance in the response's authoritative minor units
            - `cashMovementCents` integer: Projected rows only (#2652). Cash this row adds to the prior ending cash — operating net (for offset 0, prorated to the days of the current month after cashAsOfDate, half a minor unit rounding away from zero) plus financing — so prior ending + cashMovementCents = endingCents.
            - `marginPct` number, required: Net margin (0 when revenue is 0)
          - `best` MonthlyPoint[], required
            - `offset` integer, required: 0-based month offset from model start
            - `label` string, required: Human-readable month label (e.g. "Jul 26")
            - `revenueCents` integer, required: Total revenue in the response's authoritative minor units
            - `byStreamCents` object, required: Revenue by stream ID in the response's authoritative minor units
            - `peopleCents` integer, required: Headcount cost in the response's authoritative minor units
            - `opexCents` integer, required: Operating expense in the response's authoritative minor units
            - `financingCents` integer, required: Timed non-revenue capital cash flow in the response's authoritative minor units
            - `netCents` integer, required: Net income excluding financing, in the response's authoritative minor units
            - `endingCents` integer, required: Ending cash balance in the response's authoritative minor units
            - `cashMovementCents` integer: Projected rows only (#2652). Cash this row adds to the prior ending cash — operating net (for offset 0, prorated to the days of the current month after cashAsOfDate, half a minor unit rounding away from zero) plus financing — so prior ending + cashMovementCents = endingCents.
            - `marginPct` number, required: Net margin (0 when revenue is 0)
        - `actuals` MonthlyPoint[], required: Historical actuals (empty until
          - `offset` integer, required: 0-based month offset from model start
          - `label` string, required: Human-readable month label (e.g. "Jul 26")
          - `revenueCents` integer, required: Total revenue in the response's authoritative minor units
          - `byStreamCents` object, required: Revenue by stream ID in the response's authoritative minor units
          - `peopleCents` integer, required: Headcount cost in the response's authoritative minor units
          - `opexCents` integer, required: Operating expense in the response's authoritative minor units
          - `financingCents` integer, required: Timed non-revenue capital cash flow in the response's authoritative minor units
          - `netCents` integer, required: Net income excluding financing, in the response's authoritative minor units
          - `endingCents` integer, required: Ending cash balance in the response's authoritative minor units
          - `cashMovementCents` integer: Projected rows only (#2652). Cash this row adds to the prior ending cash — operating net (for offset 0, prorated to the days of the current month after cashAsOfDate, half a minor unit rounding away from zero) plus financing — so prior ending + cashMovementCents = endingCents.
          - `marginPct` number, required: Net margin (0 when revenue is 0)
        - `functionalCurrency` string, required: Functional currency of the authoritative ledger cash boundary
        - `minorUnitExponent` 2, required
        - `moneyAuthorityVersion` 1, required
        - `anchorYyyyMm` string, nullable, required: First projected month; the current UTC calendar month (actuals run through the month before it)
        - `cashAsOfYyyyMm` string, nullable, required: Calendar month whose posted books cash anchors the forecast (null when the persisted model's cash is used)
        - `cashAsOfDate` string, date, nullable: Date the posted books start cash is stated at (#2652; today for live reads, the month end for close snapshots; null when the persisted model's cash is used)
        - `cashAsOfAt` string, date-time, nullable: Instant the live books cash was read (UTC ISO timestamp), so clients can state the as-of date in the viewer's time zone; null for close snapshots and persisted model cash. Proration uses cashAsOfDate, not this field.
        - `runway` object, required
          - `months` integer, nullable: Months of runway remaining (null when no shortfall is projected)
          - `profitable` boolean, required: True when cash never declines over the horizon
        - `recurringMixPct` number, nullable, required: Fraction of current-month base revenue that is recurring; null when source data cannot prove recurrence
        - `horizonSummaries` object: Summaries keyed by visible month count for 6, 12 and the full projection length when available. Select these with the corresponding scenario prefix; never extrapolate runway in the client. Legacy payloads may omit this object and support only their full horizon.
        - `kpis` object, required
          - `cashOnHandCents` integer, required: Current cash on hand in the supplied currency's minor units
          - `nextMonthNetCents` integer, required: Projected net income for the calendar month after the current month (offset 1; offset 0 is the current, partly elapsed month) in the supplied currency's minor units
      - `narrative` string, required
      - `confidencePct` number, required
      - `requiresHumanReview` boolean, required
      - `functionalCurrency` string, nullable, required
      - `minorUnitExponent` 2 | null, nullable, required
      - `moneyAuthorityVersion` 1 | null, nullable, required
      - `anchorYyyyMm` string, nullable, required
      - `cashAsOfYyyyMm` string, nullable, required
      - `runwayDelta` object, nullable, required
        - `before` ForecastRunway, required
          - `months` integer, nullable
          - `profitable` boolean
        - `after` ForecastRunway, required
          - `months` integer, nullable
          - `profitable` boolean
      - `unavailableReason` string, nullable, required

## Other responses

- `401`: Authentication required
- `403`: Insufficient permissions or not a company member
- `404`: Resource not found
- `409`: Persisted sandbox state is ambiguous and must be repaired

---

[API](https://skmtc.dev/medianfi/apis/median-api.md) · [All operations](https://skmtc.dev/medianfi/apis/median-api/llms.txt) · [OpenAPI document](https://skmtc.dev/medianfi/apis/median-api/revisions/20090ea32b0d?raw)
