# Retrieve a call's flow path

`GET https://api.morevoice.ai/v1/calls/{id}/flow_path`

The flow nodes the call went through, in order, with the edge taken into each. Calls without a flow answer `flow_id: null` and no steps.

Authenticate with a secret API key: `Authorization: Bearer $MOREVOICE_API_KEY`.

Operation ID: `calls_retrieve_flow_path`.

## Parameters

### Path parameters

| Name | Type | Required | Description |
| --- | --- | --- | --- |
| `id` | `string` | yes | A call ID (`call_…`). |

### Headers

| Name | Type | Required | Description |
| --- | --- | --- | --- |
| `MoreVoice-Version` | `string` | no | The API version to use for this request. Defaults to the version the API key is pinned to. |

## Responses

### 200 OK

OK Returns `FlowPath`.

| Field | Type | Description |
| --- | --- | --- |
| `object` | `"flow_path"` | — |
| `call_id` | `string` | A call ID (prefix `call_`). |
| `flow_id` | `string \| null` | null when no flow ran on the call. |
| `flow_version` | `integer \| null` | — |
| `steps` | `FlowPathStep[]` | — |
| `end` | `string \| null` | How the flow ended (an end node, a transfer, a hang-up). |
| `transferred` | `object \| null` | — |
| `transferred.mode` | `string` | — |
| `transferred.to` | `string \| null` | — |
| `live` | `boolean` | The call is still running: more steps may follow. |

Example:

```json
{
  "call_id": "call_8tRPaZp5hLMbrGqdJ9AmNa",
  "end": "end_ok",
  "flow_id": "flow_4Gk2LmN9pQ4rS6tV8wX0yZ",
  "flow_version": 3,
  "live": false,
  "object": "flow_path",
  "steps": [
    {
      "at_ms": 0,
      "edge_id": null,
      "input": null,
      "node_id": "start",
      "turns": 1,
      "via": null
    },
    {
      "at_ms": 6400,
      "edge_id": "e2",
      "input": null,
      "node_id": "order_status",
      "turns": 2,
      "via": "llm"
    }
  ],
  "transferred": null
}
```

### 400 Bad Request

The request is invalid: a parameter is missing, malformed or unknown, or the version header is unknown. Returns `ErrorEnvelope`.

### 401 Unauthorized

No valid API key was sent. Returns `ErrorEnvelope`.

### 403 Forbidden

The key may not do this (a missing scope, a plan limit, or a compliance block). Returns `ErrorEnvelope`.

### 404 Not Found

No object with this ID (in the path or the body) exists in this organisation and mode. Returns `ErrorEnvelope`.

### 429 Too Many Requests

Too many requests, or no call capacity right now. Retry after the Retry-After delay. Returns `ErrorEnvelope`.

### 500 Internal Server Error

Something went wrong on MoreVoice's side. Retry with the same Idempotency-Key. Returns `ErrorEnvelope`.

## Code samples

**TypeScript**

```ts
import MoreVoice from "@morevoice/sdk";

const mv = new MoreVoice(); // MOREVOICE_API_KEY from the environment

const flowPath = await mv.calls.retrieveFlowPath("call_7Hk2Lm9Qp");
console.log(flowPath);
```

**Python**

```python
from morevoice import MoreVoice

client = MoreVoice()  # MOREVOICE_API_KEY from the environment

flow_path = client.calls.retrieve_flow_path("call_7Hk2Lm9Qp")
print(flow_path)
```

**cURL**

```sh
curl https://api.morevoice.ai/v1/calls/call_7Hk2Lm9Qp/flow_path \
  -H "Authorization: Bearer $MOREVOICE_API_KEY"
```
