Skip to main content
Fetch the current draft for a workflow.

Overview

The Get Workflow Draft endpoint returns the staged draft for a workflow, including its JSON definition and whether it is in sync with the live workflow. Returns 404 if no draft exists.

Authentication

Requires a valid API key. No special permission scope is needed beyond a valid key.

Key Features

  • Sync Indicator: is_synced tells you whether the draft differs from the live workflow
  • Full Draft Shape: Complete JSON definition, name, and description
  • No Credit Cost: This endpoint is free to use
curl -X GET "https://api.trigify.io/v1/workflows/wf_abc123/draft" \
  -H "x-api-key: YOUR_API_KEY"

Path Parameters

ParameterTypeDescription
idstringThe unique workflow ID

Example Response

{
  "message": "Draft retrieved successfully",
  "success": true,
  "data": {
    "id": "wd_draft123",
    "workflow_id": "wf_abc123",
    "name": "Summarise new posts to Slack (draft)",
    "description": "Experimenting with an extra scoring step",
    "workflow": {
      "trigger": { "kind": "workflows/new-post", "inputs": {} },
      "actions": [
        { "id": "agent-1", "kind": "generic_agent", "name": "Summarise Post" },
        { "id": "slack-1", "kind": "slack_send_channel_message", "name": "Send Summary" }
      ],
      "edges": [
        { "from": "$source", "to": "agent-1" },
        { "from": "agent-1", "to": "slack-1" }
      ]
    },
    "last_modified": "2026-04-14T12:05:00.000Z",
    "is_synced": false,
    "created": "2026-04-14T11:00:00.000Z"
  }
}

Response Fields

FieldTypeDescription
messagestringHuman-readable status message
successbooleantrue on success
dataobjectThe draft (see below)
The data object contains:
FieldTypeDescription
idstringUnique draft identifier
workflow_idstringParent workflow ID
namestringDraft name
descriptionstringDraft description
workflowobjectDraft workflow definition (JSON). Same shape as Create Workflow
last_modifiedstringISO 8601 last modification timestamp
is_syncedbooleanWhether the draft matches the live workflow
createdstringISO 8601 creation timestamp

Credit Usage

This endpoint is free and does not consume credits.