Skip to content

Workspace sync

Preview workflow import

Validate destination mappings and configuration with workspace write access, without creating a workflow. The result reports readiness, unresolved fields, discovery instructions, and a fingerprint for mapped import with the same choices. Imported provenance never authorizes or queries a source workspace. OAuth scope: `api:write`.

POST/api/v2/workflows/import/preview

Validate destination mappings and configuration with workspace write access, without creating a workflow. The result reports readiness, unresolved fields, discovery instructions, and a fingerprint for mapped import with the same choices. Imported provenance never authorizes or queries a source workspace.

OAuth scope: api:write.

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:write

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:write.

Request body

Required

Portable workflow data and destination metadata for an import.

object

Portable workflow data and destination metadata for an import.

8 fields
workspaceIdstringRequired

Workspace in which to import the workflow.

minLength
1
maxLength
128
workflowvalueRequired

Workflow export object, bare workflow state, or JSON string containing either form.

Schema details

Any of

Option 1string

JSON string containing a workflow export object or bare workflow state.

minLength
1
Option 2object

Workflow export object or bare workflow state.

folderPathstring

Destination folder path; omit for the workspace root.

maxLength
4096
namestring

Override for the imported workflow name.

minLength
1
maxLength
200
descriptionstring

Override for the imported workflow description.

maxLength
2000
mappingsarray

Mapping entries addressed by resource kind and source identifier.

maxItems
5000
Schema details
Array itemobject
3 fields
kindstringRequired

Resource or operation kind.

enum
["credential","env-var","knowledge-base","knowledge-document","table","file","file-folder","mcp-server","custom-tool","custom-block","skill","sandbox","workflow"]
sourceIdstringRequired

Untrusted source reference label; imports never use it to authorize or query a source workspace.

minLength
1
maxLength
4096
targetIdvalueRequired

Authorized destination identifier, or null to clear the mapping.

Schema details

Any of

Option 1string
minLength
1
maxLength
4096
Option 2null

Additional properties are not allowed.

bindingsarray

Resolved and unresolved source occurrences with their destination selections.

maxItems
5000
Schema details
Array itemobject
7 fields
blockIdstringRequired

Source block identifier before graph ID regeneration.

minLength
1
maxLength
256
subBlockKeystringRequired

Registered source field key, including the tool index for nested Agent fields.

minLength
1
maxLength
256
valuePatharray

Path within the field value; strings address properties and numbers address array entries.

default
[]
maxItems
8
Schema details
Array itemvalue
Schema details

Any of

Option 1string
minLength
1
maxLength
256
Option 2integer
minimum
0
maximum
2000
positionsarray

Positions occupied by this identifier in a multi-value field.

maxItems
2000
Schema details
Array iteminteger
minimum
0
maximum
2000
encodingstring

Registered encoding used to discover and rewrite the reference.

default
scalar
enum
["scalar","array","csv","files","environment"]
kindstringRequired

Resource or operation kind.

enum
["credential","env-var","knowledge-base","knowledge-document","table","file","file-folder","mcp-server","custom-tool","custom-block","skill","sandbox","workflow"]
targetIdvalueRequired

Authorized destination identifier, or null to clear the mapping.

Schema details

Any of

Option 1string
minLength
1
maxLength
4096
Option 2null

Additional properties are not allowed.

dependentValuesarray

Destination-specific values addressed by the source block ID and field key, before imported IDs are regenerated.

maxItems
2000
Schema details
Array itemobject
3 fields
blockIdstringRequired

Source block identifier before graph ID regeneration.

minLength
1
maxLength
256
subBlockKeystringRequired

Registered source field key, including the tool index for nested Agent fields.

minLength
1
maxLength
256
valuestringRequired

Destination value for the registered dependent field.

maxLength
16384

Additional properties are not allowed.

Additional properties are not allowed.

Request example 1

json
{
  "workspaceId": "a91c4b2e-6d3f-4e8a-b5c7-0d9e2f1a8c64",
  "folderPath": "/Operations",
  "workflow": {
    "blocks": {},
    "edges": []
  }
}

Responses

200

Import readiness, unresolved bindings, and destination discovery instructions.

object

Import readiness, unresolved bindings, and destination discovery instructions.

1 field
dataobjectRequired

Response data.

7 fields
previewFingerprintstringRequired

Fingerprint to send when applying this import with the same choices. Preview again after changing any choice.

minLength
64
maxLength
64
readybooleanRequired

Whether every required destination binding and configuration field is resolved for import.

bindingsarrayRequired

Resolved and unresolved source occurrences with their destination selections.

maxItems
10000
Schema details
Array itemobject
5 fields
kindstringRequired

Resource or operation kind.

enum
["credential","env-var","knowledge-base","knowledge-document","table","file","file-folder","mcp-server","custom-tool","custom-block","skill","sandbox","workflow"]
sourceIdstringRequired

Untrusted source reference label; imports never use it to authorize or query a source workspace.

maxLength
4096
targetIdvalueRequired

Authorized destination identifier, or null to clear the mapping.

Schema details

Any of

