---
title: "Get a insight"
method: POST
path: "/goals/insight"
tags: ["goals"]
---

# Get a insight

`POST /goals/insight`

## Request

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

Get data insight for user simulating how much the user would accomplish for a given Goal

## Request body

- GoalsParamsInsight
  - `cadence_period` string, required
  - `goal_type` ModelsGoalType, required
    - `billable` boolean: For simplicity's sake we will not use GoalBillableType here
    - `projects` ModelsGoalProjectType[]
      - `project_id` integer
      - `task_id` integer
  - `user_id` integer, required
  - `workspace_id` integer, required

## Response `200`

Insight resulting for the query

- GoalsInsightResponse
  - `cadences` integer
  - `value` integer

## Other responses

- `400`: Some required parameter was not filled or have invalid format
- `404`: Some resource is not available
- `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)
