Skip to content

Workflows

Get workflow outline

Read the saved draft as a compact outline: connections embedded in their source blocks, loop and parallel children nested under their container, and null values omitted. Fields hidden from agents are omitted too, some of them real configuration, as are blocks whose parent container no longer exists; compare with Get workflow state for the full configuration. Requires workspace read access, and reveals nothing Get workflow state does not: its derived fields, such as `triggerWebhookUrl`, are computed from values that state already returns. The outline is read-only: it adds those derived fields and omits positions and edge handles, so never send it to Replace workflow state; edit with Apply workflow operations or a full state from Get workflow state. This read records no audit event; `HEAD` mirrors `GET`. OAuth scope: `api:read`.

GET/api/v2/workflows/{workflowId}/outline

Read the saved draft as a compact outline: connections embedded in their source blocks, loop and parallel children nested under their container, and null values omitted. Fields hidden from agents are omitted too, some of them real configuration, as are blocks whose parent container no longer exists; compare with Get workflow state for the full configuration. Requires workspace read access, and reveals nothing Get workflow state does not: its derived fields, such as triggerWebhookUrl, are computed from values that state already returns. The outline is read-only: it adds those derived fields and omits positions and edge handles, so never send it to Replace workflow state; edit with Apply workflow operations or a full state from Get workflow state. This read records no audit event; HEAD mirrors GET.

OAuth scope: api:read.

Authentication

Send a personal or workspace API key in X-API-Key. See key types and access; operations that reject workspace keys say so in their description.

Send X-API-Key in the request header.

Alternatively

Send a Sim OAuth access token in Authorization: Bearer. See OAuth authentication and scopes.

Authorization: Bearer YOUR_ACCESS_TOKEN

Required scopes: api:read

OAuth flows
json
{
  "authorizationCode": {
    "authorizationUrl": "https://www.sim.ai/api/auth/oauth2/authorize",
    "tokenUrl": "https://www.sim.ai/api/auth/oauth2/token",
    "refreshUrl": "https://www.sim.ai/api/auth/oauth2/token",
    "scopes": {
      "api:read": "Read your workspaces, workflows, files, tables, and logs",
      "api:write": "Read, create, change, run, and delete resources in your workspaces",
      "offline_access": "Stay signed in without asking again"
    }
  }
}

OAuth scope: api:read.

Path parameters

workflowIdstringRequired

Unique workflow identifier.

minLength
1

Responses

200

The workflow draft outline.

object

The compact read-only outline of a workflow draft.

1 field
dataobjectRequired

Response data.

1 field
blocksobjectRequired

Top-level blocks keyed by block id. Blocks inside a loop or parallel appear under their container's nestedNodes.

Schema details
Additional propertiesobject

One block of a workflow outline, with its connections embedded.

10 fields
typestringRequired

Block type, e.g. agent or slack.

namestringRequired

Display name; references to this block's outputs use it.

enabledbooleanRequired

Whether the block runs.

inputsobject

Configured values keyed by field id, with null values omitted. Fields hidden from agents are omitted as well, and some of them are real configuration, so read Get workflow state for the full set. Loop and parallel containers report their iteration settings here. A webhook trigger also carries a derived triggerWebhookUrl, and a credential-routed trigger a derived triggerRouting; both are read-only.

Schema details
Additional propertiesvalue

Configured value; shape depends on the field.

connectionsobject

Outgoing connections keyed by source handle: source, error, if / else-if-0 / else for a Condition, or route-0, route-1, ... for a Router.

Schema details
Additional propertiesvalue

Target block id, or ids when the handle fans out.

Schema details

Any of

Option 1string
Option 2array
Schema details
Array itemstring
nestedNodesobject

Blocks inside this loop or parallel container, keyed by block id.

Schema details
Additional propertiesvalue

Child block in this same outline shape.

advancedModeboolean

Whether the block shows its advanced fields.

errorEnabledboolean

Whether the block has an error output path.

retryobject

Per-block retry configuration.

3 fields
enabledbooleanRequired

Whether the block retries on failure.

maxTriesnumberRequired

Total attempts, including the first.

waitBetweenTriesMsnumberRequired

Delay between attempts, in milliseconds.

Additional properties are not allowed.

triggerModeboolean

Whether the block acts as the workflow trigger.

Additional properties are not allowed.

Additional properties are not allowed.

Additional properties are not allowed.

Response example 1

json
{
  "data": {
    "blocks": {
      "start-1": {
        "type": "starter",
        "name": "Start",
        "enabled": true,
        "connections": {
          "source": "agent-1"
        }
      },
      "agent-1": {
        "type": "agent",
        "name": "Agent 1",
        "enabled": true,
        "inputs": {
          "systemPrompt": "Route the ticket to the right team."
        }
      }
    }
  }
}

Response headers

X-RateLimit-Limitinteger

Maximum requests allowed in the current window.

minimum
0
maximum
9007199254740991
X-RateLimit-Remaininginteger

Requests remaining in the current window.

minimum
0
maximum
9007199254740991
X-RateLimit-Resetstring

ISO 8601 timestamp when the current rate-limit window resets.

format
date-time
pattern
^(?:(?:\d\d[2468][048]|\d\d[13579][26]|\d\d0[48]|[02468][048]00|[13579][26]00)-02-29|\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\d|30)|(?:02)-(?:0[1-9]|1\d|2[0-8])))T(?:(?:[01]\d|2[0-3]):[0-5]\d(?::[0-5]\d(?:\.\d+)?)?(?:Z))$
Was this helpful?
Suggest an edit