Skip to main content
{
  "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": {}
}

Request Body

firstName
string
required
Patient’s first name. Min 1 character, max 255 characters.
lastName
string
required
Patient’s last name. Min 1 character, max 255 characters.
phoneNumber
string
required
Phone number in E.164 format. Must start with + followed by country code and number. Examples: - Australia: +61412345678 - US: +14155551234 - UK: +447700900123
dateOfBirth
string
required
Date of birth in ISO 8601 format (YYYY-MM-DD). Example: 1990-01-15
email
string
Valid email address for the patient.
addressLine1
string
Street address line 1. Max 255 characters.
addressLine2
string
Street address line 2 (apartment, suite, etc.). Max 255 characters.
suburb
string
Suburb or city. Max 100 characters.
state
string
State or province. Max 50 characters.
postcode
string
Postal or ZIP code. Max 20 characters.
country
string
Country code. Currently only AU (Australia) is supported.

Response

data
object
The created patient object.
meta
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);
{
  "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": {}
}