Skip to content

Process Flows

Cross-functional process diagrams — start/end terminators, manual steps, decision diamonds, SOP references, and department swimlanes wired up with edges.

GET/api/v1/process-flows

List process flows in the workspace, paginated.

Query parameters

NameTypeRequiredDescription
limitintegeroptionalDefault 100, max 500.
cursorISO 8601optionalPagination cursor.

Example response

Json
{
  "data": [
    {
      "id": "...",
      "title": "Customer feature request — sample",
      "status": "active",
      "createdAt": "...",
      "updatedAt": "..."
    }
  ],
  "nextCursor": null
}
GET/api/v1/process-flows/:id

Returns a single flow with its nodes and edges inlined.

Example response

Json
{
  "data": {
    "id": "10a7fb55-aac3-4a17-8beb-8074c1d31697",
    "title": "Customer feature request — sample",
    "description": "Cross-functional sample flow.",
    "status": "active",
    "createdAt": "2026-05-03T04:30:00.000Z",
    "updatedAt": "2026-05-03T04:30:00.000Z",
    "nodes": [
      {
        "id": "...",
        "nodeType": "start",
        "label": "Request filed",
        "positionX": 60,
        "positionY": 200
      },
      {
        "id": "...",
        "nodeType": "decision",
        "label": "In scope?",
        "positionX": 420,
        "positionY": 340
      }
    ],
    "edges": [
      {
        "id": "...",
        "sourceNodeId": "...",
        "targetNodeId": "...",
        "edgeType": "conditional",
        "label": "Yes"
      }
    ]
  }
}

Flow object

Fields

NameTypeRequiredDescription
iduuidoptional—
titlestringoptional—
descriptionstring | nulloptional—
statusstringoptionaldraft | active | archived
createdAtISO 8601optional—
updatedAtISO 8601optional—
nodesFlowNode[]optionalInline only on the detail endpoint.
edgesFlowEdge[]optionalInline only on the detail endpoint.

FlowNode

Fields

NameTypeRequiredDescription
iduuidoptional—
nodeTypestringoptionalstart | end | manual_step | decision | sop_reference | department_lane
labelstring | nulloptional—
sopIduuid | nulloptionalSet on sop_reference nodes.
orgNodeIduuid | nulloptionalSet on department_lane nodes.
positionXnumberoptional—
positionYnumberoptional—
metadataobjectoptionalFree-form (color, hints, etc.).

FlowEdge

Fields

NameTypeRequiredDescription
iduuidoptional—
sourceNodeIduuidoptional—
targetNodeIduuidoptional—
edgeTypestringoptionaldefault | conditional | error
labelstring | nulloptionalOften "Yes" / "No" on conditional edges.
sourceHandlestringoptionalDefault "out". Decision nodes use "yes" / "no".
targetHandlestringoptionalDefault "in".

Code sample — build a flow

# List flows
curl https://sopflow.io/api/v1/process-flows \
  -H "Authorization: Bearer sk_live_YOUR_KEY"

# Create a new flow
curl -X POST https://sopflow.io/api/v1/process-flows \
  -H "Authorization: Bearer sk_live_YOUR_KEY" \
  -H "Content-Type: application/json" \
  -d '{"title":"Onboarding","status":"draft"}'

# Add a start node
curl -X POST https://sopflow.io/api/v1/process-flows/FLOW_ID/nodes \
  -H "Authorization: Bearer sk_live_YOUR_KEY" \
  -H "Content-Type: application/json" \
  -d '{"nodeType":"start","label":"Begin","positionX":0,"positionY":0}'

Mutating flows

All mutations require write scope. Building a flow is three resources: the flow itself, its nodes, and its edges. Pass an Idempotency-Key on POSTs to make retries safe.

POST/api/v1/process-flows

Create an empty flow.

Body fields

NameTypeRequiredDescription
titlestringrequired—
descriptionstring | nulloptional—
statusstringoptionaldraft (default) | active | archived

Example response

Json
{ "data": { "id": "...", "title": "Onboarding", "status": "draft" } }
PATCH/api/v1/process-flows/:id

Update flow metadata. Nodes/edges are managed via their own endpoints.

Example response

Json
{ "data": { "id": "...", "title": "Renamed", "status": "active" } }
DELETE/api/v1/process-flows/:id

Delete a flow. Cascades to nodes and edges.

Example response

Json
HTTP/1.1 204 No Content

Nodes

POST/api/v1/process-flows/:id/nodes

Add a node to a flow.

Body fields

NameTypeRequiredDescription
nodeTypestringrequiredstart | end | manual_step | decision | sop_reference | department_lane
labelstring | nulloptional—
positionXnumberoptionalDefaults to 0.
positionYnumberoptionalDefaults to 0.
sopIduuid | nulloptionalRequired when nodeType=sop_reference.
orgNodeIduuid | nulloptionalOptional anchor (used by department_lane).
metadataobjectoptional—

Example response

Json
{ "data": { "id": "...", "nodeType": "start", "label": "Begin" } }
PATCH/api/v1/process-flow-nodes/:id

Update a node's label, position, or metadata.

Example response

Json
{ "data": { "id": "...", "label": "New label" } }
DELETE/api/v1/process-flow-nodes/:id

Delete a node. Edges touching it cascade.

Example response

Json
HTTP/1.1 204 No Content

Edges

POST/api/v1/process-flows/:id/edges

Connect two nodes.

Body fields

NameTypeRequiredDescription
sourceNodeIduuidrequired—
targetNodeIduuidrequired—
edgeTypestringoptionaldefault | conditional | error
labelstring | nulloptional—
sourceHandlestringoptionalDefaults to "out". Use "yes" / "no" off decision nodes.
targetHandlestringoptionalDefaults to "in".

Example response

Json
{ "data": { "id": "...", "edgeType": "conditional", "label": "Yes" } }
PATCH/api/v1/process-flow-edges/:id

Update an edge's label or type.

Example response

Json
{ "data": { "id": "...", "edgeType": "error" } }
DELETE/api/v1/process-flow-edges/:id

Delete an edge.

Example response

Json
HTTP/1.1 204 No Content

Keep flow design separate from execution

Read a flow and its nodes and edges as a process design. Preserve stable IDs and verify every edge points to a node in the intended flow before displaying or updating the diagram.

A connected diagram does not prove that someone completed the process. Keep any actual run or task-completion records separate and link them deliberately in your integration.