Skip to main content
POST
/
v2
/
user
curl --request POST \
     --url {{BASE_URL}}/v2/user/ \
     --header 'Accept: application/json' \
     --header 'x-vital-api-key: <API_KEY>' \
     --header 'Content-Type: application/json' \
     --data '
{
     "client_user_id": "your_unique_id"
}
'
{
  "client_user_id": "ZTEwZjNjMjctOTI2ZS00M2Vm",
  "user_id": "1449752e-0d8a-40e0-9206-91ab099b2537"
}
When the supplied client_user_id conflicts with an existing user, the 400 Bad Request error response includes the Vital User ID (user_id) and the creation date (created_on) of the conflicting user.
curl --request POST \
     --url {{BASE_URL}}/v2/user/ \
     --header 'Accept: application/json' \
     --header 'x-vital-api-key: <API_KEY>' \
     --header 'Content-Type: application/json' \
     --data '
{
     "client_user_id": "your_unique_id"
}
'

Authorizations

x-vital-api-key
string
header
required

Vital Team API Key

Body

application/json
client_user_id
string
required

A unique ID representing the end user. Typically this will be a user ID from your application. Personally identifiable information, such as an email address or phone number, should not be used in the client_user_id.

fallback_time_zone
string | null
Fallback time zone of the user, in the form of a valid IANA tzdatabase identifier (e.g., `Europe/London` or `America/Los_Angeles`).
Used when pulling data from sources that are completely time zone agnostic (e.g., all time is relative to UTC clock, without any time zone attributions on data points).
fallback_birth_date
string<date> | null

Fallback date of birth of the user, in YYYY-mm-dd format. Used for calculating max heartrate for providers that don not provide users' age.

ingestion_start
string<date> | null

Starting bound for user data ingestion bounds.

ingestion_end
string<date> | null

Ending bound for user data ingestion bounds.

Response

Successful Response

user_id
string<uuid>
required

User id returned by vital create user request. This id should be stored in your database against the user and used for all interactions with the vital api.

client_user_id
string
required

A unique ID representing the end user. Typically this will be a user ID from your application. Personally identifiable information, such as an email address or phone number, should not be used in the client_user_id.

I