---
title: "Update a Goal"
method: PATCH
path: "/goals/{goal_id}"
tags: ["goals"]
---

# Update a Goal

`PATCH /goals/{goal_id}`

## Request

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

Update a goal with the updateable parameters given by UpdateParams

## Request body

- GoalsUpdateParams
  - `archive` boolean
  - `description` string
  - `icon` integer
  - `icon_color` string
  - `name` string
  - `target_value` integer

## Response `200`

Updated Goal with the changed field

- ModelsGoal
  - `archivedAt` string
  - `createdAt` string
  - `deletedAt` string
  - `description` string
  - `end` string
  - `icon` integer
  - `iconColor` string
  - `id` integer
  - `name` string
  - `start` string
  - `type` string
  - `userID` integer
  - `workspaceID` integer

## Other responses

- `400`: Goal not found or not accessible by the user
- `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)
