DYAGNOSYS Platform API 2.0.0

Getting started
Explore our API endpoints and use the examples to integrate quickly.
Authentication
Send a Bearer token for protected routes.
Rate limits
Requests are rate-limited to keep the platform stable.
Errors
Error responses include an HTTP status and a stable error code.
Webhooks
Use webhooks to receive events reliably with retries.
GET/clinical/patients
List clinical patients
clinical

Parameters

Query
limit
Number of items per page
integer
offset
Number of items to skip
integer
riskLevel
Filter by risk level
string
status
Filter by status
string
department
Filter by department
string
search
Search by name or ID
string
sortBy
Sort field
string
sortOrder
Sort order
string

Examples

curl
curl -X GET "/api/clinical/patients" \
  -H "Accept: application/json" \
  -H "Authorization: Bearer <token>"
Response body (JSON)
json
{
  "$ref": "#/components/schemas/PaginatedPatients"
}

Responses

200Patients retrieved
401
403
500
GET/clinical/patients/{id}
Get patient details
clinical

Parameters

Path
id *
string

Examples

curl
curl -X GET "/api/clinical/patients/{id}" \
  -H "Accept: application/json" \
  -H "Authorization: Bearer <token>"
Response body (JSON)
json
{
  "$ref": "#/components/schemas/PatientDetail"
}

Responses

200Patient details
401
403
404
500
PUT/clinical/patients/{id}
Update patient
clinical

Parameters

Path
id *
string

Examples

curl
curl -X PUT "/api/clinical/patients/{id}" \
  -H "Accept: application/json" \
  -H "Content-Type: application/json" \
  -H "Authorization: Bearer <token>" \
  --data '{"$ref":"#/components/schemas/UpdatePatientRequest"}'
Request body (JSON)
json
{
  "$ref": "#/components/schemas/UpdatePatientRequest"
}
Response body (JSON)
json
{
  "$ref": "#/components/schemas/PatientDetail"
}

Responses

200Patient updated
400
401
403
404
500
GET/clinical/patients/{id}/history
Get patient history
clinical

Parameters

Path
id *
string
Query
type
Filter by history type
string
limit
Number of items to return
integer

Examples

curl
curl -X GET "/api/clinical/patients/{id}/history" \
  -H "Accept: application/json" \
  -H "Authorization: Bearer <token>"
Response body (JSON)
json
{
  "history": [
    {
      "$ref": "#/components/schemas/PatientHistoryEntry"
    }
  ],
  "metadata": {
    "$ref": "#/components/schemas/PatientHistoryMetadata"
  }
}

Responses

200Patient history
401
403
500
GET/clinical/patients/{id}/notes
Get patient notes
clinical

Parameters

Path
id *
string
Query
limit
Number of notes to return
integer

Examples

curl
curl -X GET "/api/clinical/patients/{id}/notes" \
  -H "Accept: application/json" \
  -H "Authorization: Bearer <token>"
Response body (JSON)
json
{
  "notes": [
    {
      "$ref": "#/components/schemas/ClinicalNote"
    }
  ]
}

Responses

200Patient notes
401
403
500
POST/clinical/patients/{id}/notes
Create patient note
clinical

Parameters

Path
id *
string

Examples

curl
curl -X POST "/api/clinical/patients/{id}/notes" \
  -H "Accept: application/json" \
  -H "Content-Type: application/json" \
  -H "Authorization: Bearer <token>" \
  --data '{"$ref":"#/components/schemas/CreateClinicalNoteRequest"}'
Request body (JSON)
json
{
  "$ref": "#/components/schemas/CreateClinicalNoteRequest"
}
Response body (JSON)
json
{
  "$ref": "#/components/schemas/ClinicalNote"
}

Responses

201Note created
400
401
403
500
GET/clinical/patients/{id}/risk-history
Get risk history
clinical

Parameters

Path
id *
string
Query
dateRange
Date range in days
string
granularity
Time granularity
string

Examples

curl
curl -X GET "/api/clinical/patients/{id}/risk-history" \
  -H "Accept: application/json" \
  -H "Authorization: Bearer <token>"
Response body (JSON)
json
{
  "data": [
    {
      "$ref": "#/components/schemas/RiskHistoryPoint"
    }
  ],
  "currentRisk": {
    "$ref": "#/components/schemas/RiskAssessment"
  }
}

Responses

200Risk history
401
403
500
GET/interventions
List interventions
interventions

Parameters

Query
limit
Number of items per page
integer
offset
Number of items to skip
integer
status
Filter by status
string
type
Filter by intervention type
string
search
Search by title or description
string
sortBy
Sort field
string
sortOrder
Sort order
string

Examples

curl
curl -X GET "/api/interventions" \
  -H "Accept: application/json" \
  -H "Authorization: Bearer <token>"
