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

# Get Latest Workflow Version

> Retrieves the latest version of a workflow by highest version number.

Retrieves the latest version of a workflow (by highest version number). Use the returned version ID when running workflows via `POST /workflow-requests/run`.

## Usage

<CodeGroup>
  ```bash cURL theme={null}
  curl https://app.splox.io/api/v1/workflows/019c3221-29d7-70e1-aa1e-dee02589289b/versions/latest \
    -H "Authorization: Bearer YOUR_TOKEN"
  ```

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

  client = SploxClient(api_key="YOUR_API_KEY")
  version = client.workflows.get_latest_version("WORKFLOW_ID")
  print(version.id, version.name, version.status)
  ```

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

  const client = new Splox("YOUR_API_KEY");
  const version = await client.workflows.getLatestVersion("WORKFLOW_ID");
  console.log(version.id, version.name, version.status);
  ```

  ```go Go theme={null}
  client := splox.NewClient("YOUR_API_KEY")
  version, err := client.Workflows.GetLatestVersion(ctx, "WORKFLOW_ID")
  fmt.Println(version.ID, version.Name, version.Status)
  ```
</CodeGroup>

## Path Parameters

| Parameter | Type          | Description |
| --------- | ------------- | ----------- |
| `id`      | string (uuid) | Workflow ID |

## Response

```json theme={null}
{
  "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",
  "metadata": {},
  "status": "draft",
  "created_at": "2025-10-22T10:00:00Z",
  "updated_at": "2025-10-22T10:00:00Z"
}
```

### Version Status

| Status      | Description                                        |
| ----------- | -------------------------------------------------- |
| `draft`     | Work in progress — can be edited                   |
| `published` | Published and immutable — ready for production use |
| `archived`  | No longer active                                   |

## Notes

<Info>
  **Authentication required:** The authenticated user must own the workflow.
</Info>


## OpenAPI

````yaml GET /workflows/{id}/versions/latest
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/{id}/versions/latest:
    get:
      tags:
        - Workflows
      summary: Get Latest Workflow Version
      description: Retrieves the latest version of a workflow by highest version number.
      operationId: getLatestWorkflowVersion
      parameters:
        - name: id
          in: path
          required: true
          description: Workflow ID
          schema:
            type: string
            format: uuid
      responses:
        '200':
          description: Workflow version retrieved successfully
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/WorkflowVersion'
        '404':
          description: Workflow not found
      security:
        - bearerAuth: []
components:
  schemas:
    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

````