Request Body
Patient’s first name. Min 1 character, max 255 characters.
Patient’s last name. Min 1 character, max 255 characters.
Phone number in E.164 format. Must start with + followed by country code and
number. Examples: - Australia: +61412345678 - US: +14155551234 - UK:
+447700900123
Date of birth in ISO 8601 format (YYYY-MM-DD). Example: 1990-01-15
Valid email address for the patient.
Street address line 1. Max 255 characters.
Street address line 2 (apartment, suite, etc.). Max 255 characters.
Suburb or city. Max 100 characters.
State or province. Max 50 characters.
Postal or ZIP code. Max 20 characters.
Country code. Currently only AU (Australia) is supported.
Response
The created patient object. Show Patient object properties
Unique patient identifier (UUID).
Phone number in E.164 format.
Date of birth (YYYY-MM-DD) or null if not provided.
Your organization ID (UUID).
Whether the patient is fully identified. Always true for API-created
patients.
ISO 8601 timestamp when the patient was created.
ISO 8601 timestamp when the patient was last updated.
Additional metadata (currently empty).
Examples
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 );
{
"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"
}
201 Created
401 Unauthorized
422 Validation Error
{
"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" : {}
}