---
title: "Returns focus hours logged per week for the last 3 months. Used for timesheet/payroll systems."
method: GET
path: "/service-account/user/weekly-focus-hours-summary"
tags: ["service-account/user"]
---

# Returns focus hours logged per week for the last 3 months. Used for timesheet/payroll systems.

`GET /service-account/user/weekly-focus-hours-summary`

## 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/service-account/user/weekly-focus-hours-summary`
- Auth: HTTP bearer

## Query parameters

- `user_id` string, uuid, required
- `from` string

## Response `200`

Successfully retrieved weekly focus hours

- WeeklyFocusHoursResponseDto
  - `user_id` string, required
  - `weeks` WeeklyFocusHoursDto[], required
    - `week_start` string, required
    - `week_label` string, required
    - `total_focus_seconds` number, required
    - `total_focus_hours` number, required

## Other responses

- `401`: Unauthorized - Invalid token or insufficient service account permissions
- `403`: Forbidden - Service account cannot access the requested user

---

[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)
