# List workflows

> List the automation workflows in a workspace owned by the installer.

Source: https://docs.mycrmsim.com/docs/automations/list-workflows

```http
GET https://backend.mysmsgateway.app/api/v1/ext/workflows
```

- Category: myCRMSIM Automations / Automations
- Auth: Bearer access token
- Scope: `automations.read`

Read-only list of the workflows built in **Automations** for a workspace. Scoped to the installer, so a token can only read the workflows of its own workspaces. Supports pagination and name search.

An unknown or non-owned `workspace_id` returns **404** (never an empty 200), and the same 404 is returned whether the workspace does not exist or simply is not yours — so existence is never leaked.

**Pagination:** `page` is clamped to >= 1 (default 1) and `limit` to [1, 200] (default 10). Invalid bounds are normalised rather than rejected; the response `pagination` object reports the applied `page` / `limit`, `max_limit`, `total`, `total_pages`, the raw `requested` values, and a `normalized` flag.

This is a read-only surface — creating, editing, and triggering workflows is done in the dashboard, not via the API.

## Parameters

| Name | In | Type | Required | Description |
| --- | --- | --- | --- | --- |
| `workspace_id` | query | number | yes | The workspace whose workflows to list. Must belong to the installer. Example: `7` |
| `page` | query | number | no | Page number — integer clamped to >= 1; default 1. Invalid values (0, negative, non-numeric) are normalised to 1, NOT rejected; see the response `pagination` object. Example: `1` |
| `limit` | query | number | no | Page size — integer clamped to [1, 200]; default 10. Out-of-range or non-numeric values are normalised, NOT rejected; the applied bounds and a `normalized` flag are echoed in the response `pagination` object. Example: `10` |
| `search` | query | string | no | Filter workflows by name (case-insensitive). Example: `welcome` |

## Response fields (workflows)

| Field | Type | Description |
| --- | --- | --- |
| `workflows` | array<object> | The page of workflows. Each carries id, name, status ("active" / "draft"), created_at, updated_at. |
| `total` | number | Total workflows in the workspace matching the filter. |
| `activeCount` | number | How many of them are active. |
| `draftCount` | number | How many of them are drafts. |

## Response 200

OK

```json
{
  "success": true,
  "data": {
    "workflows": [
      {
        "id": "wf_9a1",
        "name": "Welcome new lead",
        "status": "active",
        "created_at": "2026-05-21T09:14:22.000Z",
        "updated_at": "2026-07-01T12:00:00.000Z"
      },
      {
        "id": "wf_9a2",
        "name": "Missed-call follow up",
        "status": "draft",
        "created_at": "2026-06-02T10:00:00.000Z",
        "updated_at": "2026-06-02T10:00:00.000Z"
      }
    ],
    "total": 12,
    "activeCount": 8,
    "draftCount": 4
  },
  "pagination": {
    "page": 1,
    "limit": 10,
    "max_limit": 200,
    "total": 12,
    "total_pages": 2,
    "requested": {
      "page": null,
      "limit": null
    },
    "normalized": false
  }
}
```

## Response 400

workspace_id missing

```json
{
  "success": false,
  "message": "workspace_id is required"
}
```

## Response 401

Missing or invalid token

```json
{
  "success": false,
  "message": "Invalid or expired access token."
}
```

## Response 403

Missing scope

```json
{
  "success": false,
  "message": "Missing scope(s): automations.read. This integration was granted: …"
}
```

## Response 404

workspace_id does not exist or is not owned by the installer (same response for both, so existence is never leaked)

```json
{
  "success": false,
  "message": "Workspace not found or not accessible to this token"
}
```
