> ## Documentation Index
> Fetch the complete documentation index at: https://docs.splox.io/llms.txt
> Use this file to discover all available pages before exploring further.

# List Workflows

> Lists all workflows owned by the authenticated user. Supports cursor-based pagination and search.

Lists all workflows owned by the authenticated user. Supports cursor-based pagination and search.

## Usage

<CodeGroup>
  ```bash cURL theme={null}
  curl https://app.splox.io/api/v1/workflows?limit=10 \
    -H "Authorization: Bearer YOUR_TOKEN"
  ```

  ```python Python theme={null}
  from splox import SploxClient

  client = SploxClient(api_key="YOUR_API_KEY")
  result = client.workflows.list(limit=10, search="customer support")

  for wf in result.workflows:
      print(wf.id, wf.latest_version.name)

  # Paginate
  if result.pagination.has_more:
      next_page = client.workflows.list(cursor=result.pagination.next_cursor)
  ```

  ```typescript Node.js theme={null}
  import Splox from "splox";

  const client = new Splox("YOUR_API_KEY");
  const result = await client.workflows.list({ limit: 10, search: "customer support" });

  for (const wf of result.workflows) {
    console.log(wf.id, wf.latest_version?.name);
  }

  // Paginate
  if (result.pagination.has_more) {
    const nextPage = await client.workflows.list({ cursor: result.pagination.next_cursor });
  }
  ```

  ```go Go theme={null}
  client := splox.NewClient("YOUR_API_KEY")
  result, err := client.Workflows.List(ctx, &splox.ListParams{
      Limit:  10,
      Search: "customer support",
  })
  for _, wf := range result.Workflows {
      fmt.Println(wf.ID, wf.LatestVersion.Name)
  }
  ```
</CodeGroup>

## Query Parameters

| Parameter | Type          | Default | Description                                               |
| --------- | ------------- | ------- | --------------------------------------------------------- |
| `limit`   | integer       | 20      | Items per page (1–100)                                    |
| `cursor`  | string (uuid) | —       | Cursor from `pagination.next_cursor` of previous response |
| `search`  | string        | —       | Filter by workflow name or description                    |

## Response

```json theme={null}
{
  "workflows": [
    {
      "id": "019c3221-29d7-70e1-aa1e-dee02589289b",
      "user_id": "0199d001-c45d-9e0f-3456-789012cdef01",
      "latest_version": {
        "id": "019c3221-29da-7d08-93fa-c48dbaa8b1db",
        "workflow_id": "019c3221-29d7-70e1-aa1e-dee02589289b",
        "version_number": 1,
        "name": "My Workflow",
        "description": "A workflow for processing orders",
        "status": "draft",
        "created_at": "2025-10-22T10:00:00Z",
        "updated_at": "2025-10-22T10:00:00Z"
      },
      "created_at": "2025-10-22T10:00:00Z",
      "updated_at": "2025-10-22T10:00:00Z"
    }
  ],
  "pagination": {
    "limit": 20,
    "next_cursor": "019c3221-29d7-70e1-aa1e-dee02589289b"
  }
}
```

### Pagination

If `next_cursor` is present, pass it as the `cursor` query parameter to fetch the next page:

```bash theme={null}
curl "https://app.splox.io/api/v1/workflows?limit=10&cursor=019c3221-29d7-70e1-aa1e-dee02589289b" \
  -H "Authorization: Bearer YOUR_TOKEN"
```

When `next_cursor` is `null`, there are no more results.

## Notes

<Info>
  **Authentication required:** Only workflows owned by the authenticated user are returned.
</Info>


## OpenAPI

````yaml GET /workflows
openapi: 3.1.0
info:
  title: Splox API
  description: >-
    Run workflows, manage chats, receive events, and monitor execution via the
    Splox API
  version: 1.0.0
  contact:
    name: Splox Support
    email: support@splox.io
    url: https://community.splox.io
servers:
  - url: https://app.splox.io/api/v1
    description: Production API
security: []
tags:
  - name: MCP
    description: Discover MCP servers, manage connections, and execute MCP tools
  - name: Workflows
    description: List, get, and inspect workflows, versions, and nodes
  - name: Workflow Requests
    description: Run workflows, monitor execution, and retrieve results
  - name: Events
    description: Receive external events via Event Hub webhooks
  - name: Chats
    description: Manage chat sessions for workflow interactions
paths:
  /workflows:
    get:
      tags:
        - Workflows
      summary: List Workflows
      description: >-
        Lists all workflows owned by the authenticated user. Supports
        cursor-based pagination and search.
      operationId: listWorkflows
      parameters:
        - name: limit
          in: query
          description: 'Items per page (default: 20, max: 100)'
          schema:
            type: integer
            default: 20
            minimum: 1
            maximum: 100
        - name: cursor
          in: query
          description: Cursor for pagination (UUID of last item from previous page)
          schema:
            type: string
            format: uuid
        - name: search
          in: query
          description: Filter by workflow name or description
          schema:
            type: string
      responses:
        '200':
          description: Workflows retrieved successfully
          content:
            application/json:
              schema:
                type: object
                properties:
                  workflows:
                    type: array
                    items:
                      $ref: '#/components/schemas/Workflow'
                  pagination:
                    $ref: '#/components/schemas/Pagination'
      security:
        - bearerAuth: []
components:
  schemas:
    Workflow:
      type: object
      description: Represents a user's workflow
      properties:
        id:
          type: string
          format: uuid
        user_id:
          type: string
          format: uuid
        latest_version:
          $ref: '#/components/schemas/WorkflowVersion'
        is_public:
          type: boolean
        created_at:
          type: string
          format: date-time
        updated_at:
          type: string
          format: date-time
      required:
        - id
        - user_id
        - created_at
        - updated_at
    Pagination:
      type: object
      description: Cursor-based pagination info
      properties:
        limit:
          type: integer
        next_cursor:
          type: string
          format: uuid
          nullable: true
          description: Cursor for next page. Null if no more results.
    WorkflowVersion:
      type: object
      description: Represents a specific version of a workflow
      properties:
        id:
          type: string
          format: uuid
        workflow_id:
          type: string
          format: uuid
        version_number:
          type: integer
        name:
          type: string
        description:
          type: string
        metadata:
          type: object
          additionalProperties: true
        status:
          type: string
          enum:
            - draft
            - published
            - archived
        created_at:
          type: string
          format: date-time
        updated_at:
          type: string
          format: date-time
      required:
        - id
        - workflow_id
        - version_number
        - name
        - status
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      description: >-
        API token generated from your Splox account settings. Create tokens at
        https://app.splox.io/account?tab=settings

````