Skip to main content

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

flowUuidstringRequired

The source flow's stable id. Must reference a public flow.

Request body

forkedFromVersionstring

Optional. 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.

idstring

The new flow's id — load the editor or run it immediately against this.

flowUuidstring

The new flow's own stable id (distinct from the source's).

namestring

Display name, carried over from the source.

workspaceIdstring

The 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 '{}'

Errors

Endpoint-specific codes on top of the shared error envelope:

StatuscodeWhen
404not_foundThe 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.
409conflictThe source flow already lives in your own workspace. Duplicate it from the dashboard instead.
402plan_limitForking 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.

2 min read