Response body (JSON)
json
{
  "$ref": "#/components/schemas/PaginatedInterventions"
}

Responses

200Interventions retrieved
401
500
POST/interventions
Create intervention
interventions

Parameters

No parameters.

Examples

curl
curl -X POST "/api/interventions" \
  -H "Accept: application/json" \
  -H "Content-Type: application/json" \
  -H "Authorization: Bearer <token>" \
  --data '{"$ref":"#/components/schemas/CreateInterventionRequest"}'
Request body (JSON)
json
{
  "$ref": "#/components/schemas/CreateInterventionRequest"
}
Response body (JSON)
json
{
  "$ref": "#/components/schemas/Intervention"
}

Responses

201Intervention created
400
401
500
DELETE/interventions/{id}
Delete intervention
interventions

Parameters

Path
id *
string

Examples

curl
curl -X DELETE "/api/interventions/{id}" \
  -H "Accept: application/json" \
  -H "Authorization: Bearer <token>"

Responses

204Intervention deleted
401
404
500
GET/interventions/{id}
Get intervention details
interventions

Parameters

Path
id *
string

Examples

curl
curl -X GET "/api/interventions/{id}" \
  -H "Accept: application/json" \
  -H "Authorization: Bearer <token>"
Response body (JSON)
json
{
  "$ref": "#/components/schemas/Intervention"
}

Responses

200Intervention details
401
404
500
PUT/interventions/{id}
Update intervention
interventions

Parameters

Path
id *
string

Examples

curl
curl -X PUT "/api/interventions/{id}" \
  -H "Accept: application/json" \
  -H "Content-Type: application/json" \
  -H "Authorization: Bearer <token>" \
  --data '{"$ref":"#/components/schemas/UpdateInterventionRequest"}'
Request body (JSON)
json
{
  "$ref": "#/components/schemas/UpdateInterventionRequest"
}
Response body (JSON)
json
{
  "$ref": "#/components/schemas/Intervention"
}

Responses

200Intervention updated
400
401
404
500
POST/interventions/{id}/assign
Assign intervention
interventions

Parameters

Path
id *
string

Examples

curl
curl -X POST "/api/interventions/{id}/assign" \
  -H "Accept: application/json" \
  -H "Content-Type: application/json" \
  -H "Authorization: Bearer <token>" \
  --data '{"userId":"string","counselorId":"string","notes":"string","scheduledAt":"2026-05-10T09:09:53.981Z"}'
Request body (JSON)
json
{
  "userId": "string",
  "counselorId": "string",
  "notes": "string",
  "scheduledAt": "2026-05-10T09:09:53.981Z"
}
Response body (JSON)
json
{
  "$ref": "#/components/schemas/InterventionAssignment"
}

Responses

200Intervention assigned
400
401
404
500
GET/interventions/{id}/progress
Get intervention progress
interventions

Parameters

Path
id *
string
Query
userId *
User ID for progress tracking
string

Examples

curl
curl -X GET "/api/interventions/{id}/progress" \
  -H "Accept: application/json" \
  -H "Authorization: Bearer <token>"
Response body (JSON)
json
{
  "$ref": "#/components/schemas/InterventionProgress"
}

Responses

200Progress data
401
404
500
GET/interventions/recommendations
Get AI recommendations
interventions

Parameters

Query
riskLevel
Filter by risk level
string
category
Filter by category
string
limit
Number of recommendations
integer

Examples

curl
curl -X GET "/api/interventions/recommendations" \
  -H "Accept: application/json" \
  -H "Authorization: Bearer <token>"
Response body (JSON)
json
{
  "recommendations": [
    {
      "$ref": "#/components/schemas/Recommendation"
    }
  ],
  "metadata": {
    "$ref": "#/components/schemas/RecommendationMetadata"
  }
}

Responses

200Recommendations retrieved
401
500
GET/recommendations
Get recommendations
recommendations

Parameters

Query
limit
Number of recommendations
integer
offset
Number of recommendations to skip
integer
category
Filter by category
string
riskLevel
Filter by target risk level
string
userId
Get recommendations for specific user
string

Examples

curl
curl -X GET "/api/recommendations" \
  -H "Accept: application/json" \
  -H "Authorization: Bearer <token>"
Response body (JSON)
json
{
  "$ref": "#/components/schemas/PaginatedRecommendations"
}

Responses

200Recommendations retrieved
401
500
GET/reports/departments
Get department reports
reports

Parameters

Query
dateRange
Date range in days
string
departments
Specific departments to include (all if not specified)
array
granularity
Time granularity
string

Examples

curl
curl -X GET "/api/reports/departments" \
  -H "Accept: application/json" \
  -H "Authorization: Bearer <token>"
