Skip to content

Create patient

Request

Create a new patient for the account. The account must match the OAuth token context.

Security
PartnerApiKey and PartnerOAuth
Path
accountIdinteger, (int64)required

Account identifier

Bodyapplication/jsonrequired
dateOfBirthstring^\d{4}-\d{2}-\d{2}$

Patient's date of birth in ISO 8601 format (YYYY-MM-DD)

Example:"1990-01-15"
emailstring, (email), [ 0 .. 255 ] characters

Patient's email address

Example:"john.doe@example.com"
firstNamestring, [ 1 .. 80 ] charactersrequired

Patient's first name

Example:"John"
genderstring

Patient's gender. Reference https://www.hl7.org/fhir/R4/codesystem-gender-identity.html for possible values.

Example:"Male"
lastNamestring, [ 1 .. 80 ] charactersrequired

Patient's last name

Example:"Doe"
mobilePhonestring, [ 0 .. 12 ] characters^\+?1?\d{10}$

Patient's mobile phone number. 10-digit US number, optionally prefixed with '+1' or '1'.

Example:"4155551234"
curl -i -X POST \
  'https://api-docs.lobbie.com/_mock/openapi/partner/v2/account/{accountId}/patient' \
  -H 'Authorization: Bearer <YOUR_JWT_HERE>' \
  -H 'Content-Type: application/json' \
  -H 'x-api-key: YOUR_API_KEY_HERE' \
  -d '{
    "dateOfBirth": "1990-01-15",
    "email": "john.doe@example.com",
    "firstName": "John",
    "gender": "Male",
    "lastName": "Doe",
    "mobilePhone": "4155551234"
  }'

Responses

Patient created successfully

Bodyapplication/json
activeboolean

Whether the patient is active. false indicates an archived or merged-away record.

Example:true
createdAtstring, (date-time)

Creation timestamp (UTC)

Example:"2025-01-15T14:00:00Z"
dateOfBirthstring, (date)

Patient's date of birth in ISO 8601 format (YYYY-MM-DD)

Example:"1990-01-15"
emailstring, (email)

Patient's email address

Example:"john.doe@example.com"
firstNamestring, <= 255 characters

Patient's first name

Example:"John"
genderstring

Patient's gender

Example:"male"
homeAddressobject(PatientAddressDTO)

Structured postal address

idinteger, (int64)

Unique patient identifier

Example:12345
lastNamestring, <= 255 characters

Patient's last name

Example:"Doe"
mailingAddressobject(PatientAddressDTO)

Structured postal address

mobilePhonestring

Patient's mobile phone number (digits only, no formatting)

Example:"14155551234"
primaryLocationIdinteger, (int64)

ID of the patient's primary location

Example:1312
primaryProviderIdinteger, (int64)

ID of the patient's primary provider (practitioner)

Example:987
updatedAtstring, (date-time)

Last update timestamp (UTC)

Example:"2025-01-15T14:00:00Z"
Response
{ "active": true, "createdAt": "2025-01-15T14:00:00Z", "dateOfBirth": "1990-01-15", "email": "john.doe@example.com", "firstName": "John", "gender": "male", "homeAddress": { "city": "San Francisco", "line1": "123 Main St", "line2": "Apt 4B", "postalCode": "94105", "stateRegion": "CA" }, "id": 12345, "lastName": "Doe", "mailingAddress": { "city": "San Francisco", "line1": "123 Main St", "line2": "Apt 4B", "postalCode": "94105", "stateRegion": "CA" }, "mobilePhone": "14155551234", "primaryLocationId": 1312, "primaryProviderId": 987, "updatedAt": "2025-01-15T14:00:00Z" }