---
title: "GET /portfolio/forecast"
method: GET
path: "/portfolio/forecast"
tags: ["portfolio"]
---

# GET /portfolio/forecast

`GET /portfolio/forecast`

## Request

- Base URL: `https://api.focusbear.io` (the document declares no server; this is the origin it was published from)
- URL: `https://api.focusbear.io/portfolio/forecast`
- Auth: HTTP bearer

## Query parameters

- `days` number

## Response `200`

- PortfolioForecastResponseDto
  - `days` ForecastDay[], required
    - `date` string, required: Local date (YYYY-MM-DD) in the user's timezone.
    - `awake_hours` number, required: Waking hours still ahead. 0 unless has_capacity_breakdown.
    - `sleep_hours` number, required: 24 − awake_hours (on day 0 this includes the part of today already elapsed). 0 unless has_capacity_breakdown.
    - `events_hours` number, required: Busy calendar hours (synced and client-reported), clipped to the waking window in dynamic mode.
    - `habits_hours` number, required: Morning + evening routine hours still ahead. 0 unless has_capacity_breakdown.
    - `available_hours` number, required: Free hours for project work: awake − events − habits (dynamic) or grid − events − elapsed (manual).
    - `allocated_hours` number, required: Hours of available time the Day Plan places on this day (projects and project-less to-dos).
    - `unallocated_hours` number, required: available_hours − allocated_hours.
    - `allocations` ForecastProjectAllocation[], required
      - `project_id` string, nullable, required: Null for to-dos that belong to no project.
      - `project_name` string, nullable, required
      - `hours` number, required
  - `projects` ForecastProjectSummary[], required
    - `project_id` string, required
    - `project_name` string, required
    - `due_date` string, nullable, required: ISO timestamp of the resolved deadline (same as GET /portfolio's `due_date`), or null when undated.
    - `required_hours` number, required: Outstanding hours across the project's not-completed to-dos.
    - `planned_hours` number, required: Hours of to-dos that have a planned_date (in the Day Plan).
    - `allocated_hours` number, required: Hours placed within the horizon.
    - `remaining_hours` number, required: required_hours − allocated_hours: work that did not fit inside the horizon.
    - `unschedulable_hours` number, required: Hours that land after the due date, plus hours that never fit when the due date is inside the horizon — the "you cannot finish this in time" signal. 0 for undated projects and for projects due after the horizon.
  - `total_available_hours` number, required
  - `total_required_hours` number, required
  - `total_allocated_hours` number, required
  - `total_unschedulable_hours` number, required
  - `has_capacity_breakdown` boolean, required: Whether the breakdown fields (awake/sleep/habits) are populated — true only in dynamic mode.
  - `horizon_days` number, required: Number of days covered by the forecast (the resolved horizon).

---

[API](https://skmtc.dev/focusbear/apis/focusbear-api.md) - [All operations](https://skmtc.dev/focusbear/apis/focusbear-api/llms.txt) - [OpenAPI document](https://skmtc.dev/focusbear/apis/focusbear-api/revisions/3a83a3b9a811?raw)
