SyncFlow API

Workflow design, local demo execution, approvals, event normalization, and audit output.

Base URL
https://lyzr-d-production.up.railway.app

The local proof-of-work does not require auth. A production deployment should add auth, tenant isolation, and stricter CORS settings before exposing workflow execution.

Execution contract

SyncFlow keeps the existing execute endpoint stable. Local mode extends the response with frontend-ready events and output, while Temporal mode keeps the original async shape and relies on WebSocket events for live state updates.

GET/api/workflows

List workflows

Returns templates first, including the Private Market Diligence Review reviewer path.

POST/api/workflows

Create workflow

Creates a blank workflow definition with nodes, edges, and a generated operator-friendly name.

POST/api/workflows/:id/execute

Run workflow

Starts local or Temporal execution depending on EXECUTION_BACKEND.

POST/api/approvals/:executionId/approve

Respond to approval

Records approve or reject, then resumes local execution or signals Temporal.

Run Example

curl -X POST "https://lyzr-d-production.up.railway.app/api/workflows/template-private-market-diligence/execute" \
  -H "Content-Type: application/json" \
  -d '{
    "input_data": {
      "input_text": "Revenue grew 42% YoY, gross retention is above 90%, and enterprise pipeline is concentrated in six accounts.",
      "source_name": "sample-memo.txt"
    }
  }'

events

Frontend-ready execution timeline in local mode.

pending_approval

Approval modal payload when the run pauses.

output

Final report data after a completed local run.

Local responses

The execute endpoint can return events, output, and pending_approval immediately.

Temporal events

Temporal mode keeps the async contract and streams state over WebSockets.

One normalizer

Both paths use the same frontend helper before updating node status or approval state.

Approval resume

Approval responses can include continuation events and final output in local mode.

Response Shapes

Local execute
{
  "execution_id": "...",
  "workflow_id": "...",
  "status": "waiting_approval",
  "execution_backend": "local",
  "events": [],
  "pending_approval": {},
  "output": null
}
Local approval resume
{
  "status": "approved",
  "execution_status": "completed",
  "execution_backend": "local",
  "events": [],
  "output": {}
}