curl --request POST \
--url https://api.healos.ai/ext-api/v1/patients \
--header 'Content-Type: application/json' \
--header 'X-API-Key: <api-key>' \
--data '
{
"name": "Maria Santos",
"first_name": "Maria",
"last_name": "Santos",
"date_of_birth": "1990-03-15",
"gender": "female",
"phone": "+14155550123",
"email": "maria@example.com",
"address": "<unknown>",
"mrn": "MRN-12345",
"external_id": "PARTNER-12345",
"provider_id": "aaaaaaa1-0000-0000-0000-000000000001"
}
'import requests
url = "https://api.healos.ai/ext-api/v1/patients"
payload = {
"name": "Maria Santos",
"first_name": "Maria",
"last_name": "Santos",
"date_of_birth": "1990-03-15",
"gender": "female",
"phone": "+14155550123",
"email": "maria@example.com",
"address": "<unknown>",
"mrn": "MRN-12345",
"external_id": "PARTNER-12345",
"provider_id": "aaaaaaa1-0000-0000-0000-000000000001"
}
headers = {
"X-API-Key": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'X-API-Key': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
name: 'Maria Santos',
first_name: 'Maria',
last_name: 'Santos',
date_of_birth: '1990-03-15',
gender: 'female',
phone: '+14155550123',
email: 'maria@example.com',
address: '<unknown>',
mrn: 'MRN-12345',
external_id: 'PARTNER-12345',
provider_id: 'aaaaaaa1-0000-0000-0000-000000000001'
})
};
fetch('https://api.healos.ai/ext-api/v1/patients', 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.healos.ai/ext-api/v1/patients",
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([
'name' => 'Maria Santos',
'first_name' => 'Maria',
'last_name' => 'Santos',
'date_of_birth' => '1990-03-15',
'gender' => 'female',
'phone' => '+14155550123',
'email' => 'maria@example.com',
'address' => '<unknown>',
'mrn' => 'MRN-12345',
'external_id' => 'PARTNER-12345',
'provider_id' => 'aaaaaaa1-0000-0000-0000-000000000001'
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"X-API-Key: <api-key>"
],
]);
$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.healos.ai/ext-api/v1/patients"
payload := strings.NewReader("{\n \"name\": \"Maria Santos\",\n \"first_name\": \"Maria\",\n \"last_name\": \"Santos\",\n \"date_of_birth\": \"1990-03-15\",\n \"gender\": \"female\",\n \"phone\": \"+14155550123\",\n \"email\": \"maria@example.com\",\n \"address\": \"<unknown>\",\n \"mrn\": \"MRN-12345\",\n \"external_id\": \"PARTNER-12345\",\n \"provider_id\": \"aaaaaaa1-0000-0000-0000-000000000001\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("X-API-Key", "<api-key>")
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.healos.ai/ext-api/v1/patients")
.header("X-API-Key", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"name\": \"Maria Santos\",\n \"first_name\": \"Maria\",\n \"last_name\": \"Santos\",\n \"date_of_birth\": \"1990-03-15\",\n \"gender\": \"female\",\n \"phone\": \"+14155550123\",\n \"email\": \"maria@example.com\",\n \"address\": \"<unknown>\",\n \"mrn\": \"MRN-12345\",\n \"external_id\": \"PARTNER-12345\",\n \"provider_id\": \"aaaaaaa1-0000-0000-0000-000000000001\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.healos.ai/ext-api/v1/patients")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["X-API-Key"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"name\": \"Maria Santos\",\n \"first_name\": \"Maria\",\n \"last_name\": \"Santos\",\n \"date_of_birth\": \"1990-03-15\",\n \"gender\": \"female\",\n \"phone\": \"+14155550123\",\n \"email\": \"maria@example.com\",\n \"address\": \"<unknown>\",\n \"mrn\": \"MRN-12345\",\n \"external_id\": \"PARTNER-12345\",\n \"provider_id\": \"aaaaaaa1-0000-0000-0000-000000000001\"\n}"
response = http.request(request)
puts response.read_body{
"data": {
"id": "481926357104938271",
"name": "Maria Santos",
"first_name": "Maria",
"last_name": "Santos",
"date_of_birth": "1990-03-15",
"gender": "female",
"phone": "+14155550123",
"email": "maria@example.com",
"mrn": "MRN-12345",
"created_at": "2026-03-15T09:30:00.000Z",
"pronouns": "she/her",
"notes": "History of generalized anxiety disorder. Currently on sertraline 50mg.",
"consent": true,
"external_id": "PARTNER-12345",
"provider_id": "aaaaaaa1-0000-0000-0000-000000000001",
"address": "<unknown>"
}
}{
"error": "<string>"
}{
"error": "<string>"
}{
"error": "<string>"
}{
"error": "external_id already in use",
"existing": {
"id": "<string>",
"external_id": "<string>"
}
}{
"error": "Rate limit exceeded. Please retry after the window resets."
}Create a new patient
curl --request POST \
--url https://api.healos.ai/ext-api/v1/patients \
--header 'Content-Type: application/json' \
--header 'X-API-Key: <api-key>' \
--data '
{
"name": "Maria Santos",
"first_name": "Maria",
"last_name": "Santos",
"date_of_birth": "1990-03-15",
"gender": "female",
"phone": "+14155550123",
"email": "maria@example.com",
"address": "<unknown>",
"mrn": "MRN-12345",
"external_id": "PARTNER-12345",
"provider_id": "aaaaaaa1-0000-0000-0000-000000000001"
}
'import requests
url = "https://api.healos.ai/ext-api/v1/patients"
payload = {
"name": "Maria Santos",
"first_name": "Maria",
"last_name": "Santos",
"date_of_birth": "1990-03-15",
"gender": "female",
"phone": "+14155550123",
"email": "maria@example.com",
"address": "<unknown>",
"mrn": "MRN-12345",
"external_id": "PARTNER-12345",
"provider_id": "aaaaaaa1-0000-0000-0000-000000000001"
}
headers = {
"X-API-Key": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'X-API-Key': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
name: 'Maria Santos',
first_name: 'Maria',
last_name: 'Santos',
date_of_birth: '1990-03-15',
gender: 'female',
phone: '+14155550123',
email: 'maria@example.com',
address: '<unknown>',
mrn: 'MRN-12345',
external_id: 'PARTNER-12345',
provider_id: 'aaaaaaa1-0000-0000-0000-000000000001'
})
};
fetch('https://api.healos.ai/ext-api/v1/patients', 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.healos.ai/ext-api/v1/patients",
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([
'name' => 'Maria Santos',
'first_name' => 'Maria',
'last_name' => 'Santos',
'date_of_birth' => '1990-03-15',
'gender' => 'female',
'phone' => '+14155550123',
'email' => 'maria@example.com',
'address' => '<unknown>',
'mrn' => 'MRN-12345',
'external_id' => 'PARTNER-12345',
'provider_id' => 'aaaaaaa1-0000-0000-0000-000000000001'
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"X-API-Key: <api-key>"
],
]);
$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.healos.ai/ext-api/v1/patients"
payload := strings.NewReader("{\n \"name\": \"Maria Santos\",\n \"first_name\": \"Maria\",\n \"last_name\": \"Santos\",\n \"date_of_birth\": \"1990-03-15\",\n \"gender\": \"female\",\n \"phone\": \"+14155550123\",\n \"email\": \"maria@example.com\",\n \"address\": \"<unknown>\",\n \"mrn\": \"MRN-12345\",\n \"external_id\": \"PARTNER-12345\",\n \"provider_id\": \"aaaaaaa1-0000-0000-0000-000000000001\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("X-API-Key", "<api-key>")
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.healos.ai/ext-api/v1/patients")
.header("X-API-Key", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"name\": \"Maria Santos\",\n \"first_name\": \"Maria\",\n \"last_name\": \"Santos\",\n \"date_of_birth\": \"1990-03-15\",\n \"gender\": \"female\",\n \"phone\": \"+14155550123\",\n \"email\": \"maria@example.com\",\n \"address\": \"<unknown>\",\n \"mrn\": \"MRN-12345\",\n \"external_id\": \"PARTNER-12345\",\n \"provider_id\": \"aaaaaaa1-0000-0000-0000-000000000001\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.healos.ai/ext-api/v1/patients")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["X-API-Key"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"name\": \"Maria Santos\",\n \"first_name\": \"Maria\",\n \"last_name\": \"Santos\",\n \"date_of_birth\": \"1990-03-15\",\n \"gender\": \"female\",\n \"phone\": \"+14155550123\",\n \"email\": \"maria@example.com\",\n \"address\": \"<unknown>\",\n \"mrn\": \"MRN-12345\",\n \"external_id\": \"PARTNER-12345\",\n \"provider_id\": \"aaaaaaa1-0000-0000-0000-000000000001\"\n}"
response = http.request(request)
puts response.read_body{
"data": {
"id": "481926357104938271",
"name": "Maria Santos",
"first_name": "Maria",
"last_name": "Santos",
"date_of_birth": "1990-03-15",
"gender": "female",
"phone": "+14155550123",
"email": "maria@example.com",
"mrn": "MRN-12345",
"created_at": "2026-03-15T09:30:00.000Z",
"pronouns": "she/her",
"notes": "History of generalized anxiety disorder. Currently on sertraline 50mg.",
"consent": true,
"external_id": "PARTNER-12345",
"provider_id": "aaaaaaa1-0000-0000-0000-000000000001",
"address": "<unknown>"
}
}{
"error": "<string>"
}{
"error": "<string>"
}{
"error": "<string>"
}{
"error": "external_id already in use",
"existing": {
"id": "<string>",
"external_id": "<string>"
}
}{
"error": "Rate limit exceeded. Please retry after the window resets."
}Authorizations
API key obtained from /api/v1/ext-api-keys
Body
- Option 1
- Option 2
- Option 3
Patient display name. If omitted, first_name and/or last_name are used.
1"Maria Santos"
Patient first name
1"Maria"
Patient last name
1"Santos"
Date of birth (YYYY-MM-DD)
1"1990-03-15"
Patient gender
1"female"
Patient phone number
1"+14155550123"
Patient email
"maria@example.com"
Structured address JSON
Medical record number (optional). Omit, or send null/empty when the patient has no MRN.
64"MRN-12345"
Optional caller-supplied identifier. Unique per organization; immutable once set. Duplicate values return 409 with the existing record.
1 - 255"PARTNER-12345"
Optional internal provider id (see GET /providers) to assign this patient to. Must be a provider in your organization. Defaults to the provider that owns the API key.
1"aaaaaaa1-0000-0000-0000-000000000001"
Response
Patient created
Show child attributes
Show child attributes
Was this page helpful?

