Submit a completed intake (with answers, idempotent)
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": "weight_management",
"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": "weight_management",
"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: 'weight_management',
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' => 'weight_management',
'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\": \"weight_management\",\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\": \"weight_management\",\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\": \"weight_management\",\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"
}
}{
"data": {
"id": "sandbox_int_b3d8e7a1",
"external_intake_id": "clinic-intake-4471"
},
"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"
}
}Intakes
Submit a completed intake (with answers, idempotent)
Vita Clinic only. Requires the intakes:write scope.
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.
POST
/
intakes
Submit a completed intake (with answers, idempotent)
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": "weight_management",
"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": "weight_management",
"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: 'weight_management',
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' => 'weight_management',
'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\": \"weight_management\",\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\": \"weight_management\",\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\": \"weight_management\",\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"
}
}{
"data": {
"id": "sandbox_int_b3d8e7a1",
"external_intake_id": "clinic-intake-4471"
},
"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
application/json
Exactly one of patient_id or external_patient_id is required.
Response
Idempotent replay of an existing external_intake_id.
Show child attributes
Show child attributes
Example:
{
"id": "sandbox_int_b3d8e7a1",
"external_intake_id": "clinic-intake-4471"
}

