---
title: "Update goal"
method: PUT
path: "/api/sites/{id}/goals/{goalID}"
tags: ["Goals"]
---

# Update goal

`PUT /api/sites/{id}/goals/{goalID}`

## Request

- Base URL: `https://demo.hitkeep.com`
- URL: `https://demo.hitkeep.com/api/sites/{id}/goals/{goalID}`
- Auth: API key in cookie `hk_token`

Updates a site-scoped goal in place and invalidates its rollups.

## Path parameters

- `id` string, uuid, required
- `goalID` string, uuid, required

## Request body

- Goal
  - `created_at` string, date-time
  - `id` string, uuid
  - `name` string
  - `site_id` string, uuid
  - `type` 'event' | 'path'
  - `value` string

## Response `200`

Updated goal

- Goal
  - `created_at` string, date-time
  - `id` string, uuid
  - `name` string
  - `site_id` string, uuid
  - `type` 'event' | 'path'
  - `value` string

## Other responses

- `404`: Goal not found

---

[API](https://skmtc.dev/hitkeep/apis/hitkeep-rest-api.md) · [All operations](https://skmtc.dev/hitkeep/apis/hitkeep-rest-api/llms.txt) · [OpenAPI document](https://skmtc.dev/hitkeep/apis/hitkeep-rest-api/revisions/bb2df36ab2a4?raw)
