Skip to main content
POST
/
v1
/
dev
/
user
/
goals
Create Goal
curl --request POST \
  --url https://api.omi.me/v1/dev/user/goals \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "target_value": 123,
  "title": "<string>",
  "current_value": 0,
  "goal_type": "scale",
  "max_value": 10,
  "min_value": 0,
  "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>.

Body

application/json
target_value
number
required

Target value to achieve

title
string
required

The goal title/description

Required string length: 1 - 500
current_value
number
default:0

Current progress value

goal_type
enum<string>
default:scale

Type of goal metric: boolean, scale, or numeric

Available options:
boolean,
scale,
numeric
max_value
number
default:10

Maximum value of the scale

min_value
number
default:0

Minimum value of the scale

unit
string | null

Unit label (e.g., 'users', 'points')

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