{
"firstName": "John",
"lastName": "Doe",
"phoneNumber": "+61412345678",
"email": "john.doe@example.com",
"dateOfBirth": "1990-01-15",
"addressLine1": "123 Main St",
"addressLine2": "Apt 4B",
"suburb": "Melbourne",
"state": "VIC",
"postcode": "3000",
"country": "AU"
}
{
"data": {
"id": "550e8400-e29b-41d4-a716-446655440000",
"firstName": "John",
"lastName": "Doe",
"phoneNumber": "+61412345678",
"email": "john.doe@example.com",
"dateOfBirth": "1990-01-15",
"addressLine1": "123 Main St",
"addressLine2": "Apt 4B",
"suburb": "Melbourne",
"state": "VIC",
"postcode": "3000",
"country": "AU",
"organisationId": "org-uuid-here",
"isIdentified": true,
"createdAt": "2025-12-03T10:30:00.000Z",
"updatedAt": "2025-12-03T10:30:00.000Z"
},
"meta": {}
}
{
"type": "about:blank",
"title": "Unauthorized",
"status": 401,
"detail": "Missing or invalid API key",
"instance": null
}
{
"type": "about:blank",
"title": "Validation Error",
"status": 422,
"detail": "Validation failed",
"instance": null,
"errors": [
{
"path": ["phoneNumber"],
"message": "Phone number must be in E.164 format (e.g., +1234567890)"
}
]
}
Patients
Create Patient
Creates a new patient in your organization
POST
/
patients
{
"firstName": "John",
"lastName": "Doe",
"phoneNumber": "+61412345678",
"email": "john.doe@example.com",
"dateOfBirth": "1990-01-15",
"addressLine1": "123 Main St",
"addressLine2": "Apt 4B",
"suburb": "Melbourne",
"state": "VIC",
"postcode": "3000",
"country": "AU"
}
{
"data": {
"id": "550e8400-e29b-41d4-a716-446655440000",
"firstName": "John",
"lastName": "Doe",
"phoneNumber": "+61412345678",
"email": "john.doe@example.com",
"dateOfBirth": "1990-01-15",
"addressLine1": "123 Main St",
"addressLine2": "Apt 4B",
"suburb": "Melbourne",
"state": "VIC",
"postcode": "3000",
"country": "AU",
"organisationId": "org-uuid-here",
"isIdentified": true,
"createdAt": "2025-12-03T10:30:00.000Z",
"updatedAt": "2025-12-03T10:30:00.000Z"
},
"meta": {}
}
{
"type": "about:blank",
"title": "Unauthorized",
"status": 401,
"detail": "Missing or invalid API key",
"instance": null
}
{
"type": "about:blank",
"title": "Validation Error",
"status": 422,
"detail": "Validation failed",
"instance": null,
"errors": [
{
"path": ["phoneNumber"],
"message": "Phone number must be in E.164 format (e.g., +1234567890)"
}
]
}
Request Body
string
required
Patient’s first name. Min 1 character, max 255 characters.
string
required
Patient’s last name. Min 1 character, max 255 characters.
string
required
Phone number in E.164 format. Must start with
+ followed by country code and
number. Examples: - Australia: +61412345678 - US: +14155551234 - UK:
+447700900123string
required
Date of birth in ISO 8601 format (
YYYY-MM-DD). Example: 1990-01-15string
Valid email address for the patient.
string
Street address line 1. Max 255 characters.
string
Street address line 2 (apartment, suite, etc.). Max 255 characters.
string
Suburb or city. Max 100 characters.
string
State or province. Max 50 characters.
string
Postal or ZIP code. Max 20 characters.
string
Country code. Currently only
AU (Australia) is supported.Response
object
The created patient object.
Show Patient object properties
Show Patient object properties
string
Unique patient identifier (UUID).
string
Patient’s first name.
string
Patient’s last name.
string
Phone number in E.164 format.
string
Patient’s email address.
string | null
Date of birth (YYYY-MM-DD) or null if not provided.
string | null
Street address line 1.
string | null
Street address line 2.
string | null
Suburb or city.
string | null
State or province.
string | null
Postal or ZIP code.
string | null
Country code.
string
Your organization ID (UUID).
boolean
Whether the patient is fully identified. Always
true for API-created
patients.string
ISO 8601 timestamp when the patient was created.
string
ISO 8601 timestamp when the patient was last updated.
object
Additional metadata (currently empty).
Examples
- Development
- Production
const response = await fetch(
"https://api.demo.operahealth.ai/api/v1/patients",
{
method: "POST",
headers: {
Authorization: "Bearer opera_demo_your_api_key_here",
"Content-Type": "application/json",
},
body: JSON.stringify({
firstName: "John",
lastName: "Doe",
phoneNumber: "+61412345678",
email: "john.doe@example.com",
dateOfBirth: "1990-01-15",
addressLine1: "123 Main St",
suburb: "Melbourne",
state: "VIC",
postcode: "3000",
country: "AU",
}),
}
);
if (!response.ok) {
const error = await response.json();
console.error("Error:", error);
throw new Error(error.detail);
}
const { data } = await response.json();
console.log("Patient created:", data);
import requests
url = "https://api.demo.operahealth.ai/api/v1/patients"
headers = {
"Authorization": "Bearer opera_demo_your_api_key_here",
"Content-Type": "application/json"
}
payload = {
"firstName": "John",
"lastName": "Doe",
"phoneNumber": "+61412345678",
"email": "john.doe@example.com",
"dateOfBirth": "1990-01-15",
"addressLine1": "123 Main St",
"suburb": "Melbourne",
"state": "VIC",
"postcode": "3000",
"country": "AU"
}
response = requests.post(url, json=payload, headers=headers)
if response.status_code == 201:
patient = response.json()["data"]
print(f"Patient created: {patient['id']}")
else:
error = response.json()
print(f"Error: {error['detail']}")
curl -X POST https://api.demo.operahealth.ai/api/v1/patients \
-H "Authorization: Bearer opera_demo_your_api_key_here" \
-H "Content-Type: application/json" \
-d '{
"firstName": "John",
"lastName": "Doe",
"phoneNumber": "+61412345678",
"email": "john.doe@example.com",
"dateOfBirth": "1990-01-15",
"addressLine1": "123 Main St",
"suburb": "Melbourne",
"state": "VIC",
"postcode": "3000",
"country": "AU"
}'
const response = await fetch(
"https://api.prod.operahealth.ai/api/v1/patients",
{
method: "POST",
headers: {
Authorization: "Bearer opera_live_your_api_key_here",
"Content-Type": "application/json",
},
body: JSON.stringify({
firstName: "John",
lastName: "Doe",
phoneNumber: "+61412345678",
email: "john.doe@example.com",
dateOfBirth: "1990-01-15",
addressLine1: "123 Main St",
suburb: "Melbourne",
state: "VIC",
postcode: "3000",
country: "AU",
}),
}
);
if (!response.ok) {
const error = await response.json();
console.error("Error:", error);
throw new Error(error.detail);
}
const { data } = await response.json();
console.log("Patient created:", data);
import requests
url = "https://api.prod.operahealth.ai/api/v1/patients"
headers = {
"Authorization": "Bearer opera_live_your_api_key_here",
"Content-Type": "application/json"
}
payload = {
"firstName": "John",
"lastName": "Doe",
"phoneNumber": "+61412345678",
"email": "john.doe@example.com",
"dateOfBirth": "1990-01-15",
"addressLine1": "123 Main St",
"suburb": "Melbourne",
"state": "VIC",
"postcode": "3000",
"country": "AU"
}
response = requests.post(url, json=payload, headers=headers)
if response.status_code == 201:
patient = response.json()["data"]
print(f"Patient created: {patient['id']}")
else:
error = response.json()
print(f"Error: {error['detail']}")
curl -X POST https://api.prod.operahealth.ai/api/v1/patients \
-H "Authorization: Bearer opera_live_your_api_key_here" \
-H "Content-Type: application/json" \
-d '{
"firstName": "John",
"lastName": "Doe",
"phoneNumber": "+61412345678",
"email": "john.doe@example.com",
"dateOfBirth": "1990-01-15",
"addressLine1": "123 Main St",
"suburb": "Melbourne",
"state": "VIC",
"postcode": "3000",
"country": "AU"
}'
{
"firstName": "John",
"lastName": "Doe",
"phoneNumber": "+61412345678",
"email": "john.doe@example.com",
"dateOfBirth": "1990-01-15",
"addressLine1": "123 Main St",
"addressLine2": "Apt 4B",
"suburb": "Melbourne",
"state": "VIC",
"postcode": "3000",
"country": "AU"
}
{
"data": {
"id": "550e8400-e29b-41d4-a716-446655440000",
"firstName": "John",
"lastName": "Doe",
"phoneNumber": "+61412345678",
"email": "john.doe@example.com",
"dateOfBirth": "1990-01-15",
"addressLine1": "123 Main St",
"addressLine2": "Apt 4B",
"suburb": "Melbourne",
"state": "VIC",
"postcode": "3000",
"country": "AU",
"organisationId": "org-uuid-here",
"isIdentified": true,
"createdAt": "2025-12-03T10:30:00.000Z",
"updatedAt": "2025-12-03T10:30:00.000Z"
},
"meta": {}
}
{
"type": "about:blank",
"title": "Unauthorized",
"status": 401,
"detail": "Missing or invalid API key",
"instance": null
}
{
"type": "about:blank",
"title": "Validation Error",
"status": 422,
"detail": "Validation failed",
"instance": null,
"errors": [
{
"path": ["phoneNumber"],
"message": "Phone number must be in E.164 format (e.g., +1234567890)"
}
]
}
Authorizations
API key authentication using Bearer scheme. Get your API key from the Operahealth dashboard.
Body
application/json
Patient's first name
Required string length:
1 - 255Patient's last name
Required string length:
1 - 255Phone number in E.164 format (e.g., +61412345678)
Pattern:
^\+[1-9]\d{1,14}$Date of birth in ISO 8601 format (YYYY-MM-DD)
Patient's email address
Street address line 1
Maximum string length:
255Street address line 2 (apartment, suite, etc.)
Maximum string length:
255Suburb or city
Maximum string length:
100State or province
Maximum string length:
50Postal or ZIP code
Maximum string length:
20Country code (only Australia supported)
Available options:
AU