goalsUpdate a goal

Update a goal

Updates a goal's mutable fields. Only name, description, target_amount, and target_date may be changed; any other field is a validation error. Requires the goals:write scope and writes_enabled on the connection. A goal linked exclusively to excluded accounts returns 404 (not-found), byte-identical to a nonexistent goal.

curl -X PATCH "https://api.403fin.io/v1/goals/123e4567-e89b-12d3-a456-426614174000" \
  -H "Content-Type: application/json" \
  -H "Idempotency-Key: example_string" \
  -H "Authorization: Bearer YOUR_API_TOKEN" \
  -H "X-API-Key: YOUR_API_KEY" \
  -d '{
  "name": "John Doe",
  "description": "example_string",
  "target_amount": "example_string",
  "target_date": "2024-12-25"
}'
{
  "data": {
    "id": "123e4567-e89b-12d3-a456-426614174000",
    "name": "John Doe",
    "description": "example_string",
    "goal_type": "example_string",
    "status": "example_string",
    "target_amount": "example_string",
    "current_amount": "example_string",
    "currency": "example_string",
    "target_date": "2024-12-25",
    "funding_source_type": "example_string",
    "tracking_mode": "budget_driven",
    "sort_order": 42,
    "show_in_digest": true,
    "account_links": [
      {
        "account_id": "123e4567-e89b-12d3-a456-426614174000",
        "account_type": "example_string",
        "link_role": "example_string"
      }
    ],
    "budget_links": [
      {
        "budget_item_id": "123e4567-e89b-12d3-a456-426614174000",
        "contribution_amount": "example_string",
        "is_active": true
      }
    ],
    "progress": {
      "goal_id": "123e4567-e89b-12d3-a456-426614174000",
      "current_amount": "example_string",
      "target_amount": "example_string",
      "remaining_amount": "example_string",
      "progress_pct": "example_string",
      "days_remaining": 42,
      "projected_completion_date": "2024-12-25",
      "monthly_contribution_needed": "example_string",
      "last_contribution_at": "2024-12-25T10:00:00Z",
      "monthly_shortfall": "example_string"
    },
    "created_at": "2024-12-25T10:00:00Z",
    "updated_at": "2024-12-25T10:00:00Z",
    "completed_at": "2024-12-25T10:00:00Z"
  },
  "pagination": {
    "next_cursor": "example_string",
    "has_more": true
  },
  "redacted_fields": [
    "example_string"
  ],
  "filtered": true
}
PATCH
/v1/goals/{id}
PATCH
Base URLstring

Target server for requests. Edit to use your own host.

Bearer Token
Bearer Tokenstring
Required

An opaque ff_ credential (ff_ak_ / ff_at_) presented as a Bearer token.

An opaque ff_ credential (ff_ak_ / ff_at_) presented as a Bearer token.
API Key (header: X-API-Key)
X-API-Keystring
Required

An opaque ff_ credential presented in the X-API-Key header.

An opaque ff_ credential presented in the X-API-Key header.
path
idstring
Required

The resource UUID.

Format: uuid
Content-Typestring
Required

The media type of the request body

Options: application/json
header
Idempotency-Keystring
Required

A caller-chosen unique key (1-128 chars) that makes the write idempotent. A retry with the SAME key against the SAME operation, resource, and body replays the original response (Idempotency-Replayed: true). The same key with anything different — a changed body, a different endpoint, or a different {id} — is a 409 conflict; a still-in-flight duplicate is 409 with Retry-After. Required on every write. Stored for 24 hours. The key is bound to the target, not only to the payload, so reusing one key across two deletes (which carry no body at all) conflicts rather than replaying the first delete's response.

Min length: 1 • Max length: 128
descriptionstring

Send an empty string to clear the description.

target_amountstring

A decimal amount string.

target_datestring

YYYY-MM-DD, or an empty string to clear the target date.

Format: date
Request Preview
Response

Response will appear here after sending the request

Authentication

header
Authorizationstring
Required

Bearer token. An opaque ff_ credential (ff_ak_ / ff_at_) presented as a Bearer token.

header
X-API-Keystring
Required

API Key for authentication. An opaque ff_ credential presented in the X-API-Key header.

Path Parameters

idstring
Required

The resource UUID.

Headers

Idempotency-Keystring
Required

A caller-chosen unique key (1-128 chars) that makes the write idempotent. A retry with the SAME key against the SAME operation, resource, and body replays the original response (Idempotency-Replayed: true). The same key with anything different — a changed body, a different endpoint, or a different {id} — is a 409 conflict; a still-in-flight duplicate is 409 with Retry-After. Required on every write. Stored for 24 hours.

The key is bound to the target, not only to the payload, so reusing one key across two deletes (which carry no body at all) conflicts rather than replaying the first delete's response.

Body

application/json
descriptionstring

Send an empty string to clear the description.

target_amountstring

A decimal amount string.

target_datestring

YYYY-MM-DD, or an empty string to clear the target date.

Responses

dataobject
Required
paginationstring

Cursor pagination state, present on list endpoints.

redacted_fieldsstring[]

Field ids stripped from the payload by connection scope.

filteredboolean

True when row or aggregate filtering is in effect for this response.