POST/1.0/flows/:flowUuid/fork
Copies a public flow into your workspace as a new, editable flow. Required scope: workbench:flows:write (scopes reference). Find a flow to fork with GET /1.0/flows/public.
Path parameters
flowUuidstringRequiredThe source flow's stable id. Must reference a public flow.
Request body
forkedFromVersionstringOptional. Pin the fork to a specific published version of the source. Omit to copy the source's current head.
Response (201)
The newly created flow in your workspace.
idstringThe new flow's id — load the editor or run it immediately against this.
flowUuidstringThe new flow's own stable id (distinct from the source's).
namestringDisplay name, carried over from the source.
workspaceIdstringThe id of the workspace the fork landed in (yours).
curl -X POST https://api.zerowidth.ai/1.0/flows/b3c1a2d4-5e6f-7081-92a3-b4c5d6e7f809/fork \
-H "Authorization: Bearer zw_live_abc12345_..." \
-H "Content-Type: application/json" \
-d '{}'{
"id": "cmpd9k2x10001...",
"flowUuid": "f0e1d2c3-b4a5-6789-0123-456789abcdef",
"name": "Support triage",
"workspaceId": "ws_3kj9..."
}Errors
Endpoint-specific codes on top of the shared error envelope:
| Status | code | When |
|---|---|---|
404 | not_found | The source flowUuid doesn't exist or isn't public — the response is the same either way. Also returned when forkedFromVersion was set but no published version with that label exists on the source. |
409 | conflict | The source flow already lives in your own workspace. Duplicate it from the dashboard instead. |
402 | plan_limit | Forking would exceed your plan's flow limit. The body names the limit; upgrade or remove a flow. |
Auth + scope codes (401, 403 scope_missing) come from the shared envelope.
Troubleshooting
Fork rejected — 'requires a user-kind key'
Fork needs a Personal key: it records who created the fork, and a Workspace-wide key doesn't identify a person. Use a personal key carrying workbench:flows:write.
404 not_found
The source flowUuid isn't public, or doesn't exist. You can only fork flows published publicly — check the id against the public gallery.
409 conflict
The flow already lives in your workspace — forking is for copying others' public flows. Duplicate your own from the dashboard instead.