Create a referral intake and send the patient a link
curl --request POST \
--url https://vitarelay.com/api/public/v1/rx/patients/{patientId}/intake \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"channel": "email"
}
'import requests
url = "https://vitarelay.com/api/public/v1/rx/patients/{patientId}/intake"
payload = { "channel": "email" }
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({channel: 'email'})
};
fetch('https://vitarelay.com/api/public/v1/rx/patients/{patientId}/intake', 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/rx/patients/{patientId}/intake",
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([
'channel' => 'email'
]),
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/rx/patients/{patientId}/intake"
payload := strings.NewReader("{\n \"channel\": \"email\"\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/rx/patients/{patientId}/intake")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"channel\": \"email\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://vitarelay.com/api/public/v1/rx/patients/{patientId}/intake")
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 \"channel\": \"email\"\n}"
response = http.request(request)
puts response.read_body{
"data": {
"sent": true,
"channel": "<string>"
}
}{
"error": {
"code": "idn_not_joined",
"message": "Your organization hasn't joined the Internal Doctor Network yet."
}
}{
"error": {
"code": "<string>",
"message": "<string>"
}
}Intakes
Create a referral intake and send the patient a link
Creates and sends an intake link the patient completes (email or SMS). The referral push is blocked until the patient submits it. Requires rx:write.
POST
/
rx
/
patients
/
{patientId}
/
intake
Create a referral intake and send the patient a link
curl --request POST \
--url https://vitarelay.com/api/public/v1/rx/patients/{patientId}/intake \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"channel": "email"
}
'import requests
url = "https://vitarelay.com/api/public/v1/rx/patients/{patientId}/intake"
payload = { "channel": "email" }
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({channel: 'email'})
};
fetch('https://vitarelay.com/api/public/v1/rx/patients/{patientId}/intake', 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/rx/patients/{patientId}/intake",
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([
'channel' => 'email'
]),
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/rx/patients/{patientId}/intake"
payload := strings.NewReader("{\n \"channel\": \"email\"\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/rx/patients/{patientId}/intake")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"channel\": \"email\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://vitarelay.com/api/public/v1/rx/patients/{patientId}/intake")
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 \"channel\": \"email\"\n}"
response = http.request(request)
puts response.read_body{
"data": {
"sent": true,
"channel": "<string>"
}
}{
"error": {
"code": "idn_not_joined",
"message": "Your organization hasn't joined the Internal Doctor Network yet."
}
}{
"error": {
"code": "<string>",
"message": "<string>"
}
}Authorizations
API key issued by VitaRelay. Send as Authorization: Bearer vr_live_…
(production) or Authorization: Bearer vr_test_… (sandbox).
Path Parameters
Body
application/json
Available options:
email, sms Response
Sent.
Show child attributes
Show child attributes

