---
title: "Update a goal"
method: PATCH
path: "/cases/{case_id}/goals/{goal_id}"
tags: ["Goals"]
---

# Update a goal

`PATCH /cases/{case_id}/goals/{goal_id}`

## Request

- Base URL: `https://api.example.com/v1`
- URL: `https://api.example.com/v1/cases/{case_id}/goals/{goal_id}`
- Auth: none declared

Update a goal's status.

## Request body

- object
  - `status` 'pending' | 'in_progress' | 'completed'

## Response `200`

Goal updated.

- object
  - `data` Goal
    - `id` string
    - `type` 'discover_financial_accounts' | 'discover_life_insurance' | 'consolidate_finances' | 'open_estate_bank_account' | 'prepare_probate_documents' | 'sell_real_estate'
    - `status` 'pending' | 'in_progress' | 'completed'
    - `completed_at` string, date-time, nullable
    - `created_at` string, date-time
    - `updated_at` string, date-time

## Other responses

- `404`: Resource not found.
- `422`: Request validation failed.

---

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