# GET /time-entries/totals

**Resource:** [TIME_ENTRIES](./time-entries.md)  
**MCP tool:** `get_time_totals`  
**Scopes:** `time-entries:read`  
**Write operation:** no

Add up time worked across everything that matches the filters, not just one page: total_seconds, billable_seconds, uninvoiced_billable_seconds (billable time not on an invoice yet) and the number of entries. Takes the same filters as list_time_entries. Use it for "how many hours did Sam work this week", "how much unbilled time is on this opportunity" or "hours per person this month": set group_by to "user", "opportunity" or "day" to also get a row per person, per opportunity or per workspace day. A running timer counts for the time it has run so far. Divide seconds by 3600 for hours. Free read.

## Parameters

| Name | In | Type | Required | Description |
|------|----|------|----------|-------------|
| `user_id` | query | string | no | Only this person's time: a user UUID, or the word "me" for the caller. |
| `opportunity_id` | query | string | no | Only time logged against this opportunity (UUID). |
| `work_order_id` | query | string | no | Only time logged against this work order (UUID). |
| `task_id` | query | string | no | Only time logged against this task (UUID). |
| `contact_id` | query | string | no | Only time logged against this contact (UUID). |
| `date_from` | query | string | no | YYYY-MM-DD. Time that started on or after this day, in the workspace's own time zone. |
| `date_to` | query | string | no | YYYY-MM-DD. Time that started on or before this day (the whole day is included), in the workspace's own time zone. |
| `billable` | query | boolean | no | true: only billable time. false: only non-billable time. |
| `invoiced` | query | boolean | no | true: only time already on an invoice. false: only time not invoiced yet. |
| `running` | query | boolean | no | true: only timers still running. false: only finished entries. |
| `group_by` | query | string | no | Also split the totals: "user" (per person), "opportunity" (per opportunity) or "day" (per workspace day). Returns groups of { key, label, total_seconds, billable_seconds }. |

## Request example

```bash
curl   "https://api.trustpager.com/functions/v1/api/v1/time-entries/totals"   -H "Authorization: Bearer YOUR_API_KEY"
```

---
Base URL: `https://api.trustpager.com/functions/v1/api/v1` — Auth: `Authorization: Bearer YOUR_API_KEY`