> ## 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/:workflowId — Retrieve a Workflow

> GET /api/workflows/:workflowId — Fetch a single workflow by ID, returning its full graph definition with all nodes, edges, and configuration.

When you need the complete definition of a specific workflow — for inspection, duplication, or pre-run validation — you can fetch it directly by its ID. The response includes the workflow's name, the full graph object with every node and edge, and the creation timestamp. This endpoint is particularly useful when you want to confirm the exact configuration of a workflow before running it or making modifications.

## Endpoint

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

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

## Path Parameters

<ParamField path="workflowId" type="string" required>
  The unique ID of the workflow you want to retrieve. You receive this value in the response when you create a workflow, or you can look it up via the [List Workflows](/api-reference/workflows/list) endpoint.
</ParamField>

## Example Request

Replace `:workflowId` with the actual ID of your workflow:

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

## Response

A successful request returns HTTP `200 OK` with a JSON object representing the requested workflow. If no workflow with the given ID exists on your account, the API returns `404 Not Found`.

<ResponseField name="id" type="string">
  The unique identifier for this workflow.
</ResponseField>

<ResponseField name="name" type="string">
  The human-readable display name of the workflow.
</ResponseField>

<ResponseField name="graph" type="object">
  The complete graph definition, including the full `nodes` array (with each node's `id`, `type`, and `data`) and the full `edges` array (with each edge's `source` and `target`).
</ResponseField>

<ResponseField name="createdAt" type="string">
  An ISO 8601 timestamp indicating 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"
}
```