Option 1string
maxLength
4096
Option 2null
requiredbooleanRequired

Whether the reference or configuration is required for this operation.

occurrenceobjectRequired

Registered source field occurrence addressed by this binding.

5 fields
blockIdstringRequired

Source block identifier before graph ID regeneration.

minLength
1
maxLength
256
subBlockKeystringRequired

Registered source field key, including the tool index for nested Agent fields.

minLength
1
maxLength
256
valuePatharrayRequired

Path within the field value; strings address properties and numbers address array entries.

maxItems
8
Schema details
Array itemvalue
Schema details

Any of

Option 1string
minLength
1
maxLength
256
Option 2integer
minimum
0
maximum
2000
positionsarray

Positions occupied by this identifier in a multi-value field.

maxItems
2000
Schema details
Array iteminteger
minimum
0
maximum
2000
encodingstringRequired

Registered encoding used to discover and rewrite the reference.

enum
["scalar","array","csv","files","environment"]

Additional properties are not allowed.

Additional properties are not allowed.

unresolvedBindingsarrayRequired

Source references that still require destination mappings or explicit copy choices.

maxItems
10000
Schema details
Array itemobject
5 fields
kindstringRequired

Resource or operation kind.

enum
["credential","env-var","knowledge-base","knowledge-document","table","file","file-folder","mcp-server","custom-tool","custom-block","skill","sandbox","workflow"]
sourceIdstringRequired

Untrusted source reference label; imports never use it to authorize or query a source workspace.

maxLength
4096
targetIdvalueRequired

Authorized destination identifier, or null to clear the mapping.

Schema details

Any of

Option 1string
maxLength
4096
Option 2null
requiredbooleanRequired

Whether the reference or configuration is required for this operation.

occurrenceobjectRequired

Registered source field occurrence addressed by this binding.

5 fields
blockIdstringRequired

Source block identifier before graph ID regeneration.

minLength
1
maxLength
256
subBlockKeystringRequired

Registered source field key, including the tool index for nested Agent fields.

minLength
1
maxLength
256
valuePatharrayRequired

Path within the field value; strings address properties and numbers address array entries.

maxItems
8
Schema details
Array itemvalue
Schema details

Any of

Option 1string
minLength
1
maxLength
256
Option 2integer
minimum
0
maximum
2000
positionsarray

Positions occupied by this identifier in a multi-value field.

maxItems
2000
Schema details
Array iteminteger
minimum
0
maximum
2000
encodingstringRequired

Registered encoding used to discover and rewrite the reference.

enum
["scalar","array","csv","files","environment"]

Additional properties are not allowed.

Additional properties are not allowed.

configurationarrayRequired

Dependent fields that may need destination-specific values.

maxItems
10000
Schema details
Array itemobject
9 fields
blockIdstringRequired

Source block identifier before graph ID regeneration.

minLength
1
maxLength
256
subBlockKeystringRequired

Registered source field key, including the tool index for nested Agent fields.

minLength
1
maxLength
1024
titlestringRequired

Human-readable configuration field label.

maxLength
1024
requiredbooleanRequired

Whether the reference or configuration is required for this operation.

configuredbooleanRequired

Whether this destination field currently has a nonempty value.

multiSelectboolean

Whether the field accepts comma-separated selections.

selectorKeystring

Registered selector key for discovering this field’s destination options.

maxLength
256
contextobjectRequired

Allowlisted selector dependencies scoped to the destination workspace.

Schema details
Additional propertiesstring
maxLength
16384
requiresAuthenticationbooleanRequired

Whether a human must connect the provider before choices can be discovered.

Additional properties are not allowed.

unresolvedConfigurationarrayRequired

Required destination configuration that remains empty.

maxItems
10000
Schema details
Array itemobject
9 fields
blockIdstringRequired

Source block identifier before graph ID regeneration.

minLength
1
maxLength
256
subBlockKeystringRequired

Registered source field key, including the tool index for nested Agent fields.

minLength
1
maxLength
1024
titlestringRequired

Human-readable configuration field label.

maxLength
1024
requiredbooleanRequired

Whether the reference or configuration is required for this operation.

configuredbooleanRequired

Whether this destination field currently has a nonempty value.

multiSelectboolean

Whether the field accepts comma-separated selections.

selectorKeystring

Registered selector key for discovering this field’s destination options.

maxLength
256
contextobjectRequired

Allowlisted selector dependencies scoped to the destination workspace.

Schema details
Additional propertiesstring
maxLength
16384
requiresAuthenticationbooleanRequired

Whether a human must connect the provider before choices can be discovered.

Additional properties are not allowed.

discoveryarrayRequired

CLI operations for discovering suitable destination resources.

maxItems
32
Schema details
Array itemobject
3 fields
kindstringRequired

Resource or operation kind.

maxLength
256
commandstringRequired

CLI command to enumerate destination candidates.

maxLength
1024
humanAuthorizationMayBeRequiredbooleanRequired

Whether discovery may require a human OAuth authorization step.

Additional properties are not allowed.

Additional properties are not allowed.

Additional properties are not allowed.

Was this helpful?
Suggest an edit