Skip to main content
POST
/
users
Create a new user
curl --request POST \
  --url https://production.api.onvy.health/users \
  --header 'Content-Type: application/json' \
  --header 'X-API-Key: <api-key>' \
  --data '
{
  "id": "<string>",
  "language": "<string>",
  "tz_offset": 123,
  "firstname": "<string>",
  "lastname": "<string>",
  "measurement_unit": "metric",
  "gender": "male",
  "birthday": "2023-12-25",
  "height": 123,
  "weight": 123,
  "thresholds": {
    "ftp": 123,
    "lthr": 123,
    "mhr": 123
  },
  "location": {
    "lat": 123,
    "lon": 123
  },
  "coach_config": {
    "enabled": true
  }
}
'
{
  "id": "<string>",
  "created_at": "2023-11-07T05:31:56Z",
  "updated_at": "2023-11-07T05:31:56Z",
  "language": "<string>",
  "tz_offset": 123,
  "firstname": "<string>",
  "lastname": "<string>",
  "measurement_unit": "metric",
  "gender": "male",
  "birthday": "2023-12-25",
  "height": 123,
  "weight": 123,
  "thresholds": {
    "ftp": 123,
    "lthr": 123,
    "mhr": 123
  },
  "location": {
    "lat": 123,
    "lon": 123
  },
  "coach_config": {
    "enabled": true
  },
  "data_syncs": [
    {
      "data_type": "auth",
      "sync_type": "historical",
      "provider": "GARMIN",
      "status": "pending",
      "updated_at": "2023-11-07T05:31:56Z"
    }
  ]
}

Authorizations

X-API-Key
string
header
required

API key for authentication

Body

application/json

User creation data

id
string
required

User ID (customer-provided, unique per project)

language
string

User's preferred language

tz_offset
integer

Timezone offset in seconds

firstname
string
lastname
string
measurement_unit
enum<string>
default:metric

Preferred measurement unit system

Available options:
metric,
imperial
gender
enum<string>
Available options:
male,
female,
other
birthday
string<date>
height
number

Height in cm

weight
number

Weight in kg

thresholds
object
location
object
coach_config
object

Response

User created successfully

id
string
required

User ID (customer-provided, unique per project)

created_at
string<date-time>
required
updated_at
string<date-time>
required
language
string

User's preferred language

tz_offset
integer

Timezone offset in seconds

firstname
string
lastname
string
measurement_unit
enum<string>
default:metric

Preferred measurement unit system

Available options:
metric,
imperial
gender
enum<string>
Available options:
male,
female,
other
birthday
string<date>
height
number

Height in cm

weight
number

Weight in kg

thresholds
object
location
object
coach_config
object
data_syncs
object[]