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

# Workflows

> Read the routing workflows configured for a workspace

A workflow decides how requests are routed inside a workspace. Workflows are read-only over
the API. Reading needs `models:read`.

<Note>
  There is no `workflows:read` scope. Workflow access is granted by `models:read`.
</Note>

<Warning>
  Workflows are authored in the console. `POST` and `DELETE` on these endpoints return `403`.
</Warning>

## List workflows

```
GET /api/v1/workflows?workspace_id=ws_1
```

<ParamField query="workspace_id" type="string">
  Limit results to one workspace.
</ParamField>

<ParamField query="name" type="string">
  Match workflows whose name contains this value.
</ParamField>

<RequestExample>
  ```bash cURL theme={null}
  curl 'https://app.nemu.cc/api/v1/workflows?workspace_id=ws_1' \
    -H 'Authorization: Bearer <access_token>'
  ```

  ```ts SDK theme={null}
  const workflows = await workspace.workflows.list();
  ```
</RequestExample>

<ResponseExample>
  ```json 200 theme={null}
  {
    "data": [
      {
        "id": "wfl_1",
        "workspace_id": "ws_1",
        "name": "default",
        "description": null,
        "enabled": true,
        "is_default": true,
        "created_at": "2026-01-04T10:22:00.000Z",
        "updated_at": "2026-01-04T10:22:00.000Z"
      }
    ],
    "total": 1
  }
  ```
</ResponseExample>

The list omits the `workflow` graph. Fetch a single workflow to get it.

## Get a workflow

```
GET /api/v1/workflows/{id}?workspace_id=ws_1
```

<RequestExample>
  ```ts SDK theme={null}
  const workflow = await workspace.workflows.get(id);
  ```
</RequestExample>

<ResponseExample>
  ```json 200 theme={null}
  {
    "data": {
      "id": "wfl_1",
      "workspace_id": "ws_1",
      "name": "default",
      "description": null,
      "enabled": true,
      "is_default": true,
      "workflow": {},
      "created_at": "2026-01-04T10:22:00.000Z",
      "updated_at": "2026-01-04T10:22:00.000Z"
    }
  }
  ```
</ResponseExample>

<ResponseField name="data.workflow" type="object">
  The workflow graph. Returned by this endpoint only.
</ResponseField>
