# Retrieve what uses a flow

`GET https://api.morevoice.ai/v1/flows/{id}/usage`

Returns the `FlowUsage` object. Answers `404` with the code `resource_missing` when nothing has this ID in this organisation and mode.

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

Operation ID: `flows_retrieve_usage`.

## Parameters

### Path parameters

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

### 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 `FlowUsage`.

| Field | Type | Description |
| --- | --- | --- |
| `object` | `"flow_usage"` | — |
| `flow_id` | `string` | A flow ID (prefix `flow_`). |
| `assistants` | `object[]` | — |
| `copilot_profiles` | `object[]` | — |

Example:

```json
{
  "assistants": [
    {
      "id": "asst_3cYbE6uYvGkH8w4ZK1rTqd",
      "name": "Receptionist"
    }
  ],
  "copilot_profiles": [],
  "flow_id": "flow_7Kp1Ns4Vy6Ab9Dg2Hj5Lm8",
  "object": "flow_usage"
}
```

### 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 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 flowUsage = await mv.flows.retrieveUsage("flow_7Hk2Lm9Qp");
console.log(flowUsage);
```

**Python**

```python
from morevoice import MoreVoice

client = MoreVoice()  # MOREVOICE_API_KEY from the environment

flow_usage = client.flows.retrieve_usage("flow_7Hk2Lm9Qp")
print(flow_usage)
```

**cURL**

```sh
curl https://api.morevoice.ai/v1/flows/flow_7Hk2Lm9Qp/usage \
  -H "Authorization: Bearer $MOREVOICE_API_KEY"
```
