---
title: "Update a single spending goal"
method: PATCH
path: "/spending-goals/{goalId}"
tags: ["spending goals"]
---

# Update a single spending goal

`PATCH /spending-goals/{goalId}`

Requires **spending_goals:read spending_goals:write** scope.

## Path parameters

- `goalId` string, uuid, required

## Request body

- SpendingGoalPatch
  - `categoryId` string — The id of the category the spending goal should be created for
  - `amount` object
    - `value` integer, required — The amount of the spending goal in minor units of the currency, eg. pennies for GBP.

## Response `200`

Successful Spending Goal Response

- object
  - `data` SpendingGoal
    - `categoryId` string, required
    - `dateCreated` string, date-time, required
    - `periodType` 'monthly' | 'annual', required
    - `periodStart` string, required
    - `id` string, required — The unique id of the spending goal
    - `amount` object, required
      - `value` integer, required — The value of the amount in minor units of the currency, eg. pennies for GBP.
      - `majorUnits` integer — The major units of the value, based on the values currency, eg. pounds for GBP.
      - `minorUnits` integer — The minor units of the value, based on the values currency, eg. pennies for GBP.
      - `currency` string, required — The currency of the amount.
    - `spending` object[], required
      - `date` string, required
      - `spent` integer, required — The spending analysis amount of the specified month expressed in minor units of the currency.
  - `links` Links
    - `next` string, uri — The url to retrieve the next page of results from
    - `prev` string, uri — The url to retrieve the previous page of results from
    - `self` string, uri, required — The url of the current resource(s)
  - `meta` object

## Other responses

- `401` — Unsuccessful Response - Not authorised - Missing authorization header - Invalid access Token
- `403` — Unsuccessful Response - Forbidden - Invalid scopes
- `404` — Unsuccessful Response - Resource Not Found

---

[API](https://skmtc.net/moneyhub/apis/moneyhub-data-api.md) · [All operations](https://skmtc.net/moneyhub/apis/moneyhub-data-api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/moneyhub/moneyhub-data-api/versions/f2eb965eb9af/schema)
