---
title: "Create Goal"
method: POST
path: "/api/goals"
tags: ["Goals"]
---

# Create Goal

`POST /api/goals`

## Request

- Base URL: `https://api.earmarkiq.app` (the document declares no server; this is the origin it was published from)
- URL: `https://api.earmarkiq.app/api/goals`
- Auth: HTTP bearer

Create a new savings goal.

## Request body

- AppApiGoalsGoalCreate
  - `client_id` string, uuid, nullable
  - `name` string, required
  - `icon` string, nullable
  - `target_amount` union, required
    - number
    - string
  - `saved_amount` union
    - number
    - string
  - `monthly_contribution` union
    - number
    - string
  - `deadline` string, date, nullable
  - `priority` integer
  - `category` 'house_deposit' | 'emergency_fund' | 'holiday' | 'wedding' | 'retirement' | 'education' | 'car' | 'investment' | 'custom'
  - `linked_account_id` string, nullable
  - `linked_investment_account_id` string, nullable
  - `shared_with_partner` boolean
  - `joint_goal` boolean
  - `partner_link_id` string, nullable
  - `split_type` string, nullable
  - `your_percentage` integer, nullable
  - `partner_percentage` integer, nullable

## Response `201`

Successful Response

- AppApiGoalsGoalResponse
  - `id` string, required
  - `name` string, required
  - `icon` string, nullable, required
  - `target_amount` number, required
  - `saved_amount` number, required
  - `effective_saved_amount` number, required
  - `monthly_contribution` number, required
  - `deadline` string, nullable, required
  - `priority` integer, required
  - `category` string, required
  - `progress_pct` number, required
  - `created_at` string, required
  - `updated_at` string, required
  - `linked_account_id` string, nullable
  - `linked_account_name` string, nullable
  - `linked_account_balance` number, nullable
  - `linked_investment_account_id` string, nullable
  - `linked_investment_account_name` string, nullable
  - `linked_investment_account_value` number, nullable
  - `shared_with_partner` boolean
  - `joint_goal` boolean
  - `partner_link_id` string, nullable
  - `split_type` string, nullable
  - `your_percentage` integer, nullable
  - `partner_percentage` integer, nullable
  - `owner_name` string, nullable
  - `is_partner_goal` boolean
  - `pot_category` string, nullable
  - `milestone` GoalMilestone
    - `percentage` integer, required
    - `xp_awarded` integer, required
    - `goal_name` string, required
  - `projection` object, nullable

## Other responses

- `422`: Validation Error

---

[API](https://skmtc.dev/earmarkiq/apis/earmark-api.md) · [All operations](https://skmtc.dev/earmarkiq/apis/earmark-api/llms.txt) · [OpenAPI document](https://skmtc.dev/earmarkiq/apis/earmark-api/revisions/4a2c41907105?raw)
