---
title: "GET /v1/workflows/{id}"
method: GET
path: "/v1/workflows/{id}"
---

# GET /v1/workflows/{id}

`GET /v1/workflows/{id}`

Get a workflow by ID

## Path parameters

- `id` string, required

## Response `200`

OK

- GetWorkflowSuccessResponse
  - `code` integer
  - `data` Workflow
    - `aiDescription` string
    - `aiName` string
    - `conversationId` string
    - `cooldownMs` integer
    - `createdAt` string
    - `createdBy` string
    - `definition` WorkflowDefinition — Definition is the inline workflow graph to analyze. Same shape as a saved workflow's definition. Unlike the ephemeral-run endpoint there is no trigger restriction — analysis is read-only and method-agnostic.
      - `blockExpansions` object — Set on run snapshots only (not workflow DB)
      - `inputSchema` WorkflowInput[]
        - `description` string
        - `key` string
        - `required` boolean
        - `type` string — "string", "number", "boolean", "object", "array"
      - `nodes` object, required
      - `sensitivePropKeys` string[] — Legacy: kept for old runs; no longer populated for new workflows
      - `triggerNodeIds` string[] — TriggerNodeIDs lists the node IDs that are trigger (root) nodes. Every workflow declares this — single-trigger workflows ship ["root"] (the legacy node id), multi-trigger workflows list every trigger node id. Treating single-trigger as a forest-of-1 removes the two-path branching throughout the BE + FE; older rows without the field are backfilled by migration 000282 and the field-missing path stays as a read-side safety net (see FindTriggerNodeIDs) but is no longer exercised by saves. "root" is also a runtime alias for "the trigger that fired this run" — {{root.X}} variable references resolve to the firing trigger regardless of which trigger fired. Don't repurpose the literal "root" as a trigger id on a multi-trigger workflow.
      - `variableDefs` VariableDef[] — VariableDefs is a snapshot of the workflow's declared variables at run creation time. The canonical source lives on the workflows row (Workflow.VariableDefs column). Snapshotted into the run definition so the worker can resolve {{$vars.x}} lookups and route variable-action writes to the right scope without an extra DB round trip.
        - `default` unknown
        - `description` string
        - `lifetime` 'persist' | 'reset'
        - `name` string
        - `type` 'number' | 'text' | 'boolean' | 'list' | 'object'
    - `descManuallySet` boolean
    - `description` string
    - `fundAutoSwapConfig` WorkflowFundAutoSwapConfig
      - `enabled` boolean
      - `maxSwapAmountUsd` number
      - `mode` string
      - `sources` OrgAutoSwapSource[]
        - `chainId` integer — ChainID is the source chain to sell from.
        - `id` string — ID is a unique identifier for this source (e.g., "src_abc123").
        - `priority` integer — Priority controls order of evaluation (lower = tried first).
        - `slippageBps` integer — SlippageBps is the slippage tolerance in basis points. Default 300 (3%).
        - `tokenAddress` string — TokenAddress is the token to sell. Use "native" for native gas tokens.
        - `tokenDecimals` integer — TokenDecimals is the number of decimal places for the token (e.g. 18 for ETH, 6 for USDC). Stored so the UI can display the human-readable amount without re-fetching on-chain metadata.
        - `walletId` string — WalletID is the org wallet to sell from.
    - `hasDraft` boolean — Response-only fields (not persisted to database) HasDraft indicates a draft exists (for live workflows in API responses)
    - `hasLiveVersion` boolean — HasLiveVersion indicates a live version exists (for drafts in API responses)
    - `id` string
    - `lastTriggeredAt` string
    - `liveVersionPaused` boolean — LiveVersionPaused indicates the live (active/paused) sibling row is paused. Only meaningful when Status == draft && HasLiveVersion — the draft row is the canonical DISPLAY row, so without this a caller can't tell the published sibling is paused without a second round trip (GET /v1/workflows/{id}/live).
    - `maxRuns` integer
    - `name` string
    - `nameManuallySet` boolean
    - `organizationId` string
    - `ownerUserId` string
    - `pausedReason` 'cu_exhausted' | 'disabled_action' | 'consecutive_failures' | 'max_runs_exhausted' | 'invalid_chat' | 'member_removed'
    - `publicRunCooldownSeconds` integer
    - `publicRunDailyLimit` integer
    - `publicWidgetConfig` PublicWidgetConfig
      - `buttonLabel` string — ButtonLabel is the text displayed on the trigger button
      - `description` string — Description explains what the workflow does
      - `enabled` boolean — Enabled controls whether the public widget is active
      - `maxAmount` string — MaxAmount is the maximum amount allowed per trigger (in smallest unit)
      - `minAmount` string — MinAmount is the minimum amount required to trigger (in smallest unit)
      - `title` string — Title is the display title for the widget
    - `remainRuns` integer
    - `sourceTemplateId` string
    - `status` 'draft' | 'active' | 'paused' | 'archived'
    - `triggerSecret` string
    - `type` 'token-price-cexes' | 'evm-log' | 'cronjob' | 'schedule' | 'manual' | 'approval' | 'telegram-channel' | 'polymarket-user-bet' | 'polymarket-market-trade' | 'polymarket-new-market' | 'polymarket-market-close' | 'slack-mentions' | 'erc20-receive' | 'erc20-send' | 'anyspend' | 'shopify-order-created' | 'shopify-order-paid' | 'shopify-inventory-level-updated' | 'ramp-new-transaction' | 'ramp-transaction-status-updated' | 'ramp-transfer-payment-updated' | 'slack-new-reaction-added' | 'slack-new-message-in-channels' | 'slack-new-channel-created' | 'slack-new-direct-message' | 'slack-new-keyword-mention' | 'slack-new-user-added' | 'slack-new-user-mention' | 'slack-new-interaction-event' | 'telegram-new-interaction-event' | 'email-new-email-received' | 'email-new-email-matching-criteria' | 'gmail-new-email-received' | 'gmail-new-email-matching-search' | 'stripe-payment-receive' | 'eth-receive' | 'eth-send' | 'farcaster-new-cast' | 'farcaster-new-follower' | 'farcaster-new-reaction' | 'x-new-tweet' | 'exchange-listing' | 'coinbase-payment-received' | 'coinbase-checkout-received' | 'solana-transaction' | 'hyperliquid-price-alert' | 'hyperliquid-trade' | 'hyperliquid-user-fill' | 'hyperliquid-liquidation' | 'hyperliquid-position-change' | 'hyperliquid-transfer' | 'unusual-whales-options-flow-alerts' | 'unusual-whales-market-news' | 'kalshi-market-trade' | 'kalshi-new-market' | 'kalshi-market-close' | 'situation-fired'
    - `uiMetadata` WorkflowUIMetadata
      - `comments` Comment[]
        - `createdAt` string
        - `createdBy` StickyNoteUser
          - `clientId` string
          - `name` string
        - `id` string
        - `nodeId` string
        - `position` NodePosition
          - `x` number
          - `y` number
        - `replies` CommentReply[]
          - `createdAt` string
          - `createdBy` StickyNoteUser
            - `clientId` string
            - `name` string
          - `id` string
          - `text` string
          - `updatedAt` string
        - `resolved` boolean
        - `text` string
        - `updatedAt` string
      - `nodePositions` object
      - `stickyNotes` StickyNote[]
        - `color` string
        - `createdAt` string
        - `createdBy` StickyNoteUser
          - `clientId` string
          - `name` string
        - `id` string
        - `position` NodePosition
          - `x` number
          - `y` number
        - `size` StickyNoteSize
          - `height` number
          - `width` number
        - `text` string
        - `updatedAt` string
        - `zIndex` integer
    - `updatedAt` string
    - `updatedBy` string
    - `variableDefs` VariableDef[]
      - `default` unknown
      - `description` string
      - `lifetime` 'persist' | 'reset'
      - `name` string
      - `type` 'number' | 'text' | 'boolean' | 'list' | 'object'
    - `version` integer
    - `versionCreatedBy` string — VersionCreatedBy is the user who authored THIS version row. Unlike CreatedBy (asset creator, copied to every version for ownership) and UpdatedBy (overwritten by lifecycle ops like archiving), it is stamped once at version insert and never mutated.
    - `visibility` 'private' | 'org' | 'public_view' | 'public_execute'
    - `x402Config` X402Config
      - `chainId` integer — Chain ID where payment should be made (e.g., 8453 for Base)
      - `discoverable` boolean — Discoverable controls whether this workflow is listed in the Bazaar public catalog. Bazaar is a discovery marketplace where users can find and pay for x402-enabled endpoints. When true: Endpoint is publicly listed, anyone can trigger with payment only (no secret needed). When false: Endpoint is private, requires both secret and payment to trigger.
      - `discoveryInput` X402DiscoverySchema
        - `example` unknown
        - `schema` object — Schema is a JSON Schema definition for validation
      - `discoveryMetadata` X402DiscoveryMetadata
        - `category` string — Category groups workflows (e.g., "data", "automation", "ai")
        - `description` string — Description provides details about what the workflow does
        - `documentation` string — Documentation URL for additional documentation
        - `logo` string — Logo URL for the workflow/provider logo
        - `name` string — Name is the display name for the workflow
        - `provider` string — Provider is the name of the entity providing this workflow
        - `tags` string[] — Tags for searchable keywords
      - `discoveryOutput` X402DiscoverySchema
        - `example` unknown
        - `schema` object — Schema is a JSON Schema definition for validation
      - `price` string — Price in the smallest unit of the token (e.g., wei for ETH, 6 decimals for USDC)
      - `recipient` string — Recipient address that will receive the payment
      - `token` string — Token address (e.g., USDC contract address)
  - `message` string
  - `requestId` string

## Other responses

- `404` — Not Found

---

[API](https://skmtc.dev/b3os/apis/b3os-workflow-api.md) · [All operations](https://skmtc.dev/b3os/apis/b3os-workflow-api/llms.txt) · [OpenAPI document](https://skmtc-service-production.skmtc.workers.dev/v1/apis/b3os/b3os-workflow-api/revisions/a8c7af3c66a1/schema)
