POST /people
curl --request POST \
--url https://api.example.test/people \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"person": {
"first_name": "<string>",
"last_name": "<string>",
"gender": "<string>",
"account_id": "<string>",
"born_at": "2023-12-25",
"phone_country_id": "<string>",
"telephone2": "<string>",
"email": "<string>",
"without_cellphone": true,
"send_welcome_email": true,
"address_state_id": "<string>",
"patient_group_ids": [
123
],
"person_attributes": {
"send_reminders": true,
"identity_number": "<string>"
}
}
}
'import requests
url = "https://api.example.test/people"
payload = { "person": {
"first_name": "<string>",
"last_name": "<string>",
"gender": "<string>",
"account_id": "<string>",
"born_at": "2023-12-25",
"phone_country_id": "<string>",
"telephone2": "<string>",
"email": "<string>",
"without_cellphone": True,
"send_welcome_email": True,
"address_state_id": "<string>",
"patient_group_ids": [123],
"person_attributes": {
"send_reminders": True,
"identity_number": "<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({
person: {
first_name: '<string>',
last_name: '<string>',
gender: '<string>',
account_id: '<string>',
born_at: '2023-12-25',
phone_country_id: '<string>',
telephone2: '<string>',
email: '<string>',
without_cellphone: true,
send_welcome_email: true,
address_state_id: '<string>',
patient_group_ids: [123],
person_attributes: {send_reminders: true, identity_number: '<string>'}
}
})
};
fetch('https://api.example.test/people', 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/people",
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([
'person' => [
'first_name' => '<string>',
'last_name' => '<string>',
'gender' => '<string>',
'account_id' => '<string>',
'born_at' => '2023-12-25',
'phone_country_id' => '<string>',
'telephone2' => '<string>',
'email' => '<string>',
'without_cellphone' => true,
'send_welcome_email' => true,
'address_state_id' => '<string>',
'patient_group_ids' => [
123
],
'person_attributes' => [
'send_reminders' => true,
'identity_number' => '<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/people"
payload := strings.NewReader("{\n \"person\": {\n \"first_name\": \"<string>\",\n \"last_name\": \"<string>\",\n \"gender\": \"<string>\",\n \"account_id\": \"<string>\",\n \"born_at\": \"2023-12-25\",\n \"phone_country_id\": \"<string>\",\n \"telephone2\": \"<string>\",\n \"email\": \"<string>\",\n \"without_cellphone\": true,\n \"send_welcome_email\": true,\n \"address_state_id\": \"<string>\",\n \"patient_group_ids\": [\n 123\n ],\n \"person_attributes\": {\n \"send_reminders\": true,\n \"identity_number\": \"<string>\"\n }\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/people")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"person\": {\n \"first_name\": \"<string>\",\n \"last_name\": \"<string>\",\n \"gender\": \"<string>\",\n \"account_id\": \"<string>\",\n \"born_at\": \"2023-12-25\",\n \"phone_country_id\": \"<string>\",\n \"telephone2\": \"<string>\",\n \"email\": \"<string>\",\n \"without_cellphone\": true,\n \"send_welcome_email\": true,\n \"address_state_id\": \"<string>\",\n \"patient_group_ids\": [\n 123\n ],\n \"person_attributes\": {\n \"send_reminders\": true,\n \"identity_number\": \"<string>\"\n }\n }\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.example.test/people")
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 \"person\": {\n \"first_name\": \"<string>\",\n \"last_name\": \"<string>\",\n \"gender\": \"<string>\",\n \"account_id\": \"<string>\",\n \"born_at\": \"2023-12-25\",\n \"phone_country_id\": \"<string>\",\n \"telephone2\": \"<string>\",\n \"email\": \"<string>\",\n \"without_cellphone\": true,\n \"send_welcome_email\": true,\n \"address_state_id\": \"<string>\",\n \"patient_group_ids\": [\n 123\n ],\n \"person_attributes\": {\n \"send_reminders\": true,\n \"identity_number\": \"<string>\"\n }\n }\n}"
response = http.request(request)
puts response.read_body{
"person": {
"id": 123,
"first_name": "<string>",
"last_name": "<string>",
"links": {
"consultations": "<string>",
"consultation_lab_test_results": "<string>",
"consultation_schedules": "<string>",
"vital_signs_sets": "<string>",
"medical_history": "<string>",
"deffers": "<string>",
"medical_notes": "<string>",
"insurance_coverage": "<string>"
},
"full_name": "<string>",
"telephone": null,
"email": null,
"born_at": "2023-12-25",
"gender": "<string>",
"avatar_url_small": "<string>",
"avatar_url_medium": "<string>",
"telephone2": "<string>",
"address_state_id": 123,
"address_city": null,
"address_street": null,
"address_zipcode": null,
"identity_number": null,
"account_id": 123,
"avatar_url_large": "<string>",
"notes": null,
"person_attributes": {},
"phone_country_id": 123,
"is_migrated": true,
"without_cellphone": true,
"nimbochat_invitation_sent": true,
"medical_record": null
}
}Patients
POST /people
Creates a patient for an authorized treating account. A mobile number and phone country are required unless without_cellphone is true. Additional validation can depend on the organization country and patient configuration.
POST
/
people
POST /people
curl --request POST \
--url https://api.example.test/people \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"person": {
"first_name": "<string>",
"last_name": "<string>",
"gender": "<string>",
"account_id": "<string>",
"born_at": "2023-12-25",
"phone_country_id": "<string>",
"telephone2": "<string>",
"email": "<string>",
"without_cellphone": true,
"send_welcome_email": true,
"address_state_id": "<string>",
"patient_group_ids": [
123
],
"person_attributes": {
"send_reminders": true,
"identity_number": "<string>"
}
}
}
'import requests
url = "https://api.example.test/people"
payload = { "person": {
"first_name": "<string>",
"last_name": "<string>",
"gender": "<string>",
"account_id": "<string>",
"born_at": "2023-12-25",
"phone_country_id": "<string>",
"telephone2": "<string>",
"email": "<string>",
"without_cellphone": True,
"send_welcome_email": True,
"address_state_id": "<string>",
"patient_group_ids": [123],
"person_attributes": {
"send_reminders": True,
"identity_number": "<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({
person: {
first_name: '<string>',
last_name: '<string>',
gender: '<string>',
account_id: '<string>',
born_at: '2023-12-25',
phone_country_id: '<string>',
telephone2: '<string>',
email: '<string>',
without_cellphone: true,
send_welcome_email: true,
address_state_id: '<string>',
patient_group_ids: [123],
person_attributes: {send_reminders: true, identity_number: '<string>'}
}
})
};
fetch('https://api.example.test/people', 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/people",
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([
'person' => [
'first_name' => '<string>',
'last_name' => '<string>',
'gender' => '<string>',
'account_id' => '<string>',
'born_at' => '2023-12-25',
'phone_country_id' => '<string>',
'telephone2' => '<string>',
'email' => '<string>',
'without_cellphone' => true,
'send_welcome_email' => true,
'address_state_id' => '<string>',
'patient_group_ids' => [
123
],
'person_attributes' => [
'send_reminders' => true,
'identity_number' => '<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/people"
payload := strings.NewReader("{\n \"person\": {\n \"first_name\": \"<string>\",\n \"last_name\": \"<string>\",\n \"gender\": \"<string>\",\n \"account_id\": \"<string>\",\n \"born_at\": \"2023-12-25\",\n \"phone_country_id\": \"<string>\",\n \"telephone2\": \"<string>\",\n \"email\": \"<string>\",\n \"without_cellphone\": true,\n \"send_welcome_email\": true,\n \"address_state_id\": \"<string>\",\n \"patient_group_ids\": [\n 123\n ],\n \"person_attributes\": {\n \"send_reminders\": true,\n \"identity_number\": \"<string>\"\n }\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/people")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"person\": {\n \"first_name\": \"<string>\",\n \"last_name\": \"<string>\",\n \"gender\": \"<string>\",\n \"account_id\": \"<string>\",\n \"born_at\": \"2023-12-25\",\n \"phone_country_id\": \"<string>\",\n \"telephone2\": \"<string>\",\n \"email\": \"<string>\",\n \"without_cellphone\": true,\n \"send_welcome_email\": true,\n \"address_state_id\": \"<string>\",\n \"patient_group_ids\": [\n 123\n ],\n \"person_attributes\": {\n \"send_reminders\": true,\n \"identity_number\": \"<string>\"\n }\n }\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.example.test/people")
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 \"person\": {\n \"first_name\": \"<string>\",\n \"last_name\": \"<string>\",\n \"gender\": \"<string>\",\n \"account_id\": \"<string>\",\n \"born_at\": \"2023-12-25\",\n \"phone_country_id\": \"<string>\",\n \"telephone2\": \"<string>\",\n \"email\": \"<string>\",\n \"without_cellphone\": true,\n \"send_welcome_email\": true,\n \"address_state_id\": \"<string>\",\n \"patient_group_ids\": [\n 123\n ],\n \"person_attributes\": {\n \"send_reminders\": true,\n \"identity_number\": \"<string>\"\n }\n }\n}"
response = http.request(request)
puts response.read_body{
"person": {
"id": 123,
"first_name": "<string>",
"last_name": "<string>",
"links": {
"consultations": "<string>",
"consultation_lab_test_results": "<string>",
"consultation_schedules": "<string>",
"vital_signs_sets": "<string>",
"medical_history": "<string>",
"deffers": "<string>",
"medical_notes": "<string>",
"insurance_coverage": "<string>"
},
"full_name": "<string>",
"telephone": null,
"email": null,
"born_at": "2023-12-25",
"gender": "<string>",
"avatar_url_small": "<string>",
"avatar_url_medium": "<string>",
"telephone2": "<string>",
"address_state_id": 123,
"address_city": null,
"address_street": null,
"address_zipcode": null,
"identity_number": null,
"account_id": 123,
"avatar_url_large": "<string>",
"notes": null,
"person_attributes": {},
"phone_country_id": 123,
"is_migrated": true,
"without_cellphone": true,
"nimbochat_invitation_sent": true,
"medical_record": null
}
}⌘I