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"
}
'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));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){
"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": "<string>",
"code": "idempotency_key_invalid"
}{
"error": "Rate limit exceeded. Please retry after the window resets.",
"code": "daily_cap_reached",
"reset_at": "2026-10-28T00:00:00.000Z"
}Patients
Create a new patient
POST
/
patients
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"
}
'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));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){
"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": "<string>",
"code": "idempotency_key_invalid"
}{
"error": "Rate limit exceeded. Please retry after the window resets.",
"code": "daily_cap_reached",
"reset_at": "2026-10-28T00:00:00.000Z"
}| Requirement | Detail |
|---|---|
| Scope | patients:write |
| Rate limit | About 60 requests per minute per API key (shared by all endpoints; approximate) |
| Cost | Free |
Safety
- Writes data: Yes. Creates a patient in your organization.
- Safe to retry: Only with
external_id: a repeat with the sameexternal_idreturns409with the existing record instead of a duplicate. Without it, a retry creates a second record. - Contacts an outside system: None
- Dry run: Not available.
Headers
Makes a retry of this request safe. A repeat with the same key and the same request within 24 hours does not run again: it returns the original status with the resource as it is now, and an Idempotent-Replayed: true header. Keys are scoped to your organization and API key. See https://docs.healos.ai/idempotency.
Up to 255 printable ASCII characters. Use a new random value (a UUID) for each new request and resend the same value when you retry it.
Required string length:
1 - 255Example:
"5f0c3a8e-2b7d-4c1e-9a64-0d3f2e1b7c90"
Body
application/json
- Option 1
- Option 2
- Option 3
Was this page helpful?

