---
title: "Import Workflow"
method: POST
path: "/api/v1/workflows/import"
tags: ["Workflows"]
---

# Import Workflow

`POST /api/v1/workflows/import`

Create a new workflow in a workspace from an export payload produced by GET /api/v1/workflows/{id}/export. Block, edge, loop and parallel identifiers are regenerated, so the same payload can be imported repeatedly and alongside its source workflow. The workflow name is de-duplicated against the target folder. Requires write permission on the target workspace.

## Request body

- object
  - `workspaceId` string, required — The workspace to import the workflow into. Requires write permission.
  - `folderId` string — Optional folder to place the imported workflow in. Defaults to the workspace root.
  - `name` string — Optional override for the imported workflow's name. Defaults to the name carried in the payload, then to "Imported Workflow".
  - `description` string — Optional override for the imported workflow's description. Defaults to the description carried in the payload.
  - `workflow` union, required — The workflow to import. Accepts the export envelope returned by GET /api/v1/workflows/{id}/export, a bare workflow state object (`{ blocks, edges, ... }`), or a JSON string of either.
    - WorkflowExport — A portable workflow export envelope. Pass this object straight back to POST /api/v1/workflows/import to recreate the workflow. Credential and password field values stored on blocks are redacted; `{{ENV_VAR}}` references and workflow variables are preserved as stored.
      - `version` '1.0' — Export format version.
      - `exportedAt` string, date-time — ISO 8601 timestamp of when the export was generated.
      - `workflow` object — Identity of the exported workflow at the time of export.
        - `id` string
        - `name` string
        - `description` string, nullable
        - `workspaceId` string, nullable
        - `folderId` string, nullable
      - `state` WorkflowExportState — The workflow graph. Block, edge, loop and parallel identifiers are regenerated on import, so a payload can be imported repeatedly without colliding with its source workflow.
        - `blocks` object — Map of block id to block definition, including canvas position and sub-block values.
        - `edges` object[] — Connections between blocks.
        - `loops` object — Loop container definitions, keyed by loop id.
        - `parallels` object — Parallel container definitions, keyed by parallel id.
        - `metadata` object — The source workflow's name, description and export timestamp.
          - `name` string
          - `description` string
          - `exportedAt` string, date-time
        - `variables` object — Workflow-level variables, keyed by variable id. Emitted as stored — treat as plaintext configuration, not a secret store.
    - object — A bare workflow state object.
    - string — A JSON string of either accepted object form.

## Response `201`

The workflow was imported.

- object
  - `data` ImportedWorkflow — The workflow created by an import.
    - `id` string — Unique identifier of the newly created workflow.
    - `name` string — The workflow name after de-duplication against the target folder.
    - `description` string, nullable
    - `workspaceId` string
    - `folderId` string, nullable
    - `createdAt` string, date-time
    - `updatedAt` string, date-time
  - `limits` Limits — Rate limit and usage information included in every API response.
    - `workflowExecutionRateLimit` object — Current rate limit status for workflow executions.
      - `sync` RateLimitBucket — Rate limit status for a specific execution type.
        - `requestsPerMinute` integer — Maximum number of requests allowed per minute.
        - `maxBurst` integer — Maximum number of concurrent requests allowed in a burst.
        - `remaining` integer — Number of requests remaining in the current rate limit window.
        - `resetAt` string, date-time — ISO 8601 timestamp when the rate limit window resets.
      - `async` RateLimitBucket — Rate limit status for a specific execution type.
        - `requestsPerMinute` integer — Maximum number of requests allowed per minute.
        - `maxBurst` integer — Maximum number of concurrent requests allowed in a burst.
        - `remaining` integer — Number of requests remaining in the current rate limit window.
        - `resetAt` string, date-time — ISO 8601 timestamp when the rate limit window resets.
    - `usage` object — Current billing period usage and plan limits.
      - `currentPeriodCost` number — Total spend in the current billing period in USD.
      - `limit` number — Maximum allowed spend for the current billing period in USD.
      - `plan` string — Your current subscription plan (e.g., free, pro, team).
      - `isExceeded` boolean — Whether the usage limit has been exceeded. Executions may be blocked when true.

## Other responses

- `400` — Invalid request parameters. Check the details array for specific validation errors.
- `401` — Invalid or missing API key. Ensure the X-API-Key header is set with a valid key.
- `403` — Access denied. You do not have permission to access this resource. For audit log endpoints, this requires an Enterprise subscription and organization admin/owner role.
- `404` — The requested resource was not found. Verify the ID is correct and belongs to your workspace.
- `413` — The request body exceeds the 10 MB import limit.
- `423` — The target folder is locked and cannot accept new workflows.
- `429` — Rate limit exceeded. Wait for the duration specified in the Retry-After header before retrying. The X-RateLimit-* headers accompany every response from an authenticated v1 request — success and error alike — and are omitted only when the request fails authentication, since no rate-limit bucket is consulted in that case.

---

[API](https://skmtc.dev/simstudioai/apis/sim-api.md) · [All operations](https://skmtc.dev/simstudioai/apis/sim-api/llms.txt) · [OpenAPI document](https://skmtc-service-production.skmtc.workers.dev/v1/apis/simstudioai/sim-api/revisions/66a471c5b1df/schema)
