curl --request POST \
--url https://api.clinikehr.com/v1/clinics/{clinic_id}/patients \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--header 'Idempotency-Key: <idempotency-key>' \
--data '
{
"first_name": "<string>",
"last_name": "<string>",
"middle_name": "<string>",
"preferred_name": "<string>",
"title": "<string>",
"suffix": "<string>",
"date_of_birth": "2023-12-25",
"email": "[email protected]",
"phone": "<string>",
"secondary_phone": "<string>",
"country": "<string>",
"nationality": "<string>",
"occupation": "<string>",
"residential_address": "<string>",
"work_address": "<string>",
"city": "<string>",
"state": "<string>",
"zip": "<string>",
"next_of_kin": {
"name": "<string>",
"phone": "<string>",
"address": "<string>"
},
"national_id": "<string>",
"preferred_language": "<string>",
"referred_by": "<string>",
"referral_source_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"employment": {
"status": "<string>",
"company": "<string>",
"role": "<string>"
},
"is_dependent": true,
"is_waitlist": true,
"sponsor_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"billing": {},
"medical_history": "<string>",
"family_history": "<string>",
"smoking_status": "<string>",
"alcohol_use": "<string>",
"recreational_drug_use": "<string>",
"physical_activity": "<string>",
"living_arrangement": "<string>",
"is_vip": true,
"primary_location_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"emails": [
{
"email": "[email protected]",
"type": "<string>",
"is_primary": false
}
],
"phones": [
{
"phone_number": "<string>",
"type": "<string>",
"is_primary": false
}
],
"guardians": [
{
"guardian_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"first_name": "<string>",
"last_name": "<string>",
"email": "<string>",
"phone": "<string>",
"is_responsible_for_billing": false,
"is_primary": false,
"can_access_records": false,
"is_emergency_contact": true,
"can_schedule_appointments": false,
"notes": "<string>"
}
],
"run_automations": false
}
'const options = {
method: 'POST',
headers: {
'Idempotency-Key': '<idempotency-key>',
Authorization: 'Bearer <token>',
'Content-Type': 'application/json'
},
body: JSON.stringify({
first_name: '<string>',
last_name: '<string>',
middle_name: '<string>',
preferred_name: '<string>',
title: '<string>',
suffix: '<string>',
date_of_birth: '2023-12-25',
email: '[email protected]',
phone: '<string>',
secondary_phone: '<string>',
country: '<string>',
nationality: '<string>',
occupation: '<string>',
residential_address: '<string>',
work_address: '<string>',
city: '<string>',
state: '<string>',
zip: '<string>',
next_of_kin: {name: '<string>', phone: '<string>', address: '<string>'},
national_id: '<string>',
preferred_language: '<string>',
referred_by: '<string>',
referral_source_id: '3c90c3cc-0d44-4b50-8888-8dd25736052a',
employment: {status: '<string>', company: '<string>', role: '<string>'},
is_dependent: true,
is_waitlist: true,
sponsor_id: '3c90c3cc-0d44-4b50-8888-8dd25736052a',
billing: {},
medical_history: '<string>',
family_history: '<string>',
smoking_status: '<string>',
alcohol_use: '<string>',
recreational_drug_use: '<string>',
physical_activity: '<string>',
living_arrangement: '<string>',
is_vip: true,
primary_location_id: '3c90c3cc-0d44-4b50-8888-8dd25736052a',
emails: [{email: '[email protected]', type: '<string>', is_primary: false}],
phones: [{phone_number: '<string>', type: '<string>', is_primary: false}],
guardians: [
{
guardian_id: '3c90c3cc-0d44-4b50-8888-8dd25736052a',
first_name: '<string>',
last_name: '<string>',
email: '<string>',
phone: '<string>',
is_responsible_for_billing: false,
is_primary: false,
can_access_records: false,
is_emergency_contact: true,
can_schedule_appointments: false,
notes: '<string>'
}
],
run_automations: false
})
};
fetch('https://api.clinikehr.com/v1/clinics/{clinic_id}/patients', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://api.clinikehr.com/v1/clinics/{clinic_id}/patients"
payload = {
"first_name": "<string>",
"last_name": "<string>",
"middle_name": "<string>",
"preferred_name": "<string>",
"title": "<string>",
"suffix": "<string>",
"date_of_birth": "2023-12-25",
"email": "[email protected]",
"phone": "<string>",
"secondary_phone": "<string>",
"country": "<string>",
"nationality": "<string>",
"occupation": "<string>",
"residential_address": "<string>",
"work_address": "<string>",
"city": "<string>",
"state": "<string>",
"zip": "<string>",
"next_of_kin": {
"name": "<string>",
"phone": "<string>",
"address": "<string>"
},
"national_id": "<string>",
"preferred_language": "<string>",
"referred_by": "<string>",
"referral_source_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"employment": {
"status": "<string>",
"company": "<string>",
"role": "<string>"
},
"is_dependent": True,
"is_waitlist": True,
"sponsor_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"billing": {},
"medical_history": "<string>",
"family_history": "<string>",
"smoking_status": "<string>",
"alcohol_use": "<string>",
"recreational_drug_use": "<string>",
"physical_activity": "<string>",
"living_arrangement": "<string>",
"is_vip": True,
"primary_location_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"emails": [
{
"email": "[email protected]",
"type": "<string>",
"is_primary": False
}
],
"phones": [
{
"phone_number": "<string>",
"type": "<string>",
"is_primary": False
}
],
"guardians": [
{
"guardian_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"first_name": "<string>",
"last_name": "<string>",
"email": "<string>",
"phone": "<string>",
"is_responsible_for_billing": False,
"is_primary": False,
"can_access_records": False,
"is_emergency_contact": True,
"can_schedule_appointments": False,
"notes": "<string>"
}
],
"run_automations": False
}
headers = {
"Idempotency-Key": "<idempotency-key>",
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text){
"data": {
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"first_name": "<string>",
"last_name": "<string>",
"mrn": "<string>",
"middle_name": "<string>",
"preferred_name": "<string>",
"title": "<string>",
"suffix": "<string>",
"date_of_birth": "2023-12-25",
"gender": "male",
"marital_status": "single",
"client_type": "adult",
"client_status": "<string>",
"is_dependent": true,
"email": "<string>",
"phone": "<string>",
"secondary_phone": "<string>",
"country": "<string>",
"nationality": "<string>",
"occupation": "<string>",
"residential_address": "<string>",
"work_address": "<string>",
"city": "<string>",
"state": "<string>",
"zip": "<string>",
"next_of_kin": {
"name": "<string>",
"phone": "<string>",
"address": "<string>"
},
"national_id": "<string>",
"preferred_language": "<string>",
"referred_by": "<string>",
"referral_source_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"employment": {
"status": "<string>",
"company": "<string>",
"role": "<string>"
},
"is_waitlist": true,
"billing": {
"individual_type": "self_pay",
"group_type": "self_pay"
},
"sponsor_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"allergies": [
"<string>"
],
"medical_history": "<string>",
"current_medications": [
"<string>"
],
"chronic_conditions": [
"<string>"
],
"blood_type": "O+",
"genotype": "AA",
"family_history": "<string>",
"smoking_status": "<string>",
"alcohol_use": "<string>",
"recreational_drug_use": "<string>",
"physical_activity": "<string>",
"living_arrangement": "<string>",
"has_profile_image": true,
"profile_image_path": "<string>",
"status": "active",
"is_vip": true,
"primary_location_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"portal_access_enabled": true,
"admission_status": "<string>",
"couple": {
"partner_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"responsible_for_billing": true,
"relationship_status": "<string>"
},
"emails": [
{
"email": "[email protected]",
"type": "<string>",
"permission": "email_ok",
"is_primary": false
}
],
"phones": [
{
"phone_number": "<string>",
"type": "<string>",
"permission": "text_voicemail_ok",
"is_primary": false
}
],
"guardians": [
{
"guardian_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"first_name": "<string>",
"last_name": "<string>",
"email": "<string>",
"phone": "<string>",
"relationship": "parent",
"is_responsible_for_billing": false,
"is_primary": false,
"can_access_records": false,
"is_emergency_contact": true,
"can_schedule_appointments": false,
"notes": "<string>"
}
],
"insurance": [
{}
],
"pharmacies": [
{}
],
"care_providers": [
{}
],
"notification_settings": {
"upcoming_appointments_enabled": true,
"upcoming_appointments_email_option": "<string>",
"upcoming_appointments_phone_option": "<string>",
"incomplete_documents_enabled": true,
"incomplete_documents_email_option": "<string>",
"incomplete_documents_phone_option": "<string>",
"cancellations_enabled": true,
"cancellations_email_option": "<string>",
"cancellations_phone_option": "<string>"
},
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z",
"duplicate_candidates": [
{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"mrn": "<string>",
"first_name": "<string>",
"last_name": "<string>",
"similarity": 123
}
]
}
}{
"type": "<string>",
"title": "<string>",
"status": 123,
"code": "<string>",
"request_id": "<string>",
"detail": "<string>",
"errors": [
{
"pointer": "<string>",
"message": "<string>"
}
]
}{
"type": "<string>",
"title": "<string>",
"status": 123,
"code": "<string>",
"request_id": "<string>",
"detail": "<string>",
"errors": [
{
"pointer": "<string>",
"message": "<string>"
}
]
}{
"type": "<string>",
"title": "<string>",
"status": 123,
"code": "<string>",
"request_id": "<string>",
"detail": "<string>",
"errors": [
{
"pointer": "<string>",
"message": "<string>"
}
]
}{
"type": "<string>",
"title": "<string>",
"status": 123,
"code": "<string>",
"request_id": "<string>",
"detail": "<string>",
"errors": [
{
"pointer": "<string>",
"message": "<string>"
}
]
}{
"type": "<string>",
"title": "<string>",
"status": 123,
"code": "<string>",
"request_id": "<string>",
"detail": "<string>",
"errors": [
{
"pointer": "<string>",
"message": "<string>"
}
]
}{
"type": "<string>",
"title": "<string>",
"status": 123,
"code": "<string>",
"request_id": "<string>",
"detail": "<string>",
"errors": [
{
"pointer": "<string>",
"message": "<string>"
}
]
}Create a patient
Permission: patients:write Create a patient. Possible duplicates are flagged for staff review, never silently merged or refused. run_automations defaults false, suppressing the patient.created Agent Studio dispatch.
curl --request POST \
--url https://api.clinikehr.com/v1/clinics/{clinic_id}/patients \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--header 'Idempotency-Key: <idempotency-key>' \
--data '
{
"first_name": "<string>",
"last_name": "<string>",
"middle_name": "<string>",
"preferred_name": "<string>",
"title": "<string>",
"suffix": "<string>",
"date_of_birth": "2023-12-25",
"email": "[email protected]",
"phone": "<string>",
"secondary_phone": "<string>",
"country": "<string>",
"nationality": "<string>",
"occupation": "<string>",
"residential_address": "<string>",
"work_address": "<string>",
"city": "<string>",
"state": "<string>",
"zip": "<string>",
"next_of_kin": {
"name": "<string>",
"phone": "<string>",
"address": "<string>"
},
"national_id": "<string>",
"preferred_language": "<string>",
"referred_by": "<string>",
"referral_source_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"employment": {
"status": "<string>",
"company": "<string>",
"role": "<string>"
},
"is_dependent": true,
"is_waitlist": true,
"sponsor_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"billing": {},
"medical_history": "<string>",
"family_history": "<string>",
"smoking_status": "<string>",
"alcohol_use": "<string>",
"recreational_drug_use": "<string>",
"physical_activity": "<string>",
"living_arrangement": "<string>",
"is_vip": true,
"primary_location_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"emails": [
{
"email": "[email protected]",
"type": "<string>",
"is_primary": false
}
],
"phones": [
{
"phone_number": "<string>",
"type": "<string>",
"is_primary": false
}
],
"guardians": [
{
"guardian_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"first_name": "<string>",
"last_name": "<string>",
"email": "<string>",
"phone": "<string>",
"is_responsible_for_billing": false,
"is_primary": false,
"can_access_records": false,
"is_emergency_contact": true,
"can_schedule_appointments": false,
"notes": "<string>"
}
],
"run_automations": false
}
'const options = {
method: 'POST',
headers: {
'Idempotency-Key': '<idempotency-key>',
Authorization: 'Bearer <token>',
'Content-Type': 'application/json'
},
body: JSON.stringify({
first_name: '<string>',
last_name: '<string>',
middle_name: '<string>',
preferred_name: '<string>',
title: '<string>',
suffix: '<string>',
date_of_birth: '2023-12-25',
email: '[email protected]',
phone: '<string>',
secondary_phone: '<string>',
country: '<string>',
nationality: '<string>',
occupation: '<string>',
residential_address: '<string>',
work_address: '<string>',
city: '<string>',
state: '<string>',
zip: '<string>',
next_of_kin: {name: '<string>', phone: '<string>', address: '<string>'},
national_id: '<string>',
preferred_language: '<string>',
referred_by: '<string>',
referral_source_id: '3c90c3cc-0d44-4b50-8888-8dd25736052a',
employment: {status: '<string>', company: '<string>', role: '<string>'},
is_dependent: true,
is_waitlist: true,
sponsor_id: '3c90c3cc-0d44-4b50-8888-8dd25736052a',
billing: {},
medical_history: '<string>',
family_history: '<string>',
smoking_status: '<string>',
alcohol_use: '<string>',
recreational_drug_use: '<string>',
physical_activity: '<string>',
living_arrangement: '<string>',
is_vip: true,
primary_location_id: '3c90c3cc-0d44-4b50-8888-8dd25736052a',
emails: [{email: '[email protected]', type: '<string>', is_primary: false}],
phones: [{phone_number: '<string>', type: '<string>', is_primary: false}],
guardians: [
{
guardian_id: '3c90c3cc-0d44-4b50-8888-8dd25736052a',
first_name: '<string>',
last_name: '<string>',
email: '<string>',
phone: '<string>',
is_responsible_for_billing: false,
is_primary: false,
can_access_records: false,
is_emergency_contact: true,
can_schedule_appointments: false,
notes: '<string>'
}
],
run_automations: false
})
};
fetch('https://api.clinikehr.com/v1/clinics/{clinic_id}/patients', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://api.clinikehr.com/v1/clinics/{clinic_id}/patients"
payload = {
"first_name": "<string>",
"last_name": "<string>",
"middle_name": "<string>",
"preferred_name": "<string>",
"title": "<string>",
"suffix": "<string>",
"date_of_birth": "2023-12-25",
"email": "[email protected]",
"phone": "<string>",
"secondary_phone": "<string>",
"country": "<string>",
"nationality": "<string>",
"occupation": "<string>",
"residential_address": "<string>",
"work_address": "<string>",
"city": "<string>",
"state": "<string>",
"zip": "<string>",
"next_of_kin": {
"name": "<string>",
"phone": "<string>",
"address": "<string>"
},
"national_id": "<string>",
"preferred_language": "<string>",
"referred_by": "<string>",
"referral_source_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"employment": {
"status": "<string>",
"company": "<string>",
"role": "<string>"
},
"is_dependent": True,
"is_waitlist": True,
"sponsor_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"billing": {},
"medical_history": "<string>",
"family_history": "<string>",
"smoking_status": "<string>",
"alcohol_use": "<string>",
"recreational_drug_use": "<string>",
"physical_activity": "<string>",
"living_arrangement": "<string>",
"is_vip": True,
"primary_location_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"emails": [
{
"email": "[email protected]",
"type": "<string>",
"is_primary": False
}
],
"phones": [
{
"phone_number": "<string>",
"type": "<string>",
"is_primary": False
}
],
"guardians": [
{
"guardian_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"first_name": "<string>",
"last_name": "<string>",
"email": "<string>",
"phone": "<string>",
"is_responsible_for_billing": False,
"is_primary": False,
"can_access_records": False,
"is_emergency_contact": True,
"can_schedule_appointments": False,
"notes": "<string>"
}
],
"run_automations": False
}
headers = {
"Idempotency-Key": "<idempotency-key>",
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text){
"data": {
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"first_name": "<string>",
"last_name": "<string>",
"mrn": "<string>",
"middle_name": "<string>",
"preferred_name": "<string>",
"title": "<string>",
"suffix": "<string>",
"date_of_birth": "2023-12-25",
"gender": "male",
"marital_status": "single",
"client_type": "adult",
"client_status": "<string>",
"is_dependent": true,
"email": "<string>",
"phone": "<string>",
"secondary_phone": "<string>",
"country": "<string>",
"nationality": "<string>",
"occupation": "<string>",
"residential_address": "<string>",
"work_address": "<string>",
"city": "<string>",
"state": "<string>",
"zip": "<string>",
"next_of_kin": {
"name": "<string>",
"phone": "<string>",
"address": "<string>"
},
"national_id": "<string>",
"preferred_language": "<string>",
"referred_by": "<string>",
"referral_source_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"employment": {
"status": "<string>",
"company": "<string>",
"role": "<string>"
},
"is_waitlist": true,
"billing": {
"individual_type": "self_pay",
"group_type": "self_pay"
},
"sponsor_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"allergies": [
"<string>"
],
"medical_history": "<string>",
"current_medications": [
"<string>"
],
"chronic_conditions": [
"<string>"
],
"blood_type": "O+",
"genotype": "AA",
"family_history": "<string>",
"smoking_status": "<string>",
"alcohol_use": "<string>",
"recreational_drug_use": "<string>",
"physical_activity": "<string>",
"living_arrangement": "<string>",
"has_profile_image": true,
"profile_image_path": "<string>",
"status": "active",
"is_vip": true,
"primary_location_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"portal_access_enabled": true,
"admission_status": "<string>",
"couple": {
"partner_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"responsible_for_billing": true,
"relationship_status": "<string>"
},
"emails": [
{
"email": "[email protected]",
"type": "<string>",
"permission": "email_ok",
"is_primary": false
}
],
"phones": [
{
"phone_number": "<string>",
"type": "<string>",
"permission": "text_voicemail_ok",
"is_primary": false
}
],
"guardians": [
{
"guardian_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"first_name": "<string>",
"last_name": "<string>",
"email": "<string>",
"phone": "<string>",
"relationship": "parent",
"is_responsible_for_billing": false,
"is_primary": false,
"can_access_records": false,
"is_emergency_contact": true,
"can_schedule_appointments": false,
"notes": "<string>"
}
],
"insurance": [
{}
],
"pharmacies": [
{}
],
"care_providers": [
{}
],
"notification_settings": {
"upcoming_appointments_enabled": true,
"upcoming_appointments_email_option": "<string>",
"upcoming_appointments_phone_option": "<string>",
"incomplete_documents_enabled": true,
"incomplete_documents_email_option": "<string>",
"incomplete_documents_phone_option": "<string>",
"cancellations_enabled": true,
"cancellations_email_option": "<string>",
"cancellations_phone_option": "<string>"
},
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z",
"duplicate_candidates": [
{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"mrn": "<string>",
"first_name": "<string>",
"last_name": "<string>",
"similarity": 123
}
]
}
}{
"type": "<string>",
"title": "<string>",
"status": 123,
"code": "<string>",
"request_id": "<string>",
"detail": "<string>",
"errors": [
{
"pointer": "<string>",
"message": "<string>"
}
]
}{
"type": "<string>",
"title": "<string>",
"status": 123,
"code": "<string>",
"request_id": "<string>",
"detail": "<string>",
"errors": [
{
"pointer": "<string>",
"message": "<string>"
}
]
}{
"type": "<string>",
"title": "<string>",
"status": 123,
"code": "<string>",
"request_id": "<string>",
"detail": "<string>",
"errors": [
{
"pointer": "<string>",
"message": "<string>"
}
]
}{
"type": "<string>",
"title": "<string>",
"status": 123,
"code": "<string>",
"request_id": "<string>",
"detail": "<string>",
"errors": [
{
"pointer": "<string>",
"message": "<string>"
}
]
}{
"type": "<string>",
"title": "<string>",
"status": 123,
"code": "<string>",
"request_id": "<string>",
"detail": "<string>",
"errors": [
{
"pointer": "<string>",
"message": "<string>"
}
]
}{
"type": "<string>",
"title": "<string>",
"status": 123,
"code": "<string>",
"request_id": "<string>",
"detail": "<string>",
"errors": [
{
"pointer": "<string>",
"message": "<string>"
}
]
}Authorizations
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Headers
A unique value you choose for this request, such as a UUID. Sending the same key again returns the first answer instead of doing the work twice, so a timed-out request is safe to retry. Reusing a key for a different request is refused with 409 idempotency_key_conflict, and retrying while the first request is still running with 409 idempotency_key_reused. See Retries and idempotency.
1Path Parameters
Body
Unknown top-level fields, and every named read-only field (mrn, portal_access_enabled, admission_status, client_status, insurance, pharmacies, care_providers, couple, profile_image, notification_settings — the last refused with the distinct code notification_settings_not_writable), are refused BY NAME, never silently dropped — enforced by the database, not this schema. allergies, current_medications and chronic_conditions are not accepted here either: they are the clinic's reviewed clinical record, so they are refused by name. Send allergies to createAllergy and conditions to createCondition; each is held for a clinician to confirm. They are still returned when you read a patient.
11adult, minor male, female, other single, married, divorced, widowed, separated Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
O+, O-, A+, A-, B+, B-, AB+, AB- AA, AS, SS, AC, SC active, prospect, inactive, blocked Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Default false suppresses the patient.created Agent Studio dispatch.
Response
OK. data carries duplicate_candidates alongside the created record when a possible match was found.
Show child attributes
Show child attributes