Response body (JSON)
json
{
  "departments": [
    {
      "$ref": "#/components/schemas/DepartmentReport"
    }
  ],
  "summary": {
    "$ref": "#/components/schemas/OrganizationalReport"
  }
}

Responses

200Department reports retrieved
401
403
500
POST/reports/generate
Generate a new report
reports

Parameters

No parameters.

Examples

curl
curl -X POST "/api/reports/generate" \
  -H "Accept: application/json" \
  -H "Content-Type: application/json" \
  -H "Authorization: Bearer <token>" \
  --data '{"type":"organizational","dateRange":"90","startDate":"string","endDate":"string","filters":{"department":"string","riskLevel":"low","status":"string"}}'
Request body (JSON)
json
{
  "type": "organizational",
  "dateRange": "90",
  "startDate": "string",
  "endDate": "string",
  "filters": {
    "department": "string",
    "riskLevel": "low",
    "status": "string"
  }
}
Response body (JSON)
json
{
  "$ref": "#/components/schemas/Report"
}

Responses

200Report generated successfully
400
401
403
500
GET/reports/organizational
Get organizational report
reports

Parameters

Query
dateRange
Date range in days
string
granularity
Time granularity for data points
string

Examples

curl
curl -X GET "/api/reports/organizational" \
  -H "Accept: application/json" \
  -H "Authorization: Bearer <token>"
Response body (JSON)
json
{
  "$ref": "#/components/schemas/OrganizationalReport"
}

Responses

200Organizational report retrieved
401
403
500
GET/reports/trends
Get trend analysis
reports

Parameters

Query
dateRange
Date range in days
string
granularity
Time granularity
string
metrics
Specific metrics to include
array

Examples

curl
curl -X GET "/api/reports/trends" \
  -H "Accept: application/json" \
  -H "Authorization: Bearer <token>"
Response body (JSON)
json
{
  "data": [
    {
      "$ref": "#/components/schemas/TrendDataPoint"
    }
  ],
  "metadata": {
    "$ref": "#/components/schemas/TrendMetadata"
  }
}

Responses

200Trend data retrieved
401
500
GET/risk/alerts
Get risk alerts
risk

Parameters

Query
limit
Number of alerts
integer
offset
Number of alerts to skip
integer
severity
Filter by severity
string
status
Filter by status
string
department
Filter by department
string

Examples

curl
curl -X GET "/api/risk/alerts" \
  -H "Accept: application/json" \
  -H "Authorization: Bearer <token>"
Response body (JSON)
json
{
  "alerts": [
    {
      "$ref": "#/components/schemas/RiskAlert"
    }
  ],
  "metadata": {
    "total": 0,
    "bySeverity": {
      "medium": 0,
      "high": 0,
      "critical": 0
    }
  }
}

Responses

200Risk alerts retrieved
401
403
500
GET/risk/distribution
Get risk distribution
risk

Parameters

Query
dateRange
Date range for distribution analysis
string
department
Filter by department
string

Examples

curl
curl -X GET "/api/risk/distribution" \
  -H "Accept: application/json" \
  -H "Authorization: Bearer <token>"
Response body (JSON)
json
{
  "distribution": {
    "low": {
      "$ref": "#/components/schemas/RiskLevelStats"
    },
    "medium": {
      "$ref": "#/components/schemas/RiskLevelStats"
    },
    "high": {
      "$ref": "#/components/schemas/RiskLevelStats"
    },
    "critical": {
      "$ref": "#/components/schemas/RiskLevelStats"
    }
  },
  "summary": {
    "totalIndividuals": 0,
    "averageRiskScore": 0,
    "trend": "improving"
  }
}

Responses

200Risk distribution
401
403
500
GET/risk/individuals
Get individuals at risk
risk

Parameters

Query
limit
Number of items per page
integer
offset
Number of items to skip
integer
riskLevel
Filter by risk level (excludes low)
string
department
Filter by department
string
dateRange
Risk assessment window in days
string

Examples

curl
curl -X GET "/api/risk/individuals" \
  -H "Accept: application/json" \
  -H "Authorization: Bearer <token>"
Response body (JSON)
json
{
  "$ref": "#/components/schemas/PaginatedRiskIndividuals"
}

Responses

200Risk individuals retrieved
401
403
500
GET/risk/trends
Get risk trends
risk

Parameters

Query
dateRange
Date range for trend analysis
string
granularity
Time granularity
string
department
Filter by department
string

Examples

curl
curl -X GET "/api/risk/trends" \
  -H "Accept: application/json" \
  -H "Authorization: Bearer <token>"
Response body (JSON)
json
{
  "trends": [
    {
      "$ref": "#/components/schemas/RiskTrendPoint"
    }
  ],
  "metadata": {
    "$ref": "#/components/schemas/TrendMetadata"
  }
}

Responses

200Risk trends
401
500