Import an exported workflow as a draft, or fork and synchronize workspaces through the v2 preview-and-apply protocol. Preview the destination bindings, apply those exact choices, then poll the returned operation to verify copies and deployment readiness. The CLI workflow guide uses the same protocol.
Choose the interface
HTTP paths below are relative to /api/v2. {workspaceId} is the current workspace you explicitly selected.
The sync reference documents fields and includes rollback, unlink, and exclusions. Children, resource discovery, mappings, and operations are paginated: follow nextCursor with the same scope and filters.
Prerequisites and access
Set BASE_URL to your deployment origin, without /api/v2. Use a personal API key in X-API-Key, or an OAuth token in Authorization: Bearer. Examples use separate authorized source/destination keys where applicable. Replace all example resource IDs with IDs from your export and destination.
Workspace keys can import where authoring policy allows, but cannot bind credentials, administer forks, or execute selectors. The key owner is not a substitute for an acting user. Workspace policies, permission groups, credential access, and workspace creation limits still apply.
OAuth import/fork/sync previews require api:write, even though previews do not commit changes. Export, fork discovery, mapping reads, selectors, and operation reads use api:read.
Forking and sync require the owning organization's Enterprise entitlement on billing-enabled deployments. On billing-disabled deployments, deployment configuration must enable forking. Check Fork availability before starting. Imports, selector discovery, and operation reports have their own access rules and do not inherit the fork-specific gate.
Import a portable workflow
Export and inspect the source
Default exports clear registered credential fields and workspace bindings. includeReferences=true adds a versioned manifest of resource IDs and their source occurrences, including nested tools. The manifest contains identities, not secret values. Unresolved environment-variable references remain, and ordinary workflow variable values or literal configuration can remain in the full export. Inspect the payload before sharing it.
Source IDs and imported provenance are labels; they do not grant access to an alleged source workspace. includeWorkspaceBindings=true can retain non-secret bindings for a same-workspace round trip; otherwise configure any required bindings reported by import.
Raw HTTP wraps the result in data; the CLI unwraps a single resource. Extract that payload before saving it: