curl --request POST \
--url https://api.example.com/cases/create_case \
--header 'Content-Type: application/json' \
--data '
{
"user_id": "<string>",
"patient_name": "<string>",
"patient_age": 123,
"patient_gender": "<string>",
"case_summary": "<string>",
"lab_files": [
null
],
"radiology_files": [
null
]
}
'{
"message": "<string>",
"case": {
"case.case_id": "<string>",
"case.user_id": "<string>",
"case.patient_name": "<string>",
"case.patient_age": 123,
"case.patient_gender": "<string>",
"case.case_summary": "<string>",
"case.created_at": "<string>",
"case.status": "<string>"
},
"uploaded_files": [
{
"uploaded_files[].file_id": "<string>",
"uploaded_files[].file_name": "<string>",
"uploaded_files[].file_type": "<string>",
"uploaded_files[].file_size": 123,
"uploaded_files[].file_url": "<string>",
"uploaded_files[].file_category": "<string>"
}
],
"400 Bad Request": {},
"500 Internal Server Error": {}
}Create a new medical case with patient information and optional file uploads
curl --request POST \
--url https://api.example.com/cases/create_case \
--header 'Content-Type: application/json' \
--data '
{
"user_id": "<string>",
"patient_name": "<string>",
"patient_age": 123,
"patient_gender": "<string>",
"case_summary": "<string>",
"lab_files": [
null
],
"radiology_files": [
null
]
}
'{
"message": "<string>",
"case": {
"case.case_id": "<string>",
"case.user_id": "<string>",
"case.patient_name": "<string>",
"case.patient_age": 123,
"case.patient_gender": "<string>",
"case.case_summary": "<string>",
"case.created_at": "<string>",
"case.status": "<string>"
},
"uploaded_files": [
{
"uploaded_files[].file_id": "<string>",
"uploaded_files[].file_name": "<string>",
"uploaded_files[].file_type": "<string>",
"uploaded_files[].file_size": 123,
"uploaded_files[].file_url": "<string>",
"uploaded_files[].file_category": "<string>"
}
],
"400 Bad Request": {},
"500 Internal Server Error": {}
}multipart/form-data for file uploads.
curl -X POST https://api.medmitra.com/cases/create_case \
-H "Content-Type: multipart/form-data" \
-F "user_id=b8acad4b-4944-4d66-b405-de70886e7248" \
-F "patient_name=John Doe" \
-F "patient_age=45" \
-F "patient_gender=male" \
-F "case_summary=Patient presents with chest pain and shortness of breath" \
-F "lab_files=@/path/to/lab_report.pdf" \
-F "radiology_files=@/path/to/xray.jpg"
{
"message": "Case created successfully",
"case": {
"case_id": "a1b2c3d4-5678-90ab-cdef-1234567890ab",
"user_id": "b8acad4b-4944-4d66-b405-de70886e7248",
"patient_name": "John Doe",
"patient_age": 45,
"patient_gender": "male",
"case_summary": "Patient presents with chest pain and shortness of breath",
"status": "analyzing",
"created_at": "2026-03-04T10:30:00Z"
},
"uploaded_files": [
{
"file_id": "f1e2d3c4-5678-90ab-cdef-1234567890ab",
"file_name": "lab_report.pdf",
"file_type": "application/pdf",
"file_size": 245678,
"file_url": "lab_files/a1b2c3d4-5678-90ab-cdef-1234567890ab/lab_report.pdf",
"file_category": "lab"
},
{
"file_id": "a9b8c7d6-5432-10fe-dcba-0987654321ab",
"file_name": "xray.jpg",
"file_type": "image/jpeg",
"file_size": 1234567,
"file_url": "radiology_files/a1b2c3d4-5678-90ab-cdef-1234567890ab/xray.jpg",
"file_category": "radiology"
}
]
}
{
"detail": "Error message describing the validation failure"
}
{
"detail": "Internal server error: {error details}"
}