---
title: "Create a patient"
method: POST
path: "/patients"
tags: ["Patients"]
---

# Create a patient

`POST /patients`

Creates a new patient record. The clinic is determined by the provided API key.

If a patient with a similar name and date of birth already exists, the existing patient is returned with a `200` status instead of creating a duplicate.

**Billing info:** If `address` is provided, billing address is automatically populated from it — no need to send it separately.

## Request body

- object
  - `firstName` string, required
  - `lastName` string, required
  - `middleName` string
  - `gender` string, required
  - `genderIdentity` string
  - `pronoun` string
  - `dateOfBirth` string, required — Date of birth in MM/DD/YYYY format
  - `raceEthnicity` 'White' | 'Black or African American' | 'Asian' | 'Hispanic or Latino' | 'American Indian or Alaska Native' | 'Native Hawaiian or Other Pacific Islander' | 'Other' | 'Prefer not to say'
  - `email` string, email
  - `phoneNumber` string
  - `address` object — Patient home address. Also auto-populates billingInfo.
    - `address1` string
    - `address2` string
    - `city` string
    - `state` string
    - `zip` string
  - `externalEhrId` string — Patient ID in the external EHR system
  - `externalEhr` string — Name of the external EHR system
  - `diagnoses` object[] — List of ICD-10 diagnoses associated with the patient.
    - `code` string, required
    - `description` string
  - `relatedContacts` object[] — Emergency / related contacts associated with the patient.
    - `fullName` string
    - `email` string
    - `phones` string[]
    - `relationship` string
    - `hipaaConsent` boolean — Defaults to false if not provided
  - `insurances` object[] — Insurance records associated with the patient.
    - `tradingPartnerName` string — Insurance plan name
    - `memberId` string — Member / subscriber ID
    - `groupNumber` string
    - `company` string — Insurance company name
    - `isPrimary` boolean — Defaults to false if not provided

## Response `200`

Patient already existed — returns the existing patient ID

- object
  - `patientId` string
  - `message` string

## Other responses

- `201` — Patient created successfully
- `400` — Invalid input
- `401` — Unauthorized - Invalid or missing API key
- `429` — Too Many Requests - Rate limit exceeded

---

[API](https://skmtc.dev/mdhub/apis/mdhub-api.md) · [All operations](https://skmtc.dev/mdhub/apis/mdhub-api/llms.txt) · [OpenAPI document](https://skmtc-service-production.skmtc.workers.dev/v1/apis/mdhub/mdhub-api/revisions/ee7fca23d80b/schema)
