Python
import requests
url = 'https://api.miramace.com/v1/patient'
headers = {
'Authorization': 'Bearer YOUR_API_KEY',
'Content-Type': 'application/json'
}
payload = {
'project_id': '123e4567-e89b-12d3-a456-426614174000',
'phone_number': '+15555555555',
'email': 'patient@example.com',
'first_name': 'Jane',
'last_name': 'Doe',
'date_of_birth': '1990-01-15',
'address': {
'street_name': '123 Market Street',
'city': 'San Francisco',
'state': 'CA',
'postal_code': '94105',
'country_code': 'US'
},
'primary_care_provider': {
'name': 'Dr. Sarah Smith',
'practice': 'SF Medical Group'
},
'insurance': {
'medical': [
{
'company_name': 'Blue Cross Blue Shield',
'member_id': 'BCB123456789',
'group_number': 'GRP987654',
'plan_name': 'PPO Gold',
'phone_number': '+18005551234',
'relationship_to_subscriber': 'SELF',primary_subscriber: {
'first_name': 'Jane',
'last_name': 'Doe'
}
},
{
'company_name': 'Aetna',
'member_id': 'AET987654321',
'group_number': 'GRP456789',
'plan_name': 'HMO Silver',
'phone_number': '+18005559876',
'relationship_to_subscriber': 'DEPENDENT',primary_subscriber: {
'first_name': 'John',
'last_name': 'Doe'
}
}
],
'dental': [
{
'company_name': 'Delta Dental',
'member_id': 'DDB123456789',
'group_number': 'GRPD123',
'plan_name': 'Premier Plan',
'phone_number': '+18005553456',
'relationship_to_subscriber': 'SELF'
}
],
'vision': [
{
'company_name': 'VSP',
'member_id': 'VSP123456789',
'group_number': 'GRPV123',
'plan_name': 'Vision Care',
'phone_number': '+18005554567',
'relationship_to_subscriber': 'SELF'
}
]
}
}
response = requests.post(url, json=payload, headers=headers)
print(response.json())const response = await fetch('https://api.miramace.com/v1/patient', {
method: 'POST',
headers: {
'Authorization': 'Bearer YOUR_API_KEY',
'Content-Type': 'application/json',
},
body: JSON.stringify({
project_id: '123e4567-e89b-12d3-a456-426614174000',phone_number: '+15555555555',email: 'patient@example.com',first_name: 'Jane',last_name: 'Doe',date_of_birth: '1990-01-15',address: {
street_name: '123 Market Street',
city: 'San Francisco',
state: 'CA',
postal_code: '94105',
country_code: 'US'
},primary_care_provider: {
name: 'Dr. Sarah Smith',
practice: 'SF Medical Group'
},insurance: {
medical: [
{
company_name: 'Blue Cross Blue Shield',
member_id: 'BCB123456789',
group_number: 'GRP987654',
plan_name: 'PPO Gold',
phone_number: '+18005551234',
relationship_to_subscriber: 'SELF',primary_subscriber: {
first_name: 'Jane',
last_name: 'Doe'
}
},
{
company_name: 'Aetna',
member_id: 'AET987654321',
group_number: 'GRP456789',
plan_name: 'HMO Silver',
phone_number: '+18005559876',
relationship_to_subscriber: 'DEPENDENT',primary_subscriber: {
first_name: 'John',
last_name: 'Doe'
}
}
],dental: [
{
company_name: 'Delta Dental',
member_id: 'DDB123456789',
group_number: 'GRPD123',
plan_name: 'Premier Plan',
phone_number: '+18005553456',
relationship_to_subscriber: 'SELF'
}
],vision: [
{
company_name: 'VSP',
member_id: 'VSP123456789',
group_number: 'GRPV123',
plan_name: 'Vision Care',
phone_number: '+18005554567',
relationship_to_subscriber: 'SELF'
}
]
}
})
});
const data = await response.json();
console.log(data);curl --request POST \
--url https://api.miramace.com/v1/patient \
--header 'Authorization: Bearer YOUR_API_KEY' \
--header 'Content-Type: application/json' \
--data '{
"project_id": "123e4567-e89b-12d3-a456-426614174000","phone_number": "+15555555555","email": "patient@example.com","first_name": "Jane","last_name": "Doe","date_of_birth": "1990-01-15","address": {"street_name": "123 Market Street","city": "San Francisco","state": "CA","postal_code": "94105","country_code": "US"},"primary_care_provider": {"name": "Dr. Sarah Smith","practice": "SF Medical Group"},"insurance": {"medical": [{"company_name": "Blue Cross Blue Shield","member_id": "BCB123456789","group_number": "GRP987654","plan_name": "PPO Gold","phone_number": "+18005551234","relationship_to_subscriber": "SELF","primary_subscriber": {"first_name": "Jane","last_name": "Doe"}},{"company_name": "Aetna","member_id": "AET987654321","group_number": "GRP456789","plan_name": "HMO Silver","phone_number": "+18005559876","relationship_to_subscriber": "DEPENDENT","primary_subscriber": {"first_name": "John","last_name": "Doe"}}],"dental": [{"company_name": "Delta Dental","member_id": "DDB123456789","group_number": "GRPD123","plan_name": "Premier Plan","phone_number": "+18005553456","relationship_to_subscriber": "SELF"}],"vision": [{"company_name": "VSP","member_id": "VSP123456789","group_number": "GRPV123","plan_name": "Vision Care","phone_number": "+18005554567","relationship_to_subscriber": "SELF"}]}}'{
"id": "123e4567-e89b-12d3-a456-426614174001"
}{
"detail": "Missing required fields"
}{
"detail": "Invalid API key"
}Patients
Create Patient
POST
/
v1
/
patient
Python
import requests
url = 'https://api.miramace.com/v1/patient'
headers = {
'Authorization': 'Bearer YOUR_API_KEY',
'Content-Type': 'application/json'
}
payload = {
'project_id': '123e4567-e89b-12d3-a456-426614174000',
'phone_number': '+15555555555',
'email': 'patient@example.com',
'first_name': 'Jane',
'last_name': 'Doe',
'date_of_birth': '1990-01-15',
'address': {
'street_name': '123 Market Street',
'city': 'San Francisco',
'state': 'CA',
'postal_code': '94105',
'country_code': 'US'
},
'primary_care_provider': {
'name': 'Dr. Sarah Smith',
'practice': 'SF Medical Group'
},
'insurance': {
'medical': [
{
'company_name': 'Blue Cross Blue Shield',
'member_id': 'BCB123456789',
'group_number': 'GRP987654',
'plan_name': 'PPO Gold',
'phone_number': '+18005551234',
'relationship_to_subscriber': 'SELF',primary_subscriber: {
'first_name': 'Jane',
'last_name': 'Doe'
}
},
{
'company_name': 'Aetna',
'member_id': 'AET987654321',
'group_number': 'GRP456789',
'plan_name': 'HMO Silver',
'phone_number': '+18005559876',
'relationship_to_subscriber': 'DEPENDENT',primary_subscriber: {
'first_name': 'John',
'last_name': 'Doe'
}
}
],
'dental': [
{
'company_name': 'Delta Dental',
'member_id': 'DDB123456789',
'group_number': 'GRPD123',
'plan_name': 'Premier Plan',
'phone_number': '+18005553456',
'relationship_to_subscriber': 'SELF'
}
],
'vision': [
{
'company_name': 'VSP',
'member_id': 'VSP123456789',
'group_number': 'GRPV123',
'plan_name': 'Vision Care',
'phone_number': '+18005554567',
'relationship_to_subscriber': 'SELF'
}
]
}
}
response = requests.post(url, json=payload, headers=headers)
print(response.json())const response = await fetch('https://api.miramace.com/v1/patient', {
method: 'POST',
headers: {
'Authorization': 'Bearer YOUR_API_KEY',
'Content-Type': 'application/json',
},
body: JSON.stringify({
project_id: '123e4567-e89b-12d3-a456-426614174000',phone_number: '+15555555555',email: 'patient@example.com',first_name: 'Jane',last_name: 'Doe',date_of_birth: '1990-01-15',address: {
street_name: '123 Market Street',
city: 'San Francisco',
state: 'CA',
postal_code: '94105',
country_code: 'US'
},primary_care_provider: {
name: 'Dr. Sarah Smith',
practice: 'SF Medical Group'
},insurance: {
medical: [
{
company_name: 'Blue Cross Blue Shield',
member_id: 'BCB123456789',
group_number: 'GRP987654',
plan_name: 'PPO Gold',
phone_number: '+18005551234',
relationship_to_subscriber: 'SELF',primary_subscriber: {
first_name: 'Jane',
last_name: 'Doe'
}
},
{
company_name: 'Aetna',
member_id: 'AET987654321',
group_number: 'GRP456789',
plan_name: 'HMO Silver',
phone_number: '+18005559876',
relationship_to_subscriber: 'DEPENDENT',primary_subscriber: {
first_name: 'John',
last_name: 'Doe'
}
}
],dental: [
{
company_name: 'Delta Dental',
member_id: 'DDB123456789',
group_number: 'GRPD123',
plan_name: 'Premier Plan',
phone_number: '+18005553456',
relationship_to_subscriber: 'SELF'
}
],vision: [
{
company_name: 'VSP',
member_id: 'VSP123456789',
group_number: 'GRPV123',
plan_name: 'Vision Care',
phone_number: '+18005554567',
relationship_to_subscriber: 'SELF'
}
]
}
})
});
const data = await response.json();
console.log(data);curl --request POST \
--url https://api.miramace.com/v1/patient \
--header 'Authorization: Bearer YOUR_API_KEY' \
--header 'Content-Type: application/json' \
--data '{
"project_id": "123e4567-e89b-12d3-a456-426614174000","phone_number": "+15555555555","email": "patient@example.com","first_name": "Jane","last_name": "Doe","date_of_birth": "1990-01-15","address": {"street_name": "123 Market Street","city": "San Francisco","state": "CA","postal_code": "94105","country_code": "US"},"primary_care_provider": {"name": "Dr. Sarah Smith","practice": "SF Medical Group"},"insurance": {"medical": [{"company_name": "Blue Cross Blue Shield","member_id": "BCB123456789","group_number": "GRP987654","plan_name": "PPO Gold","phone_number": "+18005551234","relationship_to_subscriber": "SELF","primary_subscriber": {"first_name": "Jane","last_name": "Doe"}},{"company_name": "Aetna","member_id": "AET987654321","group_number": "GRP456789","plan_name": "HMO Silver","phone_number": "+18005559876","relationship_to_subscriber": "DEPENDENT","primary_subscriber": {"first_name": "John","last_name": "Doe"}}],"dental": [{"company_name": "Delta Dental","member_id": "DDB123456789","group_number": "GRPD123","plan_name": "Premier Plan","phone_number": "+18005553456","relationship_to_subscriber": "SELF"}],"vision": [{"company_name": "VSP","member_id": "VSP123456789","group_number": "GRPV123","plan_name": "Vision Care","phone_number": "+18005554567","relationship_to_subscriber": "SELF"}]}}'{
"id": "123e4567-e89b-12d3-a456-426614174001"
}{
"detail": "Missing required fields"
}{
"detail": "Invalid API key"
}Body
application/json
First name of the patient
Example:
"Jane"
Last name of the patient
Example:
"Doe"
The phone number in E.164 format (e.g., +15555555555)
Pattern:
^\+[1-9]\d{1,14}$Example:
"+15555555555"
Show child attributes
Show child attributes
UUID of the project this patient belongs to
Example:
"123e4567-e89b-12d3-a456-426614174000"
Email address of the patient
Date in ISO 8601 format (YYYY-MM-DD)
Example:
"1990-01-01"
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Response
Patient created successfully
UUID of the created patient
Example:
"123e4567-e89b-12d3-a456-426614174001"
⌘I