> ## Documentation Index
> Fetch the complete documentation index at: https://docs.mindblix.tech/llms.txt
> Use this file to discover all available pages before exploring further.

# Workflows API

> Create, manage, and trigger multi-agent workflows via the API.

## List Workflows

```bash theme={null}
curl https://api.mindblix.com/v1/workflows \
  -H "Authorization: Bearer YOUR_API_KEY"
```

***

## Create Workflow

```bash theme={null}
curl -X POST https://api.mindblix.com/v1/workflows \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "name": "Research Pipeline",
    "trigger": { "type": "api" },
    "steps": [
      {
        "id": "research",
        "agent_template": "research",
        "input": { "query": "{{ trigger.body.query }}" }
      },
      {
        "id": "summarize",
        "agent_template": "data",
        "depends_on": ["research"],
        "input": { "data": "{{ steps.research.output }}" }
      }
    ]
  }'
```

### Parameters

| Parameter | Type | Required | Description |
| - | - | - | - |
| `name` | string | ✅ | Workflow name |
| `trigger` | object | ✅ | How the workflow is triggered |
| `steps` | array | ✅ | Ordered list of agent steps |
| `output` | object | ⬜ | Output mapping configuration |

***

## Trigger Workflow

```bash theme={null}
curl -X POST https://api.mindblix.com/v1/workflows/{workflow_id}/trigger \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{ "query": "Latest AI trends in healthcare" }'
```

***

## Get Workflow Status

```bash theme={null}
curl https://api.mindblix.com/v1/workflows/{workflow_id}/runs/{run_id} \
  -H "Authorization: Bearer YOUR_API_KEY"
```

### Response

```json theme={null}
{
  "success": true,
  "data": {
    "run_id": "run_abc123",
    "status": "completed",
    "steps": [
      { "id": "research", "status": "completed", "duration_ms": 8200 },
      { "id": "summarize", "status": "completed", "duration_ms": 3100 }
    ],
    "output": { ... },
    "total_duration_ms": 11300
  }
}
```


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.