# List flows

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

`GET /api/v1/flows`

The workspace's flows, newest first, with their status and trigger type.

Lists the flows of the key's workspace, drafts and paused flows included, newest first. Filter with `status`. Each item is a summary: no definition and no settings.

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

## Query parameters

| Name | Type | Required | Description |
|---|---|---|---|
| `status` | string ("draft" \| "active" \| "paused") | no | Only flows with this status: `draft`, `active` or `paused`. |
| `limit` | integer | no | Items per page, from 1 to 100. Default 20. |
| `cursor` | string | no | The `nextCursor` of the previous page, unchanged. |

## Response

The answer is `{ data, nextCursor }`; each item of `data` has 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. |
| `data` (envelope) | array | The items of this page. |
| `nextCursor` (envelope) | string \| null | Pass it as `cursor` for the next page; `null` when the list has ended. |

### 200

```json
{
  "data": [
    {
      "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"
    }
  ],
  "nextCursor": "AZp8x3VqLk2mT9wQe7RsYb4nHc6Jd1Fg"
}
```

## 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 |
|---|---|---|---|
| 400 | `INVALID_STATUS` | `status` is not a flow status. | `The status filter must be one of: draft, active, paused.` |
| 400 | `INVALID_LIMIT` | `limit` is not a whole number from 1 to 100. | `The limit must be a whole number from 1 to 100.` |
| 400 | `INVALID_CURSOR` | `cursor` is not a `nextCursor` from this list, or is no longer valid: start the list again from the first page. | `The cursor is not valid. Pass the nextCursor value from a previous response unchanged.` |
| 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?status=active&limit=50" \
  -H "X-Api-Key: exo_your_key"

# Next page: add &cursor=<nextCursor from the previous answer>
```

### JavaScript

```javascript
// Every page, following nextCursor until it is null.
const items = [];
let cursor = null;
do {
  const params = new URLSearchParams({ status: "active", limit: "50" });
  if (cursor) params.set("cursor", cursor);
  const res = await fetch(`https://exomations.com/api/v1/flows?${params}`, {
    headers: { "X-Api-Key": process.env.EXOMATIONS_KEY }, // exo_...
  });
  const page = await res.json();
  if (!res.ok) throw new Error(`${page.code}: ${page.message}`);
  items.push(...page.data);
  cursor = page.nextCursor;
} while (cursor);
console.log(items.length);
```

### Python

```python
import os, requests

items, cursor = [], None
while True:
    params = {"status": "active", "limit": 50}
    if cursor:
        params["cursor"] = cursor
    res = requests.get(
        "https://exomations.com/api/v1/flows",
        headers={"X-Api-Key": os.environ["EXOMATIONS_KEY"]},  # exo_...
        params=params,
        timeout=15,
    )
    page = res.json()
    if res.status_code != 200:
        raise RuntimeError(f"{page['code']}: {page['message']}")
    items.extend(page["data"])
    cursor = page["nextCursor"]
    if not cursor:
        break
print(len(items))
```
