Skip to main content
PATCH
/
v1
/
dev
/
user
/
goals
/
{goal_id}
Update Goal
curl --request PATCH \
  --url https://api.omi.me/v1/dev/user/goals/{goal_id} \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "current_value": 123,
  "max_value": 123,
  "min_value": 123,
  "target_value": 123,
  "title": "<string>",
  "unit": "<string>"
}
'
{
  "created_at": "2023-11-07T05:31:56Z",
  "current_value": 123,
  "goal_type": "<string>",
  "id": "<string>",
  "is_active": true,
  "max_value": 123,
  "min_value": 123,
  "target_value": 123,
  "title": "<string>",
  "updated_at": "2023-11-07T05:31:56Z",
  "unit": "<string>"
}

Authorizations

Authorization
string
header
required

Send Authorization: Bearer <omi_developer_api_key>.

Path Parameters

goal_id
string
required

Body

application/json
current_value
number | null

New progress value

max_value
number | null

New maximum value

min_value
number | null

New minimum value

target_value
number | null

New target value

title
string | null

New title

Required string length: 1 - 500
unit
string | null

New unit label

Response

Successful Response

created_at
string<date-time>
required
current_value
number
required
goal_type
string
required
id
string
required
is_active
boolean
required
max_value
number
required
min_value
number
required
target_value
number
required
title
string
required
updated_at
string<date-time>
required
unit
string | null