Workflow API
Overview
The workflow API manages AI-powered automation across verticals.
GET /api/workflows
List available workflows for the current center.
Response:
{
"success": true,
"data": [
{
"id": "wf_001",
"name": "Weekly Progress Report",
"type": "SCHEDULED",
"status": "ACTIVE",
"vertical": "rehabilitation",
"lastRun": "2026-03-07T09:00:00Z"
}
]
}
POST /api/workflows/:workflowId/execute
Manually trigger a workflow execution.
Request:
{
"parameters": {
"dateRange": "2026-03-01/2026-03-07",
"includeInactive": false
}
}
Response:
{
"success": true,
"data": {
"executionId": "exec_123",
"status": "RUNNING",
"startedAt": "2026-03-08T09:30:00Z"
}
}
All workflow executions are recorded in the DPU audit trail. AI-generated outputs are marked as DRAFT evidence level until human review.
GET /api/workflows/:workflowId/executions
List past executions of a specific workflow.
Response:
{
"success": true,
"data": [
{
"executionId": "exec_123",
"status": "COMPLETED",
"startedAt": "2026-03-08T09:30:00Z",
"completedAt": "2026-03-08T09:31:15Z",
"dpuId": "dpu_789",
"evidenceLevel": "DRAFT"
}
]
}
The following Workflow API endpoints are planned but not yet available:
POST /api/workflows — Create custom workflow
PATCH /api/workflows/:workflowId — Update workflow configuration
DELETE /api/workflows/:workflowId — Deactivate workflow