DocsAPI ReferenceWorkflows API

Workflows API

Create and manage automated workflows.

List Workflows

bash
GET /v1/workflows

Response:
{
  "workflows": [
    {
      "id": "wf_xxxxx",
      "name": "CustomerOnboarding",
      "status": "active",
      "lastRun": "2024-01-15T10:30:00Z"
    }
  ]
}

Create Workflow

bash
POST /v1/workflows

Body:
{
  "name": "DataPipeline",
  "trigger": { "type": "schedule", "cron": "0 9 * * *" },
  "steps": [
    { "agent": "DataCollector", "action": "fetch" },
    { "agent": "DataAnalyzer", "action": "process" }
  ]
}

Trigger Workflow

bash
POST /v1/workflows/{workflow_id}/trigger

Body:
{
  "input": { "source": "manual" }
}