curl --request POST \
--url https://vitarelay.com/api/public/rep/v1/invites \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"type": "clinic",
"email": "owner@jasonmeds.com",
"phone": "(229) 719-4222",
"first_name": "Jason",
"last_name": "Tests",
"product_types": [
"503a",
"rnd",
"supplements"
],
"external_invite_id": "crm-lead-4471"
}
'import requests
url = "https://vitarelay.com/api/public/rep/v1/invites"
payload = {
"type": "clinic",
"email": "owner@jasonmeds.com",
"phone": "(229) 719-4222",
"first_name": "Jason",
"last_name": "Tests",
"product_types": ["503a", "rnd", "supplements"],
"external_invite_id": "crm-lead-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({
type: 'clinic',
email: 'owner@jasonmeds.com',
phone: '(229) 719-4222',
first_name: 'Jason',
last_name: 'Tests',
product_types: ['503a', 'rnd', 'supplements'],
external_invite_id: 'crm-lead-4471'
})
};
fetch('https://vitarelay.com/api/public/rep/v1/invites', 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/rep/v1/invites",
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([
'type' => 'clinic',
'email' => 'owner@jasonmeds.com',
'phone' => '(229) 719-4222',
'first_name' => 'Jason',
'last_name' => 'Tests',
'product_types' => [
'503a',
'rnd',
'supplements'
],
'external_invite_id' => 'crm-lead-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/rep/v1/invites"
payload := strings.NewReader("{\n \"type\": \"clinic\",\n \"email\": \"owner@jasonmeds.com\",\n \"phone\": \"(229) 719-4222\",\n \"first_name\": \"Jason\",\n \"last_name\": \"Tests\",\n \"product_types\": [\n \"503a\",\n \"rnd\",\n \"supplements\"\n ],\n \"external_invite_id\": \"crm-lead-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/rep/v1/invites")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"type\": \"clinic\",\n \"email\": \"owner@jasonmeds.com\",\n \"phone\": \"(229) 719-4222\",\n \"first_name\": \"Jason\",\n \"last_name\": \"Tests\",\n \"product_types\": [\n \"503a\",\n \"rnd\",\n \"supplements\"\n ],\n \"external_invite_id\": \"crm-lead-4471\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://vitarelay.com/api/public/rep/v1/invites")
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 \"type\": \"clinic\",\n \"email\": \"owner@jasonmeds.com\",\n \"phone\": \"(229) 719-4222\",\n \"first_name\": \"Jason\",\n \"last_name\": \"Tests\",\n \"product_types\": [\n \"503a\",\n \"rnd\",\n \"supplements\"\n ],\n \"external_invite_id\": \"crm-lead-4471\"\n}"
response = http.request(request)
puts response.read_body{
"data": {
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"type": "clinic",
"status": "pending",
"invite_code": "<string>",
"invite_url": "<string>",
"email": "<string>",
"phone": "<string>",
"first_name": "<string>",
"last_name": "<string>",
"product_types": [
"<string>"
],
"external_invite_id": "<string>",
"expires_at": "2023-11-07T05:31:56Z",
"created_at": "2023-11-07T05:31:56Z"
}
}{
"data": {
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"type": "clinic",
"status": "pending",
"invite_code": "<string>",
"invite_url": "<string>",
"email": "<string>",
"phone": "<string>",
"first_name": "<string>",
"last_name": "<string>",
"product_types": [
"<string>"
],
"external_invite_id": "<string>",
"expires_at": "2023-11-07T05:31:56Z",
"created_at": "2023-11-07T05:31:56Z"
}
}{
"error": {
"code": "<string>",
"message": "<string>"
}
}{
"error": {
"code": "<string>",
"message": "<string>"
}
}{
"error": {
"code": "<string>",
"message": "<string>"
}
}{
"error": {
"code": "<string>",
"message": "<string>"
}
}Create an invite
Creates a clinic (Tele Clinic) or rep invite and returns its signup link. By default the invite is also emailed to email. Send an external_invite_id to make the call safe to retry: repeating it returns the same invite (200). Needs invites:write. With a test key nothing is created and no email is sent.
curl --request POST \
--url https://vitarelay.com/api/public/rep/v1/invites \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"type": "clinic",
"email": "owner@jasonmeds.com",
"phone": "(229) 719-4222",
"first_name": "Jason",
"last_name": "Tests",
"product_types": [
"503a",
"rnd",
"supplements"
],
"external_invite_id": "crm-lead-4471"
}
'import requests
url = "https://vitarelay.com/api/public/rep/v1/invites"
payload = {
"type": "clinic",
"email": "owner@jasonmeds.com",
"phone": "(229) 719-4222",
"first_name": "Jason",
"last_name": "Tests",
"product_types": ["503a", "rnd", "supplements"],
"external_invite_id": "crm-lead-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({
type: 'clinic',
email: 'owner@jasonmeds.com',
phone: '(229) 719-4222',
first_name: 'Jason',
last_name: 'Tests',
product_types: ['503a', 'rnd', 'supplements'],
external_invite_id: 'crm-lead-4471'
})
};
fetch('https://vitarelay.com/api/public/rep/v1/invites', 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/rep/v1/invites",
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([
'type' => 'clinic',
'email' => 'owner@jasonmeds.com',
'phone' => '(229) 719-4222',
'first_name' => 'Jason',
'last_name' => 'Tests',
'product_types' => [
'503a',
'rnd',
'supplements'
],
'external_invite_id' => 'crm-lead-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/rep/v1/invites"
payload := strings.NewReader("{\n \"type\": \"clinic\",\n \"email\": \"owner@jasonmeds.com\",\n \"phone\": \"(229) 719-4222\",\n \"first_name\": \"Jason\",\n \"last_name\": \"Tests\",\n \"product_types\": [\n \"503a\",\n \"rnd\",\n \"supplements\"\n ],\n \"external_invite_id\": \"crm-lead-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/rep/v1/invites")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"type\": \"clinic\",\n \"email\": \"owner@jasonmeds.com\",\n \"phone\": \"(229) 719-4222\",\n \"first_name\": \"Jason\",\n \"last_name\": \"Tests\",\n \"product_types\": [\n \"503a\",\n \"rnd\",\n \"supplements\"\n ],\n \"external_invite_id\": \"crm-lead-4471\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://vitarelay.com/api/public/rep/v1/invites")
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 \"type\": \"clinic\",\n \"email\": \"owner@jasonmeds.com\",\n \"phone\": \"(229) 719-4222\",\n \"first_name\": \"Jason\",\n \"last_name\": \"Tests\",\n \"product_types\": [\n \"503a\",\n \"rnd\",\n \"supplements\"\n ],\n \"external_invite_id\": \"crm-lead-4471\"\n}"
response = http.request(request)
puts response.read_body{
"data": {
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"type": "clinic",
"status": "pending",
"invite_code": "<string>",
"invite_url": "<string>",
"email": "<string>",
"phone": "<string>",
"first_name": "<string>",
"last_name": "<string>",
"product_types": [
"<string>"
],
"external_invite_id": "<string>",
"expires_at": "2023-11-07T05:31:56Z",
"created_at": "2023-11-07T05:31:56Z"
}
}{
"data": {
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"type": "clinic",
"status": "pending",
"invite_code": "<string>",
"invite_url": "<string>",
"email": "<string>",
"phone": "<string>",
"first_name": "<string>",
"last_name": "<string>",
"product_types": [
"<string>"
],
"external_invite_id": "<string>",
"expires_at": "2023-11-07T05:31:56Z",
"created_at": "2023-11-07T05:31:56Z"
}
}{
"error": {
"code": "<string>",
"message": "<string>"
}
}{
"error": {
"code": "<string>",
"message": "<string>"
}
}{
"error": {
"code": "<string>",
"message": "<string>"
}
}{
"error": {
"code": "<string>",
"message": "<string>"
}
}Authorizations
VitaRelay API key (vr_live_... or vr_test_...) with the invites:* scopes.
Body
clinic for a Tele Clinic, rep for a Rep Partner.
clinic, rep Required unless send_email is false. The invite email is sent here.
Which product groups the invited organization can see. Omit for all. 503B is never offered.
503a, rnd, supplements Set false to get the link back without emailing the prospect.
Your own id for the invite. Makes the call safe to retry.
128Response
Replay of an earlier call with the same external_invite_id; the original invite.
Show child attributes
Show child attributes

