Skip to main content
The Workflow Service manages registered workflow graphs, while the Runtime Service exposes endpoints to trigger executions and monitor run progress. Base URL: https://api.thygon.com

Workflows

Create workflow

POST /workflows Upload a new automation workflow graph definition. Request body:
{
  "name": "support_triage",
  "description": "Categorize and route incoming support tickets",
  "definition": {
    "steps": [
      {
        "name": "classify",
        "type": "agent",
        "agentId": "support-classifier",
        "instructions": "Determine ticket category and priority."
      }
    ]
  }
}
Response (201 Created):
{
  "success": true,
  "data": {
    "id": "wf_support_triage",
    "name": "support_triage",
    "description": "Categorize and route incoming support tickets",
    "isActive": true,
    "createdAt": "2026-06-16T17:15:00.000Z"
  }
}

List workflows

GET /workflows

Get workflow details

GET /workflows/{id}

Update workflow definition

PUT /workflows/{id}

Delete workflow

DELETE /workflows/{id}

Trigger executions

Trigger workflow run

POST /workflows/{id}/trigger Queue a workflow execution asynchronously. This endpoint creates a new Run record with status PENDING and returns immediately. Request body:
{
  "variables": {
    "priorityOverride": "high"
  }
}
Response (201 Created):
{
  "success": true,
  "message": "Run queued — execution is asynchronous",
  "data": {
    "id": "run_01h3j4k5m6",
    "workflowId": "wf_support_triage",
    "status": "PENDING",
    "variables": {
      "priorityOverride": "high"
    }
  }
}

Run management

Create and queue a run directly

POST /workflows/runs Request body:
{
  "workflowId": "wf_support_triage",
  "variables": {
    "ticketId": "TCK-101"
  },
  "orgId": "org_acme_123"
}

List runs

GET /workflows/runs

Get run details

GET /workflows/runs/{id} Fetch execution details, node transition progress, and status logs for a specific run. Response (200 OK):
{
  "success": true,
  "data": {
    "id": "run_01h3j4k5m6",
    "workflowId": "wf_support_triage",
    "status": "RUNNING",
    "variables": {
      "ticketId": "TCK-101"
    },
    "createdAt": "2026-06-16T17:15:05.000Z",
    "updatedAt": "2026-06-16T17:15:12.000Z"
  }
}