Comprehensive guide for integrating with our organization-based API endpoints
All public API endpoints require organization API key authentication. You must first register or login to your organization account to obtain an API key.
To access the public APIs, you need to:
Once you have your API key, you can provide it in one of the following ways:
GET /api/encounters?apiKey=your_api_key_herex-api-key: your_api_key_hereAuthorization: Bearer your_api_key_herehttps://api.riskscoreai.com/api/v1All endpoints are relative to this base URL.
Before you can use the public APIs, you need to set up your organization account and obtain an API key.
Important: After successful registration or login, you'll receive an API key that you can use to authenticate your requests to the public APIs. Keep this API key secure and don't share it publicly.
Calculate risk score for an encounter using AI-powered analysis.
| Parameter | Type | Required | Description |
|---|---|---|---|
| physicianId | string | Required | Risk Score registered physician ID (from Add Physician API) |
| encounterDate | string | Required | Date of the encounter (ISO 8601 format) |
| soapNotes | string | Required | Complete SOAP notes in text format containing Subjective, Objective, Assessment, and Plan sections |
The soapNotes parameter should contain a complete clinical note in text format with the following sections:
Note: The SOAP notes should be provided as a single string with clear section headers (SUBJECTIVE, OBJECTIVE, ASSESSMENT, PLAN) and well-structured content for optimal AI analysis.
POST https://api.riskscoreai.com/api/v1/encounters/calculate-risk-score?apiKey=org_abc123...
Content-Type: application/json
{
"physicianId": "6890742f1039c6d567a787ec",
"encounterDate": "2025-08-25T14:30:00Z",
"soapNotes": "SUBJECTIVE:\nChief Complaint: Severe headache and blurred vision\n\nHistory of Present Illness: \nPatient reports the onset of severe headache and blurred vision that started 3 days ago after prolonged screen exposure. The headache is described as throbbing, primarily frontal and temporal, with intensity of 8/10. Associated symptoms include photophobia and mild nausea. No fever, neck stiffness, or neurological deficits noted.\n\nPast Medical History: \n- Hypertension (diagnosed 2018, well-controlled on ACE inhibitors)\n- Migraine (episodic, usually triggered by stress and lack of sleep)\n- No history of head trauma or stroke\n\nCurrent Medications: \n- Lisinopril 10mg daily\n- Ibuprofen PRN for headaches\n\nAllergies: Penicillin (rash)\n\nSocial History: Works as software developer, spends 8-10 hours daily on computer\n\nOBJECTIVE:\nVital Signs:\n- Blood Pressure: 150/95 mmHg\n- Heart Rate: 88 bpm\n- Respiratory Rate: 16 breaths/min \n- Temperature: 98.6°F (37°C)\n- Oxygen Saturation: 98% on room air\n- BMI: 24.5\n\nPhysical Examination:\nGeneral: Patient appears fatigued but alert and oriented x3. No acute distress.\nHEENT: Pupils equal, round, reactive to light. No papilledema on fundoscopic exam. No neck stiffness or lymphadenopathy.\nCardiovascular: Regular rate and rhythm, no murmurs, gallops, or rubs\nPulmonary: Clear to auscultation bilaterally\nNeurological: Cranial nerves II-XII intact. Motor strength 5/5 in all extremities. Deep tendon reflexes 2+ and symmetric. No focal neurological deficits.\n\nDiagnostic Results: \n- CT scan pending\n- Basic metabolic panel: Within normal limits\n- Complete blood count: WBC 7.2, Hgb 14.5, Plt 250\n\nASSESSMENT:\nPrimary Diagnosis: Migraine exacerbation, likely triggered by prolonged screen exposure and elevated blood pressure\n\nDifferential Diagnosis:\n1. Tension headache - possible but less likely given throbbing nature and photophobia\n2. Cluster headache - timing and characteristics not consistent \n3. Hypertensive crisis - blood pressure elevated but not in crisis range\n4. Secondary headache due to intracranial pathology - low suspicion given normal neurological exam\n\nClinical Reasoning:\nPatient's presentation is most consistent with migraine exacerbation. The combination of throbbing headache, photophobia, and history of migraines supports this diagnosis. Elevated blood pressure may be contributing factor and requires monitoring. Normal neurological examination makes secondary causes less likely, but CT scan ordered to rule out structural abnormalities given severity of symptoms.\n\nPLAN:\nTreatment Plan:\n1. Prescribed sumatriptan 50mg, may repeat once in 2 hours if needed\n2. Encourage adequate hydration (8-10 glasses water daily)\n3. Rest in dark, quiet environment\n4. Apply cold compress to forehead\n5. Blood pressure management - consider medication adjustment if remains elevated\n\nPatient Instructions:\n- Take sumatriptan at onset of headache symptoms\n- Avoid bright screens and reduce computer usage\n- Implement 20-20-20 rule (every 20 minutes, look at something 20 feet away for 20 seconds)\n- Monitor blood pressure daily\n- Return to ED if headache worsens, develops fever, neck stiffness, or neurological symptoms\n\nFollow-up Plan:\n- Follow-up appointment with primary care physician in 1 week\n- Ophthalmology referral if vision problems persist\n- Consider neurology consultation if migraines become more frequent\n\nSafety Requirements: Patient advised not to drive until symptoms improve and vision clears completely."
}
{
"message": "Score calculated successfully",
"data": {
"encounterId": "68ac44421dbcd43d30b5c15a",
"scoring": {
"subjective_score": {
"chief_complaint_score": 5,
"history_of_present_illness_score": 10,
"past_medical_history_score": 5,
"medications_and_allergies_score": 5,
"total_score": 25
},
"objective_score": {
"vital_signs_score": 5,
"physical_examination_score": 10,
"diagnostic_results_score": 5,
"measurable_data_quality_score": 5,
"total_score": 25
},
"assessment_score": {
"primary_diagnosis_score": 10,
"differential_diagnosis_score": 5,
"clinical_reasoning_score": 10,
"total_score": 25
},
"plan_score": {
"treatment_plan_score": 10,
"patient_instructions_score": 5,
"follow_up_plan_score": 5,
"referral_score": 0,
"total_score": 20
},
"critical_elements": {
"total_score": 0
}
},
"totalScore": 95,
"riskCategory": "VERY_LOW_RISK"
}
}Add a new physician to an insurance partner organization.
| Parameter | Type | Required | Description |
|---|---|---|---|
| partnerId | string | Required | Selected insurance partner ID |
| string | Required | Physician's email address | |
| firstName | string | Required | Physician's first name |
| lastName | string | Required | Physician's last name |
| company | string | Required | Your Scribe Company Name |
| speciality | string | Required | Physician's specialty (e.g., Cardiology) |
| country | string | Required | Country of the physician (ISO country name or code) |
curl -X POST "https://api.riskscoreai.com/api/v1/insurance-partner-user" \
-H "x-api-key: YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"firstName": "John",
"lastName": "Doe",
"email": "john.doe@clinic.com",
"company": "Your Scribe Company Name",
"partnerId": "PARTNER_ID",
"speciality": "Cardiology",
"country": "USA"
}'{
"message": "User added successfully",
"data": {
"_id": "507f1f77bcf86cd799439014",
"partnerId": "507f1f77bcf86cd799439013",
"email": "dr.smith@hospital.com",
"firstName": "John",
"lastName": "Smith",
"isActive": true,
"createdAt": "2024-01-15T10:30:00Z",
"updatedAt": "2024-01-15T10:30:00Z"
}
}Retrieve a list of all insurance companies/partners in the system.
| Header | Type | Required | Description |
|---|---|---|---|
| x-api-key | string | Required | Your organization API key for authentication |
curl --location 'https://api.riskscoreai.com/api/v1/public/insurance-partners' \
--header 'x-api-key: YOUR_API_KEY_HERE' \
--header 'Accept: application/json'{
"partners": [
{
"id": "688ca2ae91f138cddf323b60",
"companyName": "Estes Clark Trading",
"logoUrl": "https://res.cloudinary.com/dyfd8fgyy/image/upload/v1749644221/floush7ykmgzv0xsarmu.png"
},
{
"id": "68906851c7ce08af4e4e034d",
"companyName": "Test hereeeeegergerg",
"logoUrl": "https://res.cloudinary.com/dyfd8fgyy/image/upload/v1749644221/floush7ykmgzv0xsarmu.png"
},
{
"id": "6890a58edb48cd2bce673dd3",
"companyName": "Sanford and Lopez LLC",
"logoUrl": "https://www.xirofab.org"
}
],
"total": 3
}| Field | Type | Description |
|---|---|---|
| partners | array | List of partners with id, companyName, logoUrl |
| total | number | Total number of partners returned |
| Status Code | Error Type | Description |
|---|---|---|
| 400 | Bad Request | Invalid request parameters or missing required fields |
| 401 | Unauthorized | Invalid or missing API key |
| 403 | Forbidden | API key is valid but organization is inactive |
| 404 | Not Found | Resource not found (encounter, physician, etc.) |
| 409 | Conflict | Resource already exists (e.g., physician with same email) |
| 422 | Unprocessable Entity | Invalid data format or validation errors |
| 429 | Too Many Requests | Rate limit exceeded |
| 500 | Internal Server Error | Server error occurred |
{
"statusCode": 401,
"message": "API key is required",
"error": "Unauthorized"
}To ensure fair usage and system stability, API requests are rate-limited per organization:
X-RateLimit-Limit: 1000
X-RateLimit-Remaining: 999
X-RateLimit-Reset: 1642233600Note: When rate limit is exceeded, the API returns a 429 status code with a retry-after header indicating when you can make requests again.
For technical support, API key management, or general inquiries:
Important: Always include your organization email in the subject in support requests for faster resolution.