curl --request POST \
--url https://vitarelay.com/api/public/v1/intakes \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"external_patient_id": "clinic-patient-001",
"category": "async",
"form_type": "glp1_screening",
"responses": {
"height_cm": 170,
"weight_kg": 92,
"goal": "weight loss"
},
"external_intake_id": "clinic-intake-4471"
}
'import requests
url = "https://vitarelay.com/api/public/v1/intakes"
payload = {
"external_patient_id": "clinic-patient-001",
"category": "async",
"form_type": "glp1_screening",
"responses": {
"height_cm": 170,
"weight_kg": 92,
"goal": "weight loss"
},
"external_intake_id": "clinic-intake-4471"
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
external_patient_id: 'clinic-patient-001',
category: 'async',
form_type: 'glp1_screening',
responses: {height_cm: 170, weight_kg: 92, goal: 'weight loss'},
external_intake_id: 'clinic-intake-4471'
})
};
fetch('https://vitarelay.com/api/public/v1/intakes', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://vitarelay.com/api/public/v1/intakes",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'external_patient_id' => 'clinic-patient-001',
'category' => 'async',
'form_type' => 'glp1_screening',
'responses' => [
'height_cm' => 170,
'weight_kg' => 92,
'goal' => 'weight loss'
],
'external_intake_id' => 'clinic-intake-4471'
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://vitarelay.com/api/public/v1/intakes"
payload := strings.NewReader("{\n \"external_patient_id\": \"clinic-patient-001\",\n \"category\": \"async\",\n \"form_type\": \"glp1_screening\",\n \"responses\": {\n \"height_cm\": 170,\n \"weight_kg\": 92,\n \"goal\": \"weight loss\"\n },\n \"external_intake_id\": \"clinic-intake-4471\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://vitarelay.com/api/public/v1/intakes")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"external_patient_id\": \"clinic-patient-001\",\n \"category\": \"async\",\n \"form_type\": \"glp1_screening\",\n \"responses\": {\n \"height_cm\": 170,\n \"weight_kg\": 92,\n \"goal\": \"weight loss\"\n },\n \"external_intake_id\": \"clinic-intake-4471\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://vitarelay.com/api/public/v1/intakes")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"external_patient_id\": \"clinic-patient-001\",\n \"category\": \"async\",\n \"form_type\": \"glp1_screening\",\n \"responses\": {\n \"height_cm\": 170,\n \"weight_kg\": 92,\n \"goal\": \"weight loss\"\n },\n \"external_intake_id\": \"clinic-intake-4471\"\n}"
response = http.request(request)
puts response.read_body{
"data": {
"id": "sandbox_int_b3d8e7a1",
"external_intake_id": "clinic-intake-4471",
"warnings": {
"complete": false,
"unknown_keys": [
"height_in"
],
"missing_required": [
{
"id": "nicotine",
"label": "Nicotine use"
}
],
"invalid_values": [
{
"id": "gender",
"expected": "one of: female, male, nonbinary, prefer_not_say"
}
]
}
}
}{
"data": {
"id": "sandbox_int_b3d8e7a1",
"external_intake_id": "clinic-intake-4471",
"warnings": {
"complete": false,
"unknown_keys": [
"height_in"
],
"missing_required": [
{
"id": "nicotine",
"label": "Nicotine use"
}
],
"invalid_values": [
{
"id": "gender",
"expected": "one of: female, male, nonbinary, prefer_not_say"
}
]
}
},
"sandbox": true
}{
"error": {
"code": "validation_failed",
"message": "One or more fields are invalid"
}
}{
"error": {
"code": "validation_failed",
"message": "One or more fields are invalid"
}
}{
"error": {
"code": "validation_failed",
"message": "One or more fields are invalid"
}
}{
"error": {
"code": "validation_failed",
"message": "One or more fields are invalid"
}
}{
"error": {
"code": "validation_failed",
"message": "One or more fields are invalid"
}
}{
"error": {
"code": "validation_failed",
"message": "One or more fields are invalid"
}
}{
"error": {
"code": "validation_failed",
"message": "One or more fields are invalid"
}
}{
"error": {
"code": "validation_failed",
"message": "One or more fields are invalid"
}
}Submit intake answers (you collect them)
Vita Clinic only. Requires the intakes:write scope. Use this when you collect the
questionnaire yourself; to have the patient fill it in on our page, use
Send a hosted intake link instead.
Referral partners use Submit referral intake answers.
Required: category (async or hormone), responses (the six required answers
below, plus the rest of the questionnaire) and the patient, as patient_id or
external_patient_id. external_intake_id is optional but recommended.
Identify the patient with either patient_id (UUID, or a
sandbox_pat_… id when using a test key) or external_patient_id.
A patient belonging to another organization resolves as
404 patient_not_found. Supplying external_intake_id makes the call
idempotent.
If the patient has an order that is waiting on a health intake, these answers
complete that order’s intake (the response id is that intake and it includes the
order_id): the order moves to prescriber review and the request is sent to the doctor
network. Otherwise a standalone intake is created. A request that fails creates nothing,
and its external_intake_id can be sent again straight away.
curl --request POST \
--url https://vitarelay.com/api/public/v1/intakes \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"external_patient_id": "clinic-patient-001",
"category": "async",
"form_type": "glp1_screening",
"responses": {
"height_cm": 170,
"weight_kg": 92,
"goal": "weight loss"
},
"external_intake_id": "clinic-intake-4471"
}
'import requests
url = "https://vitarelay.com/api/public/v1/intakes"
payload = {
"external_patient_id": "clinic-patient-001",
"category": "async",
"form_type": "glp1_screening",
"responses": {
"height_cm": 170,
"weight_kg": 92,
"goal": "weight loss"
},
"external_intake_id": "clinic-intake-4471"
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
external_patient_id: 'clinic-patient-001',
category: 'async',
form_type: 'glp1_screening',
responses: {height_cm: 170, weight_kg: 92, goal: 'weight loss'},
external_intake_id: 'clinic-intake-4471'
})
};
fetch('https://vitarelay.com/api/public/v1/intakes', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://vitarelay.com/api/public/v1/intakes",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'external_patient_id' => 'clinic-patient-001',
'category' => 'async',
'form_type' => 'glp1_screening',
'responses' => [
'height_cm' => 170,
'weight_kg' => 92,
'goal' => 'weight loss'
],
'external_intake_id' => 'clinic-intake-4471'
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://vitarelay.com/api/public/v1/intakes"
payload := strings.NewReader("{\n \"external_patient_id\": \"clinic-patient-001\",\n \"category\": \"async\",\n \"form_type\": \"glp1_screening\",\n \"responses\": {\n \"height_cm\": 170,\n \"weight_kg\": 92,\n \"goal\": \"weight loss\"\n },\n \"external_intake_id\": \"clinic-intake-4471\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://vitarelay.com/api/public/v1/intakes")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"external_patient_id\": \"clinic-patient-001\",\n \"category\": \"async\",\n \"form_type\": \"glp1_screening\",\n \"responses\": {\n \"height_cm\": 170,\n \"weight_kg\": 92,\n \"goal\": \"weight loss\"\n },\n \"external_intake_id\": \"clinic-intake-4471\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://vitarelay.com/api/public/v1/intakes")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"external_patient_id\": \"clinic-patient-001\",\n \"category\": \"async\",\n \"form_type\": \"glp1_screening\",\n \"responses\": {\n \"height_cm\": 170,\n \"weight_kg\": 92,\n \"goal\": \"weight loss\"\n },\n \"external_intake_id\": \"clinic-intake-4471\"\n}"
response = http.request(request)
puts response.read_body{
"data": {
"id": "sandbox_int_b3d8e7a1",
"external_intake_id": "clinic-intake-4471",
"warnings": {
"complete": false,
"unknown_keys": [
"height_in"
],
"missing_required": [
{
"id": "nicotine",
"label": "Nicotine use"
}
],
"invalid_values": [
{
"id": "gender",
"expected": "one of: female, male, nonbinary, prefer_not_say"
}
]
}
}
}{
"data": {
"id": "sandbox_int_b3d8e7a1",
"external_intake_id": "clinic-intake-4471",
"warnings": {
"complete": false,
"unknown_keys": [
"height_in"
],
"missing_required": [
{
"id": "nicotine",
"label": "Nicotine use"
}
],
"invalid_values": [
{
"id": "gender",
"expected": "one of: female, male, nonbinary, prefer_not_say"
}
]
}
},
"sandbox": true
}{
"error": {
"code": "validation_failed",
"message": "One or more fields are invalid"
}
}{
"error": {
"code": "validation_failed",
"message": "One or more fields are invalid"
}
}{
"error": {
"code": "validation_failed",
"message": "One or more fields are invalid"
}
}{
"error": {
"code": "validation_failed",
"message": "One or more fields are invalid"
}
}{
"error": {
"code": "validation_failed",
"message": "One or more fields are invalid"
}
}{
"error": {
"code": "validation_failed",
"message": "One or more fields are invalid"
}
}{
"error": {
"code": "validation_failed",
"message": "One or more fields are invalid"
}
}{
"error": {
"code": "validation_failed",
"message": "One or more fields are invalid"
}
}Authorizations
API key issued by VitaRelay. Send as Authorization: Bearer vr_live_…
(production) or Authorization: Bearer vr_test_… (sandbox).
Body
Exactly one of patient_id or external_patient_id is required.
hormone for hormone-therapy intakes, async for everything else. Any other value returns 422 validation_failed before anything is created.
async, hormone The questionnaire answers. The six required fields must be present or the request is rejected 422. Send the rest of the questionnaire too, using the keys in the Intake answers reference.
Show child attributes
Show child attributes
Patient UUID, or a sandbox_pat_… id when using a test key.
Your identifier for this intake. Acts as an idempotency key.
Response
Idempotent replay of an existing external_intake_id.
Show child attributes
Show child attributes
{
"id": "sandbox_int_b3d8e7a1",
"external_intake_id": "clinic-intake-4471",
"warnings": {
"complete": false,
"unknown_keys": ["height_in"],
"missing_required": [
{ "id": "nicotine", "label": "Nicotine use" }
],
"invalid_values": [
{
"id": "gender",
"expected": "one of: female, male, nonbinary, prefer_not_say"
}
]
}
}

