User
Create User
POST Create a Vital user given a client_user_id and returns the user_id.
POST
/
v2
/
user
Authorization
Body
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": "5269f80a-fb0b-432a-b311-c3eac1a46260",
"user_id": "e209947b-323e-4108-8e18-1518b80da0bd"
}
Authorizations
x-vital-api-key
string
headerrequiredAPI key based authentication
Body
application/json
client_user_id
string
requiredA 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
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).
Response
200 - application/json
client_user_id
string
requiredA 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.
user_id
string
requiredUser 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.
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": "5269f80a-fb0b-432a-b311-c3eac1a46260",
"user_id": "e209947b-323e-4108-8e18-1518b80da0bd"
}