# Get a flow

> Documentation index: https://exomations.com/llms.txt

`GET /api/v1/flows/{flowId}`

One flow with its description, project, trigger address and steps.

Returns one flow of the key's workspace. `steps` names each step's ID, type and label, never its settings. A missing flow, a flow of another workspace and a withheld flow all answer the same `404`.

## Authorization

The REST API is being rolled out and is not yet available to every workspace. Send an API key with the `read` permission in the `X-Api-Key` header. REST API access must be switched on for the workspace; see the REST API overview.

## Path parameters

| Name | Type | Required | Description |
|---|---|---|---|
| `flowId` | string | yes | The flow's ID. |

## Response

The answer is one object with these fields:

| Name | Type | Description |
|---|---|---|
| `id` | string | The flow's ID. |
| `name` | string | The flow's name. |
| `status` | string | `draft`, `active` or `paused`. |
| `mode` | string | `simple` or `orchestration`. |
| `triggerType` | string \| null | How the flow starts, for example `webhook` (the API trigger), `scheduled`, `form` or `manual`. |
| `nodeCount` | integer | The number of steps (notes on the canvas are not counted). |
| `updatedAt` | string (date-time) \| null | When the flow was last changed. |
| `description` | string \| null | The flow's description. |
| `projectId` | string | The project the flow belongs to. |
| `triggerUrl` | string \| null | The Trigger a flow address of this flow when its trigger type is `webhook` or not set, on the platform's main address; otherwise `null`. |
| `steps` | array of { id, type, label } | Each step's `id`, `type` and `label` (`label` can be `null`). No settings. |

### 200

```json
{
  "id": "7a17617d-3c4e-4f0a-9b1e-2d5c8e0f4a61",
  "name": "Overdue invoice reminders",
  "status": "active",
  "mode": "orchestration",
  "triggerType": "webhook",
  "nodeCount": 2,
  "updatedAt": "2026-11-15T14:02:51.000Z",
  "description": "Emails a reminder for every invoice that is more than 30 days overdue.",
  "projectId": "c3e1a9d4-8b2f-4f6e-a0c7-5d9b2e1f7a33",
  "triggerUrl": "https://exomations.com/api/trigger/7a17617d-3c4e-4f0a-9b1e-2d5c8e0f4a61",
  "steps": [
    {
      "id": "trigger_1",
      "type": "trigger",
      "label": "Webhook"
    },
    {
      "id": "http_1",
      "type": "http_request",
      "label": "Post order"
    }
  ]
}
```

## Errors

Every error is JSON with three fields: `error` (a short title), `code` (a fixed name your code can rely on) and `message` (a sentence for people). An unknown path under `/api/v1` answers `404` with `NOT_FOUND`.

| Status | Code | When | Message |
|---|---|---|---|
| 404 | `NOT_FOUND` | No such flow or run in the key's workspace (another workspace's IDs and withheld flows answer the same), or an unknown path. | `The requested resource was not found.` |
| 401 | `UNAUTHENTICATED` | The key is missing, not an Exomations API key, unknown, inactive, expired or deleted, or it was sent in the URL or an `Authorization` header. | `A valid API key is required in the X-Api-Key header.` |
| 402 | `PENDING_PAYMENT` | The workspace is awaiting its card verification (every endpoint except `GET /usage`). | `Payment required. Complete the 1 SAR card verification on the Billing page to activate your account.` |
| 403 | `FORBIDDEN` | The key does not carry `read`. | `This API key does not have the Read permission.` |
| 403 | `FORBIDDEN` | The workspace is suspended. | `This workspace is suspended.` |
| 403 | `API_NOT_ENABLED` | REST API access is off for the workspace. | `REST API access is turned off for this workspace. An admin or the owner can turn it on on the API Keys page.` |
| 405 | `METHOD_NOT_ALLOWED` | A method other than `GET` or `HEAD`. The `Allow` header lists the methods. | `This endpoint does not support this method. See the Allow header.` |
| 429 | `RATE_LIMITED` | Too many calls in a minute (calls without a valid key are limited too). | `Rate limit reached. Retry after the number of seconds in the Retry-After header.` |
| 500 | `INTERNAL` | Something failed on our side. Retry; if it happens again, contact support. | `Something went wrong on our side. Please try again.` |

## Examples

### cURL

```bash
curl https://exomations.com/api/v1/flows/YOUR_FLOW_ID \
  -H "X-Api-Key: exo_your_key"
```

### JavaScript

```javascript
const res = await fetch("https://exomations.com/api/v1/flows/YOUR_FLOW_ID", {
  headers: { "X-Api-Key": process.env.EXOMATIONS_KEY }, // exo_...
});
const body = await res.json();
if (!res.ok) throw new Error(`${body.code}: ${body.message}`);
console.log(body.name, body.status);
```

### Python

```python
import os, requests

res = requests.get(
    "https://exomations.com/api/v1/flows/YOUR_FLOW_ID",
    headers={"X-Api-Key": os.environ["EXOMATIONS_KEY"]},  # exo_...
    timeout=15,
)
body = res.json()
if res.status_code != 200:
    raise RuntimeError(f"{body['code']}: {body['message']}")
print(body["name"], body["status"])
```
