POST
/
v2
/
link
/
code
/
create
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": "<string>",
  "exchange_url": "<string>",
  "expires_at": "2023-11-07T05:31:56Z"
}

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>'

Authorizations

x-vital-api-key
string
header
required

Vital Team API Key

Query Parameters

user_id
string
required
expires_at
string | null

When the link code should expire. Defaults to server time plus 1 hour.

Response

200
application/json
Successful Response
code
string
required
exchange_url
string
required
expires_at
string
required