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

# POST /api/agent-workflows/{id}/execute

> Execute a workflow

```text theme={"system"}

POST /api/agent-workflows/{id}/execute

```

### Body

````json theme={"system"}
{ "inputValues": { "patient_id": "pat_abc" }, "triggerType": "api", "mode": "async"
}

``` `mode`: `async` (queued via managed job queue) or `sync` (canvas test only). `triggerType`: `canvas_test` / `api` / `scheduled` / `webhook`.

### Response

```json
{ "executionId": "exec_abc" }

``` For canvas test mode (`mode: "sync"`), the response includes the full execution trace.
````
