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

# GET /api/workflows — List All Flowmatic Workflows

> GET /api/workflows — Retrieve a list of all workflows associated with your account, including their IDs, names, and graph definitions.

The list endpoint gives you a full snapshot of every workflow saved under your account. Each item in the returned array includes the workflow's unique ID, its display name, the complete graph definition, and the timestamp when it was created. This is useful for building dashboards, verifying what has been deployed, or programmatically retrieving workflow IDs before triggering a run.

## Endpoint

```
GET https://api.flowmatic.io/api/workflows
```

**Authentication:** `Authorization: Bearer <accessToken>` header required.\
**Request body:** None.

## Example Request

```bash theme={null}
curl -X GET https://api.flowmatic.io/api/workflows \
  -H "Authorization: Bearer <accessToken>"
```

## Response

A successful request returns HTTP `200 OK` with a JSON array. Each element in the array represents one workflow associated with your account. If you have no workflows yet, the array will be empty (`[]`).

<ResponseField name="id" type="string">
  The unique identifier for this workflow. Use this value as the `workflowId` path parameter when calling the get, run, or delete endpoints.
</ResponseField>

<ResponseField name="name" type="string">
  The human-readable display name assigned to the workflow when it was created.
</ResponseField>

<ResponseField name="graph" type="object">
  The complete graph definition for this workflow, including all nodes and their configuration, and all edges that connect them.
</ResponseField>

<ResponseField name="createdAt" type="string">
  An ISO 8601 timestamp recording when the workflow was originally created (e.g., `"2024-08-15T10:30:00.000Z"`).
</ResponseField>

### Example Response

```json theme={null}
[
  {
    "id": "wf_7kQmR9pL2x",
    "name": "Email 5-star raters",
    "graph": {
      "nodes": [
        { "id": "t",   "type": "TRIGGER",     "data": {} },
        { "id": "ds",  "type": "DATA_SOURCE",  "data": { "uploadId": "upload_abc123" } },
        { "id": "f",   "type": "FILTER",       "data": { "source": "{{ds.rows}}", "expr": "rating > 4" } },
        { "id": "out", "type": "OUTPUT", "data": {
            "forEach": "{{f.items}}",
            "to":      "{{item.email}}",
            "subject": "Thanks {{item.name}}",
            "body":    "Hi {{item.name}}, thanks for the 5-star review!"
        }}
      ],
      "edges": [
        { "source": "t",  "target": "ds" },
        { "source": "ds", "target": "f" },
        { "source": "f",  "target": "out" }
      ]
    },
    "createdAt": "2024-08-15T10:30:00.000Z"
  },
  {
    "id": "wf_3nBvT1cW8z",
    "name": "Reward top raters",
    "graph": {
      "nodes": [
        { "id": "t",   "type": "TRIGGER",     "data": {} },
        { "id": "ds",  "type": "DATA_SOURCE",  "data": { "uploadId": "upload_abc123" } },
        { "id": "ai",  "type": "AI", "data": {
            "prompt": "From these customers pick those who rated above 4 stars. Rows: {{ds.rows}}",
            "output": [
              { "name": "customers",   "type": "array"  },
              { "name": "messageBody", "type": "string" }
            ]
        }},
        { "id": "out", "type": "OUTPUT", "data": {
            "forEach": "{{ai.customers}}",
            "to":      "{{item.email}}",
            "subject": "Thanks {{item.name}}",
            "body":    "Hi {{item.name}}, {{ai.messageBody}}"
        }}
      ],
      "edges": [
        { "source": "t",  "target": "ds" },
        { "source": "ds", "target": "ai" },
        { "source": "ai", "target": "out" }
      ]
    },
    "createdAt": "2024-08-16T08:15:00.000Z"
  }
]
```
