POST /invitations
curl --request POST \
--url https://api.example.test/invitations \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"invitation": {
"recipient_email": "jsmith@example.com",
"recipient_password": "<string>",
"recipient_name": "<string>",
"invitation_for": "<string>",
"assistant_patient_access": true,
"send_email": true,
"configuration": {
"access_to_clinical": true,
"access_to_charges": true,
"custom_roles": {
"administrator": true,
"restricted_medic": true,
"all_agendas": true,
"access_control": true
}
},
"create_user": true,
"organization_id": "<string>",
"location_id": "<string>",
"physician_specialty_id": "<string>"
}
}
'import requests
url = "https://api.example.test/invitations"
payload = { "invitation": {
"recipient_email": "jsmith@example.com",
"recipient_password": "<string>",
"recipient_name": "<string>",
"invitation_for": "<string>",
"assistant_patient_access": True,
"send_email": True,
"configuration": {
"access_to_clinical": True,
"access_to_charges": True,
"custom_roles": {
"administrator": True,
"restricted_medic": True,
"all_agendas": True,
"access_control": True
}
},
"create_user": True,
"organization_id": "<string>",
"location_id": "<string>",
"physician_specialty_id": "<string>"
} }
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({
invitation: {
recipient_email: 'jsmith@example.com',
recipient_password: '<string>',
recipient_name: '<string>',
invitation_for: '<string>',
assistant_patient_access: true,
send_email: true,
configuration: {
access_to_clinical: true,
access_to_charges: true,
custom_roles: {
administrator: true,
restricted_medic: true,
all_agendas: true,
access_control: true
}
},
create_user: true,
organization_id: '<string>',
location_id: '<string>',
physician_specialty_id: '<string>'
}
})
};
fetch('https://api.example.test/invitations', 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://api.example.test/invitations",
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([
'invitation' => [
'recipient_email' => 'jsmith@example.com',
'recipient_password' => '<string>',
'recipient_name' => '<string>',
'invitation_for' => '<string>',
'assistant_patient_access' => true,
'send_email' => true,
'configuration' => [
'access_to_clinical' => true,
'access_to_charges' => true,
'custom_roles' => [
'administrator' => true,
'restricted_medic' => true,
'all_agendas' => true,
'access_control' => true
]
],
'create_user' => true,
'organization_id' => '<string>',
'location_id' => '<string>',
'physician_specialty_id' => '<string>'
]
]),
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://api.example.test/invitations"
payload := strings.NewReader("{\n \"invitation\": {\n \"recipient_email\": \"jsmith@example.com\",\n \"recipient_password\": \"<string>\",\n \"recipient_name\": \"<string>\",\n \"invitation_for\": \"<string>\",\n \"assistant_patient_access\": true,\n \"send_email\": true,\n \"configuration\": {\n \"access_to_clinical\": true,\n \"access_to_charges\": true,\n \"custom_roles\": {\n \"administrator\": true,\n \"restricted_medic\": true,\n \"all_agendas\": true,\n \"access_control\": true\n }\n },\n \"create_user\": true,\n \"organization_id\": \"<string>\",\n \"location_id\": \"<string>\",\n \"physician_specialty_id\": \"<string>\"\n }\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://api.example.test/invitations")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"invitation\": {\n \"recipient_email\": \"jsmith@example.com\",\n \"recipient_password\": \"<string>\",\n \"recipient_name\": \"<string>\",\n \"invitation_for\": \"<string>\",\n \"assistant_patient_access\": true,\n \"send_email\": true,\n \"configuration\": {\n \"access_to_clinical\": true,\n \"access_to_charges\": true,\n \"custom_roles\": {\n \"administrator\": true,\n \"restricted_medic\": true,\n \"all_agendas\": true,\n \"access_control\": true\n }\n },\n \"create_user\": true,\n \"organization_id\": \"<string>\",\n \"location_id\": \"<string>\",\n \"physician_specialty_id\": \"<string>\"\n }\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.example.test/invitations")
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 \"invitation\": {\n \"recipient_email\": \"jsmith@example.com\",\n \"recipient_password\": \"<string>\",\n \"recipient_name\": \"<string>\",\n \"invitation_for\": \"<string>\",\n \"assistant_patient_access\": true,\n \"send_email\": true,\n \"configuration\": {\n \"access_to_clinical\": true,\n \"access_to_charges\": true,\n \"custom_roles\": {\n \"administrator\": true,\n \"restricted_medic\": true,\n \"all_agendas\": true,\n \"access_control\": true\n }\n },\n \"create_user\": true,\n \"organization_id\": \"<string>\",\n \"location_id\": \"<string>\",\n \"physician_specialty_id\": \"<string>\"\n }\n}"
response = http.request(request)
puts response.read_bodyAuthentication and accounts
POST /invitations
POST
/
invitations
POST /invitations
curl --request POST \
--url https://api.example.test/invitations \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"invitation": {
"recipient_email": "jsmith@example.com",
"recipient_password": "<string>",
"recipient_name": "<string>",
"invitation_for": "<string>",
"assistant_patient_access": true,
"send_email": true,
"configuration": {
"access_to_clinical": true,
"access_to_charges": true,
"custom_roles": {
"administrator": true,
"restricted_medic": true,
"all_agendas": true,
"access_control": true
}
},
"create_user": true,
"organization_id": "<string>",
"location_id": "<string>",
"physician_specialty_id": "<string>"
}
}
'import requests
url = "https://api.example.test/invitations"
payload = { "invitation": {
"recipient_email": "jsmith@example.com",
"recipient_password": "<string>",
"recipient_name": "<string>",
"invitation_for": "<string>",
"assistant_patient_access": True,
"send_email": True,
"configuration": {
"access_to_clinical": True,
"access_to_charges": True,
"custom_roles": {
"administrator": True,
"restricted_medic": True,
"all_agendas": True,
"access_control": True
}
},
"create_user": True,
"organization_id": "<string>",
"location_id": "<string>",
"physician_specialty_id": "<string>"
} }
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({
invitation: {
recipient_email: 'jsmith@example.com',
recipient_password: '<string>',
recipient_name: '<string>',
invitation_for: '<string>',
assistant_patient_access: true,
send_email: true,
configuration: {
access_to_clinical: true,
access_to_charges: true,
custom_roles: {
administrator: true,
restricted_medic: true,
all_agendas: true,
access_control: true
}
},
create_user: true,
organization_id: '<string>',
location_id: '<string>',
physician_specialty_id: '<string>'
}
})
};
fetch('https://api.example.test/invitations', 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://api.example.test/invitations",
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([
'invitation' => [
'recipient_email' => 'jsmith@example.com',
'recipient_password' => '<string>',
'recipient_name' => '<string>',
'invitation_for' => '<string>',
'assistant_patient_access' => true,
'send_email' => true,
'configuration' => [
'access_to_clinical' => true,
'access_to_charges' => true,
'custom_roles' => [
'administrator' => true,
'restricted_medic' => true,
'all_agendas' => true,
'access_control' => true
]
],
'create_user' => true,
'organization_id' => '<string>',
'location_id' => '<string>',
'physician_specialty_id' => '<string>'
]
]),
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://api.example.test/invitations"
payload := strings.NewReader("{\n \"invitation\": {\n \"recipient_email\": \"jsmith@example.com\",\n \"recipient_password\": \"<string>\",\n \"recipient_name\": \"<string>\",\n \"invitation_for\": \"<string>\",\n \"assistant_patient_access\": true,\n \"send_email\": true,\n \"configuration\": {\n \"access_to_clinical\": true,\n \"access_to_charges\": true,\n \"custom_roles\": {\n \"administrator\": true,\n \"restricted_medic\": true,\n \"all_agendas\": true,\n \"access_control\": true\n }\n },\n \"create_user\": true,\n \"organization_id\": \"<string>\",\n \"location_id\": \"<string>\",\n \"physician_specialty_id\": \"<string>\"\n }\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://api.example.test/invitations")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"invitation\": {\n \"recipient_email\": \"jsmith@example.com\",\n \"recipient_password\": \"<string>\",\n \"recipient_name\": \"<string>\",\n \"invitation_for\": \"<string>\",\n \"assistant_patient_access\": true,\n \"send_email\": true,\n \"configuration\": {\n \"access_to_clinical\": true,\n \"access_to_charges\": true,\n \"custom_roles\": {\n \"administrator\": true,\n \"restricted_medic\": true,\n \"all_agendas\": true,\n \"access_control\": true\n }\n },\n \"create_user\": true,\n \"organization_id\": \"<string>\",\n \"location_id\": \"<string>\",\n \"physician_specialty_id\": \"<string>\"\n }\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.example.test/invitations")
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 \"invitation\": {\n \"recipient_email\": \"jsmith@example.com\",\n \"recipient_password\": \"<string>\",\n \"recipient_name\": \"<string>\",\n \"invitation_for\": \"<string>\",\n \"assistant_patient_access\": true,\n \"send_email\": true,\n \"configuration\": {\n \"access_to_clinical\": true,\n \"access_to_charges\": true,\n \"custom_roles\": {\n \"administrator\": true,\n \"restricted_medic\": true,\n \"all_agendas\": true,\n \"access_control\": true\n }\n },\n \"create_user\": true,\n \"organization_id\": \"<string>\",\n \"location_id\": \"<string>\",\n \"physician_specialty_id\": \"<string>\"\n }\n}"
response = http.request(request)
puts response.read_body⌘I