---
title: "List Drafts"
method: GET
path: "/v3/workflow-editor/drafts"
tags: ["workflow-editor"]
---

# List Drafts

`GET /v3/workflow-editor/drafts`

## Request

- Base URL: `https://api.mentium.io` (the document declares no server; this is the origin it was published from)
- URL: `https://api.mentium.io/v3/workflow-editor/drafts`
- Auth: HTTP bearer

List all workflow drafts in the user's workspace.

## Headers

- `mentium-workspace-id` string, nullable

## Response `200`

Successful Response

- WorkflowEditorListOut: List of workflow drafts.
  - `items` WorkflowEditorOut[], required
    - `id` string, required
    - `workspace_id` string, required
    - `name` string, nullable
    - `yaml_content` string, required
    - `workflow_parent_id` string, nullable
    - `draft_id` string, nullable: ID of the child draft linked to this workflow, if one exists. Only populated for non-draft (deployed / inactive) workflows.
    - `chat_history` ChatMessageOut[]
      - `role` string, required: Message role: 'user', 'assistant', or 'system'
      - `content` string, required: Message content
      - `timestamp` string, nullable: ISO-8601 timestamp recorded when this message was appended.
      - `message_index` integer, nullable: Zero-based position in chat_history (used by truncate-chat).
      - `yaml_snapshot` string, nullable: For user messages, the canvas YAML at the moment this message was sent. Used to anchor chat-aware undo / pencil-edit (truncate-chat).
      - `tool_invocations` ChatToolInvocationOut[]: For assistant messages, the tool calls executed during this turn.
        - `call_id` string, required: Provider-issued call id
        - `name` string, required: Tool name
        - `arguments` string, required: JSON-encoded arguments string
        - `output` string, required: Tool output string fed back to the model
        - `success` boolean, required: Whether the tool call succeeded
    - `created_at` string, required
    - `updated_at` string, required
    - `can_undo` boolean: Whether undo is available
    - `is_active` boolean: Whether the workflow is deployed and active
    - `is_draft` boolean: Whether this is a draft
    - `deployed_version` integer: Number of times this workflow has been deployed
  - `total` integer, required

## Other responses

- `422`: Validation Error

---

[API](https://skmtc.dev/mentium/apis/mentium-api.md) - [All operations](https://skmtc.dev/mentium/apis/mentium-api/llms.txt) - [OpenAPI document](https://skmtc.dev/mentium/apis/mentium-api/revisions/b4ed8e59432e?raw)
