Skip to content

Workspace sync

Update workspace fork mappings

Update mappings along a direct fork edge with Admin access to both workspaces. Destination resource membership and credential provider compatibility are validated. Push maps current-to-other; pull maps other-to-current. Billing-enabled deployments require Enterprise. Billing-disabled deployments require forking to be enabled by deployment feature configuration, such as `FORKING_ENABLED`. Workspace API keys return `403`; use a personal API key or scoped OAuth token. OAuth scope: `api:write`.

PUT/api/v2/workspaces/{workspaceId}/fork/mappings

Update mappings along a direct fork edge with Admin access to both workspaces. Destination resource membership and credential provider compatibility are validated. Push maps current-to-other; pull maps other-to-current. Billing-enabled deployments require Enterprise. Billing-disabled deployments require forking to be enabled by deployment feature configuration, such as FORKING_ENABLED. Workspace API keys return 403; use a personal API key or scoped OAuth token.

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.

Path parameters

workspaceIdstringRequired

Explicit current workspace scope.

minLength
1
maxLength
128

Request body

Required

Other workspace, direction, and mapping entries to update.

object

Other workspace, direction, and mapping entries to update.

3 fields
otherWorkspaceIdstringRequired

Workspace on the other side of the direct fork edge.

minLength
1
maxLength
128
directionstringRequired

Push means current to other; pull means other to current, independent of parent/child orientation.

enum
["push","pull"]
mappingsarrayRequired

Mapping entries addressed by resource type and sourceId. targetId: null clears a mapping.

maxItems
5000
Schema details
Array itemobject
3 fields
resourceTypestringRequired

Resource type stored on the canonical parent/child edge.

enum
["oauth_credential","service_account_credential","env_var","table","knowledge_base","file","file_folder","mcp_server","custom_block","custom_tool","skill","sandbox"]
sourceIdstringRequired

Source resource identifier in the canonical 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.

Additional properties are not allowed.

Responses

200

Number of mapping records changed.

object

Number of mapping records changed.

1 field
dataobjectRequired

Response data.

1 field
updatedintegerRequired

Number of records changed.

minimum
0
maximum
9007199254740991

Additional properties are not allowed.

Additional properties are not allowed.

Was this helpful?
Suggest an edit