---
title: "Get stats for a goal"
method: GET
path: "/goals/{goal_id}/stats"
tags: ["goals"]
---

# Get stats for a goal

`GET /goals/{goal_id}/stats`

## Request

- Base URL: `https://localhost:8080/api/v9`
- URL: `https://localhost:8080/api/v9/goals/{goal_id}/stats`
- Auth: HTTP basic
- TypeScript: <https://skmtc.dev/toggl/apis/toggl-api/docs/goals/:goal_id/stats/get.ts> (a function with typed inputs; its response is checked against the schema)

Gets stats for a given goal that must belong to the calling user

## Path parameters

- `goal_id` integer, required

## Response `200`

the asked goal

- ModelsGoalStats
  - `longest_streak` integer
  - `status` string: open, finished or archived
  - `successful_cadences` integer
  - `total_cadences` integer

## Other responses

- `404`: goal not found
- `500`: Internal Server Error

---

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