Link
Create Code
POST

/v2/link/code/create

x-vital-api-key*
curl --request POST \
  --url https://api.tryvital.io/v2/link/code/create \
  --header 'x-vital-api-key: <x-vital-api-key>'

Used for Vital iOS Apps to share Apple HealthKit with you. Please refer here for more information.

curl --request POST \
     --url {{BASE_URL}}/v2/link/code/create\?user_id\=1875c190-0cd6-46c1-8670-5b56a7794b78 \
     --header 'Accept: application/json' \
     --header 'Content-Type: application/json' \
     --header 'x-vital-api-key: <API_KEY>'
{
  "code": "skus17922ffe",
  "exchange_url": "tryvital://tryvital?code=skus17922ffe"
}

Query Parameters

user_idrequired
string

User Id

expires_atDefault: "2023-06-02T12:52:31.987376+00:00"
string

Expires At

Response

coderequired
string

Code

exchange_urlrequired
string

Exchange Url