> For the complete documentation index, see [llms.txt](https://docs.n8n.io/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.n8n.io/connect/n8n-api/workflow.md).

# Workflow

Operations about workflows

## Retrieves a specific version of a workflow

> Deprecated: use GET /workflows/{workflowId}/versions/{versionId} instead. Retrieves a specific version of a workflow from workflow history.

```json
{"openapi":"3.0.0","info":{"title":"n8n Public API","version":"1.1.1"},"tags":[{"name":"Workflow","description":"Operations about workflows"}],"servers":[{"url":"/api/v1","description":"Current n8n instance (self-hosted built-in playground)"},{"url":"{url}/api/v1","description":"Self-hosted n8n instance","variables":{"url":{"default":"https://example.com"}}}],"security":[{"ApiKeyAuth":[]},{"BearerAuth":[]},{"CookieAuth":[]}],"components":{"securitySchemes":{"ApiKeyAuth":{"type":"apiKey","in":"header","name":"X-N8N-API-KEY"},"BearerAuth":{"type":"http","scheme":"bearer","bearerFormat":"JWT"},"CookieAuth":{"type":"apiKey","in":"cookie","name":"n8n-auth"}},"parameters":{"workflowId":{"name":"id","in":"path","description":"The ID of the workflow.","required":true,"schema":{"type":"string"}}},"schemas":{"workflowVersion":{"type":"object","additionalProperties":false,"required":["versionId","workflowId","nodes","connections","authors"],"properties":{"versionId":{"type":"string","readOnly":true,"description":"The version ID of this workflow snapshot"},"workflowId":{"type":"string","readOnly":true,"description":"The workflow ID this version belongs to"},"nodes":{"type":"array","items":{"$ref":"#/components/schemas/node"},"description":"Nodes as they were in this version","readOnly":true},"connections":{"type":"object","description":"Connections as they were in this version","readOnly":true},"nodeGroups":{"type":"array","readOnly":true,"description":"Node groups as they were in this version","items":{"$ref":"#/components/schemas/workflowNodeGroup"}},"authors":{"type":"string","readOnly":true,"description":"Authors who created this version"},"name":{"type":"string","nullable":true,"description":"Workflow name at this version"},"description":{"type":"string","nullable":true,"description":"Workflow description at this version"},"createdAt":{"type":"string","format":"date-time","readOnly":true,"description":"When this version was created"},"updatedAt":{"type":"string","format":"date-time","readOnly":true,"description":"When this version was last updated"}}},"node":{"type":"object","additionalProperties":false,"properties":{"id":{"type":"string"},"name":{"type":"string"},"webhookId":{"type":"string"},"disabled":{"type":"boolean"},"notesInFlow":{"type":"boolean"},"notes":{"type":"string"},"type":{"type":"string"},"typeVersion":{"type":"number"},"executeOnce":{"type":"boolean"},"alwaysOutputData":{"type":"boolean"},"retryOnFail":{"type":"boolean"},"maxTries":{"type":"number"},"waitBetweenTries":{"type":"number"},"continueOnFail":{"type":"boolean","description":"use onError instead","deprecated":true},"onError":{"type":"string"},"position":{"type":"array","items":{"type":"number"}},"parameters":{"type":"object","additionalProperties":true},"credentials":{"type":"object"},"customTelemetryTags":{"type":"object","additionalProperties":false,"properties":{"tag":{"type":"array","items":{"type":"object","additionalProperties":false,"required":["key","value"],"properties":{"key":{"type":"string"},"value":{"type":"string"}}}}}},"createdAt":{"type":"string","format":"date-time","readOnly":true},"updatedAt":{"type":"string","format":"date-time","readOnly":true}}},"workflowNodeGroup":{"type":"object","additionalProperties":false,"required":["id","name","nodeIds"],"properties":{"id":{"type":"string","description":"Unique identifier for the node group"},"name":{"type":"string","description":"Display name of the node group"},"description":{"type":"string","maxLength":155,"description":"Optional plain-text description of the node group"},"nodeIds":{"type":"array","description":"IDs of the nodes that belong to this group","items":{"type":"string"}}}}},"responses":{"unauthorized":{"description":"Unauthorized"},"notFound":{"description":"The specified resource was not found."}}},"paths":{"/workflows/{id}/{versionId}":{"get":{"tags":["Workflow"],"summary":"Retrieves a specific version of a workflow","description":"Deprecated: use GET /workflows/{workflowId}/versions/{versionId} instead. Retrieves a specific version of a workflow from workflow history.","deprecated":true,"parameters":[{"$ref":"#/components/parameters/workflowId"},{"name":"versionId","in":"path","required":true,"description":"The version ID to retrieve","schema":{"type":"string"}}],"responses":{"200":{"description":"Operation successful.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/workflowVersion"}}}},"401":{"$ref":"#/components/responses/unauthorized"},"404":{"$ref":"#/components/responses/notFound"}}}}}}
```

## Retrieve all workflows

> Retrieve all workflows from your instance.

```json
{"openapi":"3.0.0","info":{"title":"n8n Public API","version":"1.1.1"},"tags":[{"name":"Workflow","description":"Operations about workflows"}],"servers":[{"url":"/api/v1","description":"Current n8n instance (self-hosted built-in playground)"},{"url":"{url}/api/v1","description":"Self-hosted n8n instance","variables":{"url":{"default":"https://example.com"}}}],"security":[{"ApiKeyAuth":[]},{"BearerAuth":[]},{"CookieAuth":[]}],"components":{"securitySchemes":{"ApiKeyAuth":{"type":"apiKey","in":"header","name":"X-N8N-API-KEY"},"BearerAuth":{"type":"http","scheme":"bearer","bearerFormat":"JWT"},"CookieAuth":{"type":"apiKey","in":"cookie","name":"n8n-auth"}},"parameters":{"offset":{"name":"offset","in":"query","description":"The number of items to skip before starting to collect the result set.","required":false,"schema":{"type":"number","default":0,"minimum":0}},"limit":{"name":"limit","in":"query","description":"The maximum number of items to return.","required":false,"schema":{"type":"number","default":100,"maximum":250}},"cursor":{"name":"cursor","in":"query","description":"Paginate by setting the cursor parameter to the nextCursor attribute returned by the previous request's response. Default value fetches the first \"page\" of the collection. See pagination for more detail.","required":false,"style":"form","schema":{"type":"string"}}},"responses":{"badRequest":{"description":"The request is invalid or provides malformed data."},"unauthorized":{"description":"Unauthorized"},"forbidden":{"description":"Forbidden"}}},"paths":{"/workflows":{"get":{"operationId":"getWorkflows","tags":["Workflow"],"summary":"Retrieve all workflows","description":"Retrieve all workflows from your instance.","parameters":[{"$ref":"#/components/parameters/offset"},{"$ref":"#/components/parameters/limit"},{"$ref":"#/components/parameters/cursor"},{"schema":{"type":"string","enum":["true","false"]},"required":false,"name":"active","in":"query"},{"schema":{"type":"string"},"required":false,"name":"tags","in":"query"},{"schema":{"type":"string"},"required":false,"name":"name","in":"query"},{"schema":{"type":"string"},"required":false,"name":"projectId","in":"query"},{"schema":{"type":"string","enum":["true","false"],"default":"false"},"required":false,"name":"excludePinnedData","in":"query"}],"responses":{"200":{"description":"Operation successful.","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"active":{"type":"boolean"},"activeVersionId":{"type":"string","nullable":true},"createdAt":{"type":"string","format":"date-time"},"updatedAt":{"type":"string","format":"date-time"},"isArchived":{"type":"boolean"},"versionId":{"type":"string"},"triggerCount":{"type":"number"},"nodes":{"type":"array","description":"Nodes that make up the workflow","items":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"webhookId":{"type":"string"},"disabled":{"type":"boolean"},"notesInFlow":{"type":"boolean"},"notes":{"type":"string"},"type":{"type":"string"},"typeVersion":{"type":"number"},"executeOnce":{"type":"boolean"},"alwaysOutputData":{"type":"boolean"},"retryOnFail":{"type":"boolean"},"maxTries":{"type":"number"},"waitBetweenTries":{"type":"number"},"continueOnFail":{"type":"boolean","description":"use onError instead","deprecated":true},"onError":{"type":"string"},"position":{"type":"array","items":{"type":"number"}},"parameters":{"type":"object","additionalProperties":true},"credentials":{"type":"object"},"customTelemetryTags":{"type":"object","properties":{"tag":{"type":"array","items":{"type":"object","properties":{"key":{"type":"string"},"value":{"type":"string"}},"required":["key","value"]}}}},"createdAt":{"type":"string","format":"date-time"},"updatedAt":{"type":"string","format":"date-time"}}}},"connections":{"type":"object","description":"Connections between nodes, keyed by source node name"},"nodeGroups":{"type":"array","description":"Visual groupings of nodes shown as frames on the canvas","items":{"type":"object","properties":{"id":{"type":"string","description":"Unique identifier for the node group"},"name":{"type":"string","description":"Display name of the node group"},"description":{"type":"string","maxLength":155,"description":"Optional plain-text description of the node group"},"nodeIds":{"type":"array","description":"IDs of the nodes that belong to this group","items":{"type":"string"}}},"required":["id","name","nodeIds"]}},"settings":{"type":"object","description":"Execution and behaviour settings for the workflow","properties":{"saveExecutionProgress":{"oneOf":[{"type":"boolean"},{"type":"string","enum":["DEFAULT"]}]},"saveManualExecutions":{"oneOf":[{"type":"boolean"},{"type":"string","enum":["DEFAULT"]}]},"saveDataErrorExecution":{"type":"string","enum":["DEFAULT","all","none"]},"saveDataSuccessExecution":{"type":"string","enum":["DEFAULT","all","none"]},"executionTimeout":{"type":"number"},"errorWorkflow":{"type":"string","description":"The ID of the workflow that contains the error trigger node."},"timezone":{"type":"string"},"executionOrder":{"type":"string"},"binaryMode":{"type":"string","enum":["separate","combined"],"description":"Controls how binary data is resolved from a node's input. This is a derived, internal setting rather than something intended to be set programmatically. It is included in workflow responses for reference, but any value sent when creating or updating a workflow is ignored."},"callerPolicy":{"type":"string","enum":["any","none","workflowsFromAList","workflowsFromSameOwner"],"description":"Controls which workflows are allowed to call this workflow using the Execute Workflow node. Defaults to workflowsFromSameOwner.\n\nAvailable options:\n- `any`: Any workflow can call this workflow (no restrictions)\n- `none`: No other workflows can call this workflow (completely blocked)\n- `workflowsFromSameOwner` (default): Only workflows owned by the same project can call this workflow\n- `workflowsFromAList`: Only the workflows listed in `callerIds` can call this workflow"},"callerIds":{"type":"string","description":"Comma-separated list of workflow IDs allowed to call this workflow (only used with the workflowsFromAList policy)"},"timeSavedMode":{"type":"string","enum":["fixed","dynamic"],"description":"Controls how the time saved per execution is calculated.\n\nAvailable options:\n- `fixed`: Uses the value in `timeSavedPerExecution`. Use when the time saved is the same for every execution.\n- `dynamic`: Calculates the time saved from actual execution metrics. `timeSavedPerExecution` is ignored."},"timeSavedPerExecution":{"type":"number","description":"Estimated time saved per execution in minutes"},"redactionPolicy":{"type":"string","enum":["none","non-manual","manual-only","all"],"description":"Controls whether execution data is redacted for this workflow.\n\nAvailable options:\n- `none` (default): No redaction. All execution data is stored.\n- `non-manual`: Redact production (non-manually triggered) executions only.\n- `manual-only`: Redact manually triggered executions only.\n- `all`: Redact all executions, manual and production."},"availableInMCP":{"type":"boolean","description":"Controls whether this workflow is reachable over the Model Context Protocol (MCP). Defaults to false. The workflow must be active and must hold at least one active Webhook node."},"customTelemetryTags":{"type":"array","items":{"type":"object","properties":{"key":{"type":"string"},"value":{"type":"string"}},"required":["key","value"]}},"credentialResolverId":{"type":"string","description":"ID of the credential resolver that resolves credentials for this workflow. This is a derived, internal setting managed through the credential resolver configuration rather than something intended to be set programmatically. It is included in workflow responses for reference, but any value sent when creating or updating a workflow is ignored."}},"nullable":true},"staticData":{"type":"object","description":"Data the workflow keeps between executions","nullable":true},"pinData":{"type":"object","description":"Pinned sample data for nodes, keyed by node name","nullable":true},"meta":{"type":"object","description":"Workflow metadata such as template information","properties":{"onboardingId":{"type":"string"},"templateId":{"type":"string"},"instanceId":{"type":"string"},"templateCredsSetupCompleted":{"type":"boolean"}},"nullable":true},"tags":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","readOnly":true},"name":{"type":"string"},"createdAt":{"type":"string","format":"date-time","readOnly":true},"updatedAt":{"type":"string","format":"date-time","readOnly":true}},"required":["id","name","createdAt","updatedAt"]}},"shared":{"type":"array","items":{"type":"object","properties":{"role":{"type":"string"},"workflowId":{"type":"string"},"projectId":{"type":"string"},"createdAt":{"type":"string","format":"date-time"},"updatedAt":{"type":"string","format":"date-time"}},"required":["role","workflowId","projectId","createdAt","updatedAt"]}},"activeVersion":{"type":"object","nullable":true,"properties":{"versionId":{"type":"string"},"workflowId":{"type":"string"},"nodes":{"type":"array","description":"Nodes that make up the workflow","items":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"webhookId":{"type":"string"},"disabled":{"type":"boolean"},"notesInFlow":{"type":"boolean"},"notes":{"type":"string"},"type":{"type":"string"},"typeVersion":{"type":"number"},"executeOnce":{"type":"boolean"},"alwaysOutputData":{"type":"boolean"},"retryOnFail":{"type":"boolean"},"maxTries":{"type":"number"},"waitBetweenTries":{"type":"number"},"continueOnFail":{"type":"boolean","description":"use onError instead","deprecated":true},"onError":{"type":"string"},"position":{"type":"array","items":{"type":"number"}},"parameters":{"type":"object","additionalProperties":true},"credentials":{"type":"object"},"customTelemetryTags":{"type":"object","properties":{"tag":{"type":"array","items":{"type":"object","properties":{"key":{"type":"string"},"value":{"type":"string"}},"required":["key","value"]}}}},"createdAt":{"type":"string","format":"date-time"},"updatedAt":{"type":"string","format":"date-time"}}}},"connections":{"type":"object","description":"Connections between nodes, keyed by source node name"},"nodeGroups":{"type":"array","description":"Visual groupings of nodes shown as frames on the canvas","items":{"type":"object","properties":{"id":{"type":"string","description":"Unique identifier for the node group"},"name":{"type":"string","description":"Display name of the node group"},"description":{"type":"string","maxLength":155,"description":"Optional plain-text description of the node group"},"nodeIds":{"type":"array","description":"IDs of the nodes that belong to this group","items":{"type":"string"}}},"required":["id","name","nodeIds"]}},"authors":{"type":"string"},"name":{"type":"string","nullable":true},"description":{"type":"string","nullable":true},"autosaved":{"type":"boolean"},"createdAt":{"type":"string","format":"date-time"},"updatedAt":{"type":"string","format":"date-time"}},"required":["versionId","workflowId","nodes","connections","nodeGroups","authors","name","description","autosaved","createdAt","updatedAt"]}},"required":["id","name","active","activeVersionId","createdAt","updatedAt","isArchived","versionId","triggerCount","nodes","connections","nodeGroups","settings","staticData","meta","shared","activeVersion"]}},"nextCursor":{"type":"string","nullable":true}},"required":["data","nextCursor"]}}}},"400":{"$ref":"#/components/responses/badRequest"},"401":{"$ref":"#/components/responses/unauthorized"},"403":{"$ref":"#/components/responses/forbidden"}}}}}}
```

## Create a workflow

> Create a workflow in your instance.

```json
{"openapi":"3.0.0","info":{"title":"n8n Public API","version":"1.1.1"},"tags":[{"name":"Workflow","description":"Operations about workflows"}],"servers":[{"url":"/api/v1","description":"Current n8n instance (self-hosted built-in playground)"},{"url":"{url}/api/v1","description":"Self-hosted n8n instance","variables":{"url":{"default":"https://example.com"}}}],"security":[{"ApiKeyAuth":[]},{"BearerAuth":[]},{"CookieAuth":[]}],"components":{"securitySchemes":{"ApiKeyAuth":{"type":"apiKey","in":"header","name":"X-N8N-API-KEY"},"BearerAuth":{"type":"http","scheme":"bearer","bearerFormat":"JWT"},"CookieAuth":{"type":"apiKey","in":"cookie","name":"n8n-auth"}},"responses":{"badRequest":{"description":"The request is invalid or provides malformed data."},"unauthorized":{"description":"Unauthorized"},"forbidden":{"description":"Forbidden"},"notFound":{"description":"The specified resource was not found."},"unsupportedMediaType":{"description":"Unsupported media type."},"unprocessableEntity":{"description":"Unprocessable Entity"}}},"paths":{"/workflows":{"post":{"operationId":"createWorkflow","tags":["Workflow"],"summary":"Create a workflow","description":"Create a workflow in your instance.","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string","readOnly":true},"name":{"type":"string"},"active":{"type":"boolean","readOnly":true},"createdAt":{"type":"string","format":"date-time","readOnly":true},"updatedAt":{"type":"string","format":"date-time","readOnly":true},"isArchived":{"type":"boolean","readOnly":true},"versionId":{"type":"string","description":"Current version identifier used for optimistic locking","readOnly":true},"triggerCount":{"type":"integer","description":"Number of active trigger nodes in the workflow","readOnly":true},"nodes":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"webhookId":{"type":"string"},"disabled":{"type":"boolean"},"notesInFlow":{"type":"boolean"},"notes":{"type":"string"},"type":{"type":"string"},"typeVersion":{"type":"number"},"executeOnce":{"type":"boolean"},"alwaysOutputData":{"type":"boolean"},"retryOnFail":{"type":"boolean"},"maxTries":{"type":"number"},"waitBetweenTries":{"type":"number"},"continueOnFail":{"type":"boolean","description":"use onError instead","deprecated":true},"onError":{"type":"string"},"position":{"type":"array","items":{"type":"number"}},"parameters":{"type":"object","additionalProperties":{"nullable":true}},"credentials":{"type":"object","additionalProperties":{"nullable":true}},"customTelemetryTags":{"type":"object","properties":{"tag":{"type":"array","items":{"type":"object","properties":{"key":{"type":"string"},"value":{"type":"string"}},"required":["key","value"],"additionalProperties":false}}},"additionalProperties":false},"createdAt":{"type":"string","format":"date-time","readOnly":true},"updatedAt":{"type":"string","format":"date-time","readOnly":true}},"additionalProperties":false},"description":"Nodes that make up the workflow"},"connections":{"type":"object","description":"Connections between nodes, keyed by source node name"},"settings":{"type":"object","properties":{"saveExecutionProgress":{"type":"boolean"},"saveManualExecutions":{"type":"boolean"},"saveDataErrorExecution":{"type":"string","enum":["all","none"]},"saveDataSuccessExecution":{"type":"string","enum":["all","none"]},"executionTimeout":{"type":"number"},"errorWorkflow":{"type":"string","description":"The ID of the workflow that contains the error trigger node."},"timezone":{"type":"string"},"executionOrder":{"type":"string"},"binaryMode":{"type":"string","enum":["separate","combined"],"description":"Controls how binary data is resolved from a node's input. This is a derived, internal setting rather than something intended to be set programmatically. It is included in workflow responses for reference, but any value sent when creating or updating a workflow is ignored."},"callerPolicy":{"type":"string","enum":["any","none","workflowsFromAList","workflowsFromSameOwner"],"description":"Controls which workflows are allowed to call this workflow using the Execute Workflow node. Defaults to workflowsFromSameOwner.\n\nAvailable options:\n- `any`: Any workflow can call this workflow (no restrictions)\n- `none`: No other workflows can call this workflow (completely blocked)\n- `workflowsFromSameOwner` (default): Only workflows owned by the same project can call this workflow\n- `workflowsFromAList`: Only the workflows listed in `callerIds` can call this workflow"},"callerIds":{"type":"string","description":"Comma-separated list of workflow IDs allowed to call this workflow (only used with the workflowsFromAList policy)"},"timeSavedMode":{"type":"string","enum":["fixed","dynamic"],"description":"Controls how the time saved per execution is calculated.\n\nAvailable options:\n- `fixed`: Uses the value in `timeSavedPerExecution`. Use when the time saved is the same for every execution.\n- `dynamic`: Calculates the time saved from actual execution metrics. `timeSavedPerExecution` is ignored."},"timeSavedPerExecution":{"type":"number","description":"Estimated time saved per execution in minutes"},"redactionPolicy":{"type":"string","enum":["none","non-manual","manual-only","all"],"description":"Controls whether execution data is redacted for this workflow.\n\nAvailable options:\n- `none` (default): No redaction. All execution data is stored.\n- `non-manual`: Redact production (non-manually triggered) executions only.\n- `manual-only`: Redact manually triggered executions only.\n- `all`: Redact all executions, manual and production."},"availableInMCP":{"type":"boolean","description":"Controls whether this workflow is reachable over the Model Context Protocol (MCP). Defaults to false. The workflow must be active and must hold at least one active Webhook node."},"customTelemetryTags":{"type":"array","items":{"type":"object","properties":{"key":{"type":"string"},"value":{"type":"string"}},"required":["key","value"],"additionalProperties":false}},"credentialResolverId":{"type":"string","description":"ID of the credential resolver that resolves credentials for this workflow. This is a derived, internal setting managed through the credential resolver configuration rather than something intended to be set programmatically. It is included in workflow responses for reference, but any value sent when creating or updating a workflow is ignored."}},"additionalProperties":false},"nodeGroups":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","description":"Unique identifier for the node group"},"name":{"type":"string","description":"Display name of the node group"},"description":{"type":"string","maxLength":155,"description":"Optional plain-text description of the node group"},"nodeIds":{"type":"array","items":{"type":"string"},"description":"IDs of the nodes that belong to this group"}},"required":["id","name","nodeIds"],"additionalProperties":false},"description":"Visual groupings of nodes shown as frames on the canvas"},"staticData":{"anyOf":[{"type":"string","format":"jsonString"},{"type":"object","additionalProperties":{"nullable":true}},{"nullable":true}],"description":"Data the workflow keeps between executions"},"pinData":{"type":"object","nullable":true,"additionalProperties":{"nullable":true},"description":"Pinned sample data for nodes, keyed by node name"},"projectId":{"type":"string","description":"Target project to create the workflow in. Defaults to the user's personal project."},"parentFolderId":{"type":"string","nullable":true,"description":"ID of the folder to place the workflow in. Omit or null to place at the project root."},"meta":{"type":"object","description":"Workflow metadata such as template information","readOnly":true,"properties":{"onboardingId":{"type":"string"},"templateId":{"type":"string"},"instanceId":{"type":"string"},"templateCredsSetupCompleted":{"type":"boolean"}},"nullable":true},"tags":{"type":"array","readOnly":true,"items":{"type":"object","additionalProperties":false,"required":["name"],"properties":{"id":{"type":"string","readOnly":true},"name":{"type":"string"},"createdAt":{"type":"string","format":"date-time","readOnly":true},"updatedAt":{"type":"string","format":"date-time","readOnly":true}}}},"shared":{"type":"array","items":{"type":"object","properties":{"role":{"type":"string"},"workflowId":{"type":"string"},"projectId":{"type":"string"},"project":{"type":"object","properties":{"id":{"type":"string","readOnly":true},"name":{"type":"string"},"type":{"type":"string","readOnly":true}}},"createdAt":{"type":"string","format":"date-time","readOnly":true},"updatedAt":{"type":"string","format":"date-time","readOnly":true}},"additionalProperties":false},"description":"Accepted for compatibility and ignored. The owner share is derived from the target project."},"activeVersion":{"type":"object","readOnly":true,"nullable":true,"additionalProperties":false,"properties":{"versionId":{"type":"string","readOnly":true,"description":"Unique identifier for this workflow version"},"workflowId":{"type":"string","readOnly":true,"description":"The workflow this version belongs to"},"nodes":{"type":"array","description":"Nodes that make up the workflow","items":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"webhookId":{"type":"string"},"disabled":{"type":"boolean"},"notesInFlow":{"type":"boolean"},"notes":{"type":"string"},"type":{"type":"string"},"typeVersion":{"type":"number"},"executeOnce":{"type":"boolean"},"alwaysOutputData":{"type":"boolean"},"retryOnFail":{"type":"boolean"},"maxTries":{"type":"number"},"waitBetweenTries":{"type":"number"},"continueOnFail":{"type":"boolean","description":"use onError instead","deprecated":true},"onError":{"type":"string"},"position":{"type":"array","items":{"type":"number"}},"parameters":{"type":"object","additionalProperties":true},"credentials":{"type":"object"},"customTelemetryTags":{"type":"object","additionalProperties":false,"properties":{"tag":{"type":"array","items":{"type":"object","additionalProperties":false,"required":["key","value"],"properties":{"key":{"type":"string"},"value":{"type":"string"}}}}}},"createdAt":{"type":"string","format":"date-time","readOnly":true},"updatedAt":{"type":"string","format":"date-time","readOnly":true}},"additionalProperties":false},"readOnly":true},"connections":{"type":"object","description":"Connections between nodes, keyed by source node name","readOnly":true},"nodeGroups":{"type":"array","description":"Visual groupings of nodes shown as frames on the canvas","items":{"type":"object","properties":{"id":{"type":"string","description":"Unique identifier for the node group"},"name":{"type":"string","description":"Display name of the node group"},"description":{"type":"string","maxLength":155,"description":"Optional plain-text description of the node group"},"nodeIds":{"type":"array","description":"IDs of the nodes that belong to this group","items":{"type":"string"}}},"required":["id","name","nodeIds"],"additionalProperties":false},"readOnly":true},"authors":{"type":"string","readOnly":true,"description":"Comma-separated list of author IDs who contributed to this version"},"name":{"type":"string","nullable":true,"readOnly":true,"description":"Optional name for this workflow version"},"description":{"type":"string","nullable":true,"readOnly":true,"description":"Optional description for this workflow version"},"autosaved":{"type":"boolean","readOnly":true,"description":"Whether this version was created by autosave"},"createdAt":{"type":"string","format":"date-time","readOnly":true},"updatedAt":{"type":"string","format":"date-time","readOnly":true}}}},"required":["name","nodes","connections","settings"],"additionalProperties":false}}}},"responses":{"200":{"description":"Operation successful.","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"description":{"type":"string","nullable":true},"active":{"type":"boolean"},"activeVersionId":{"type":"string","nullable":true},"createdAt":{"type":"string","format":"date-time"},"updatedAt":{"type":"string","format":"date-time"},"isArchived":{"type":"boolean"},"versionId":{"type":"string"},"versionCounter":{"type":"number"},"sourceWorkflowId":{"type":"string","nullable":true},"triggerCount":{"type":"number"},"nodes":{"type":"array","description":"Nodes that make up the workflow","items":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"webhookId":{"type":"string"},"disabled":{"type":"boolean"},"notesInFlow":{"type":"boolean"},"notes":{"type":"string"},"type":{"type":"string"},"typeVersion":{"type":"number"},"executeOnce":{"type":"boolean"},"alwaysOutputData":{"type":"boolean"},"retryOnFail":{"type":"boolean"},"maxTries":{"type":"number"},"waitBetweenTries":{"type":"number"},"continueOnFail":{"type":"boolean","description":"use onError instead","deprecated":true},"onError":{"type":"string"},"position":{"type":"array","items":{"type":"number"}},"parameters":{"type":"object","additionalProperties":true},"credentials":{"type":"object"},"customTelemetryTags":{"type":"object","properties":{"tag":{"type":"array","items":{"type":"object","properties":{"key":{"type":"string"},"value":{"type":"string"}},"required":["key","value"]}}}},"createdAt":{"type":"string","format":"date-time"},"updatedAt":{"type":"string","format":"date-time"}}}},"connections":{"type":"object","description":"Connections between nodes, keyed by source node name"},"nodeGroups":{"type":"array","description":"Visual groupings of nodes shown as frames on the canvas","items":{"type":"object","properties":{"id":{"type":"string","description":"Unique identifier for the node group"},"name":{"type":"string","description":"Display name of the node group"},"description":{"type":"string","maxLength":155,"description":"Optional plain-text description of the node group"},"nodeIds":{"type":"array","description":"IDs of the nodes that belong to this group","items":{"type":"string"}}},"required":["id","name","nodeIds"]}},"settings":{"type":"object","description":"Execution and behaviour settings for the workflow","properties":{"saveExecutionProgress":{"oneOf":[{"type":"boolean"},{"type":"string","enum":["DEFAULT"]}]},"saveManualExecutions":{"oneOf":[{"type":"boolean"},{"type":"string","enum":["DEFAULT"]}]},"saveDataErrorExecution":{"type":"string","enum":["DEFAULT","all","none"]},"saveDataSuccessExecution":{"type":"string","enum":["DEFAULT","all","none"]},"executionTimeout":{"type":"number"},"errorWorkflow":{"type":"string","description":"The ID of the workflow that contains the error trigger node."},"timezone":{"type":"string"},"executionOrder":{"type":"string"},"binaryMode":{"type":"string","enum":["separate","combined"],"description":"Controls how binary data is resolved from a node's input. This is a derived, internal setting rather than something intended to be set programmatically. It is included in workflow responses for reference, but any value sent when creating or updating a workflow is ignored."},"callerPolicy":{"type":"string","enum":["any","none","workflowsFromAList","workflowsFromSameOwner"],"description":"Controls which workflows are allowed to call this workflow using the Execute Workflow node. Defaults to workflowsFromSameOwner.\n\nAvailable options:\n- `any`: Any workflow can call this workflow (no restrictions)\n- `none`: No other workflows can call this workflow (completely blocked)\n- `workflowsFromSameOwner` (default): Only workflows owned by the same project can call this workflow\n- `workflowsFromAList`: Only the workflows listed in `callerIds` can call this workflow"},"callerIds":{"type":"string","description":"Comma-separated list of workflow IDs allowed to call this workflow (only used with the workflowsFromAList policy)"},"timeSavedMode":{"type":"string","enum":["fixed","dynamic"],"description":"Controls how the time saved per execution is calculated.\n\nAvailable options:\n- `fixed`: Uses the value in `timeSavedPerExecution`. Use when the time saved is the same for every execution.\n- `dynamic`: Calculates the time saved from actual execution metrics. `timeSavedPerExecution` is ignored."},"timeSavedPerExecution":{"type":"number","description":"Estimated time saved per execution in minutes"},"redactionPolicy":{"type":"string","enum":["none","non-manual","manual-only","all"],"description":"Controls whether execution data is redacted for this workflow.\n\nAvailable options:\n- `none` (default): No redaction. All execution data is stored.\n- `non-manual`: Redact production (non-manually triggered) executions only.\n- `manual-only`: Redact manually triggered executions only.\n- `all`: Redact all executions, manual and production."},"availableInMCP":{"type":"boolean","description":"Controls whether this workflow is reachable over the Model Context Protocol (MCP). Defaults to false. The workflow must be active and must hold at least one active Webhook node."},"customTelemetryTags":{"type":"array","items":{"type":"object","properties":{"key":{"type":"string"},"value":{"type":"string"}},"required":["key","value"]}},"credentialResolverId":{"type":"string","description":"ID of the credential resolver that resolves credentials for this workflow. This is a derived, internal setting managed through the credential resolver configuration rather than something intended to be set programmatically. It is included in workflow responses for reference, but any value sent when creating or updating a workflow is ignored."}},"nullable":true},"staticData":{"type":"object","description":"Data the workflow keeps between executions","nullable":true},"pinData":{"type":"object","description":"Pinned sample data for nodes, keyed by node name","nullable":true},"meta":{"type":"object","description":"Workflow metadata such as template information","properties":{"onboardingId":{"type":"string"},"templateId":{"type":"string"},"instanceId":{"type":"string"},"templateCredsSetupCompleted":{"type":"boolean"}},"nullable":true},"tags":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","readOnly":true},"name":{"type":"string"},"createdAt":{"type":"string","format":"date-time","readOnly":true},"updatedAt":{"type":"string","format":"date-time","readOnly":true}},"required":["id","name","createdAt","updatedAt"]}},"shared":{"type":"array","items":{"type":"object","properties":{"role":{"type":"string"},"workflowId":{"type":"string"},"projectId":{"type":"string"},"project":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"type":{"type":"string","enum":["personal","team"]},"icon":{"type":"object","nullable":true,"properties":{"type":{"type":"string","enum":["emoji","icon"]},"value":{"type":"string"}},"required":["type","value"]},"description":{"type":"string","nullable":true},"customTelemetryTags":{"type":"array","items":{"type":"object","properties":{"key":{"type":"string"},"value":{"type":"string"}},"required":["key","value"]}},"creatorId":{"type":"string","nullable":true},"createdAt":{"type":"string","format":"date-time"},"updatedAt":{"type":"string","format":"date-time"}},"required":["id","name","type","icon","description","customTelemetryTags","creatorId","createdAt","updatedAt"]},"createdAt":{"type":"string","format":"date-time"},"updatedAt":{"type":"string","format":"date-time"}},"required":["role","workflowId","projectId","project","createdAt","updatedAt"]}},"activeVersion":{"type":"object","nullable":true,"properties":{"versionId":{"type":"string"},"workflowId":{"type":"string"},"nodes":{"type":"array","description":"Nodes that make up the workflow","items":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"webhookId":{"type":"string"},"disabled":{"type":"boolean"},"notesInFlow":{"type":"boolean"},"notes":{"type":"string"},"type":{"type":"string"},"typeVersion":{"type":"number"},"executeOnce":{"type":"boolean"},"alwaysOutputData":{"type":"boolean"},"retryOnFail":{"type":"boolean"},"maxTries":{"type":"number"},"waitBetweenTries":{"type":"number"},"continueOnFail":{"type":"boolean","description":"use onError instead","deprecated":true},"onError":{"type":"string"},"position":{"type":"array","items":{"type":"number"}},"parameters":{"type":"object","additionalProperties":true},"credentials":{"type":"object"},"customTelemetryTags":{"type":"object","properties":{"tag":{"type":"array","items":{"type":"object","properties":{"key":{"type":"string"},"value":{"type":"string"}},"required":["key","value"]}}}},"createdAt":{"type":"string","format":"date-time"},"updatedAt":{"type":"string","format":"date-time"}}}},"connections":{"type":"object","description":"Connections between nodes, keyed by source node name"},"nodeGroups":{"type":"array","description":"Visual groupings of nodes shown as frames on the canvas","items":{"type":"object","properties":{"id":{"type":"string","description":"Unique identifier for the node group"},"name":{"type":"string","description":"Display name of the node group"},"description":{"type":"string","maxLength":155,"description":"Optional plain-text description of the node group"},"nodeIds":{"type":"array","description":"IDs of the nodes that belong to this group","items":{"type":"string"}}},"required":["id","name","nodeIds"]}},"authors":{"type":"string"},"name":{"type":"string","nullable":true},"description":{"type":"string","nullable":true},"autosaved":{"type":"boolean"},"createdAt":{"type":"string","format":"date-time"},"updatedAt":{"type":"string","format":"date-time"},"workflowPublishHistory":{"type":"array","items":{"type":"object","properties":{"id":{"type":"number"},"workflowId":{"type":"string"},"versionId":{"type":"string","nullable":true},"event":{"type":"string","enum":["activated","deactivated"]},"userId":{"type":"string","nullable":true},"createdAt":{"type":"string","format":"date-time"}},"required":["id","workflowId","versionId","event","userId","createdAt"]}}},"required":["versionId","workflowId","nodes","connections","nodeGroups","authors","name","description","autosaved","createdAt","updatedAt","workflowPublishHistory"]},"parentFolder":{"type":"object","nullable":true,"properties":{"id":{"type":"string"},"name":{"type":"string"},"parentFolderId":{"type":"string","nullable":true},"createdAt":{"type":"string","format":"date-time"},"updatedAt":{"type":"string","format":"date-time"}},"required":["id","name","parentFolderId","createdAt","updatedAt"],"description":"Folder the workflow was placed in, or null at the project root"}},"required":["id","name","description","active","activeVersionId","createdAt","updatedAt","isArchived","versionId","versionCounter","sourceWorkflowId","triggerCount","nodes","connections","nodeGroups","settings","staticData","meta","shared","activeVersion","parentFolder"]}}}},"400":{"$ref":"#/components/responses/badRequest"},"401":{"$ref":"#/components/responses/unauthorized"},"403":{"$ref":"#/components/responses/forbidden"},"404":{"$ref":"#/components/responses/notFound"},"415":{"$ref":"#/components/responses/unsupportedMediaType"},"422":{"$ref":"#/components/responses/unprocessableEntity"}}}}}}
```

## Retrieve a workflow

> Retrieve a workflow.

```json
{"openapi":"3.0.0","info":{"title":"n8n Public API","version":"1.1.1"},"tags":[{"name":"Workflow","description":"Operations about workflows"}],"servers":[{"url":"/api/v1","description":"Current n8n instance (self-hosted built-in playground)"},{"url":"{url}/api/v1","description":"Self-hosted n8n instance","variables":{"url":{"default":"https://example.com"}}}],"security":[{"ApiKeyAuth":[]},{"BearerAuth":[]},{"CookieAuth":[]}],"components":{"securitySchemes":{"ApiKeyAuth":{"type":"apiKey","in":"header","name":"X-N8N-API-KEY"},"BearerAuth":{"type":"http","scheme":"bearer","bearerFormat":"JWT"},"CookieAuth":{"type":"apiKey","in":"cookie","name":"n8n-auth"}},"schemas":{"workflowPublicDto.generated":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"description":{"type":"string","nullable":true},"active":{"type":"boolean"},"activeVersionId":{"type":"string","nullable":true},"createdAt":{"type":"string","format":"date-time"},"updatedAt":{"type":"string","format":"date-time"},"isArchived":{"type":"boolean"},"versionId":{"type":"string"},"versionCounter":{"type":"number"},"sourceWorkflowId":{"type":"string","nullable":true},"triggerCount":{"type":"number"},"nodes":{"type":"array","description":"Nodes that make up the workflow","items":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"webhookId":{"type":"string"},"disabled":{"type":"boolean"},"notesInFlow":{"type":"boolean"},"notes":{"type":"string"},"type":{"type":"string"},"typeVersion":{"type":"number"},"executeOnce":{"type":"boolean"},"alwaysOutputData":{"type":"boolean"},"retryOnFail":{"type":"boolean"},"maxTries":{"type":"number"},"waitBetweenTries":{"type":"number"},"continueOnFail":{"type":"boolean","description":"use onError instead","deprecated":true},"onError":{"type":"string"},"position":{"type":"array","items":{"type":"number"}},"parameters":{"type":"object","additionalProperties":true},"credentials":{"type":"object"},"customTelemetryTags":{"type":"object","properties":{"tag":{"type":"array","items":{"type":"object","properties":{"key":{"type":"string"},"value":{"type":"string"}},"required":["key","value"]}}}},"createdAt":{"type":"string","format":"date-time"},"updatedAt":{"type":"string","format":"date-time"}}}},"connections":{"type":"object","description":"Connections between nodes, keyed by source node name"},"nodeGroups":{"type":"array","description":"Visual groupings of nodes shown as frames on the canvas","items":{"type":"object","properties":{"id":{"type":"string","description":"Unique identifier for the node group"},"name":{"type":"string","description":"Display name of the node group"},"description":{"type":"string","maxLength":155,"description":"Optional plain-text description of the node group"},"nodeIds":{"type":"array","description":"IDs of the nodes that belong to this group","items":{"type":"string"}}},"required":["id","name","nodeIds"]}},"settings":{"type":"object","description":"Execution and behaviour settings for the workflow","properties":{"saveExecutionProgress":{"oneOf":[{"type":"boolean"},{"type":"string","enum":["DEFAULT"]}]},"saveManualExecutions":{"oneOf":[{"type":"boolean"},{"type":"string","enum":["DEFAULT"]}]},"saveDataErrorExecution":{"type":"string","enum":["DEFAULT","all","none"]},"saveDataSuccessExecution":{"type":"string","enum":["DEFAULT","all","none"]},"executionTimeout":{"type":"number"},"errorWorkflow":{"type":"string","description":"The ID of the workflow that contains the error trigger node."},"timezone":{"type":"string"},"executionOrder":{"type":"string"},"binaryMode":{"type":"string","enum":["separate","combined"],"description":"Controls how binary data is resolved from a node's input. This is a derived, internal setting rather than something intended to be set programmatically. It is included in workflow responses for reference, but any value sent when creating or updating a workflow is ignored."},"callerPolicy":{"type":"string","enum":["any","none","workflowsFromAList","workflowsFromSameOwner"],"description":"Controls which workflows are allowed to call this workflow using the Execute Workflow node. Defaults to workflowsFromSameOwner.\n\nAvailable options:\n- `any`: Any workflow can call this workflow (no restrictions)\n- `none`: No other workflows can call this workflow (completely blocked)\n- `workflowsFromSameOwner` (default): Only workflows owned by the same project can call this workflow\n- `workflowsFromAList`: Only the workflows listed in `callerIds` can call this workflow"},"callerIds":{"type":"string","description":"Comma-separated list of workflow IDs allowed to call this workflow (only used with the workflowsFromAList policy)"},"timeSavedMode":{"type":"string","enum":["fixed","dynamic"],"description":"Controls how the time saved per execution is calculated.\n\nAvailable options:\n- `fixed`: Uses the value in `timeSavedPerExecution`. Use when the time saved is the same for every execution.\n- `dynamic`: Calculates the time saved from actual execution metrics. `timeSavedPerExecution` is ignored."},"timeSavedPerExecution":{"type":"number","description":"Estimated time saved per execution in minutes"},"redactionPolicy":{"type":"string","enum":["none","non-manual","manual-only","all"],"description":"Controls whether execution data is redacted for this workflow.\n\nAvailable options:\n- `none` (default): No redaction. All execution data is stored.\n- `non-manual`: Redact production (non-manually triggered) executions only.\n- `manual-only`: Redact manually triggered executions only.\n- `all`: Redact all executions, manual and production."},"availableInMCP":{"type":"boolean","description":"Controls whether this workflow is reachable over the Model Context Protocol (MCP). Defaults to false. The workflow must be active and must hold at least one active Webhook node."},"customTelemetryTags":{"type":"array","items":{"type":"object","properties":{"key":{"type":"string"},"value":{"type":"string"}},"required":["key","value"]}},"credentialResolverId":{"type":"string","description":"ID of the credential resolver that resolves credentials for this workflow. This is a derived, internal setting managed through the credential resolver configuration rather than something intended to be set programmatically. It is included in workflow responses for reference, but any value sent when creating or updating a workflow is ignored."}},"nullable":true},"staticData":{"type":"object","description":"Data the workflow keeps between executions","nullable":true},"pinData":{"type":"object","description":"Pinned sample data for nodes, keyed by node name","nullable":true},"meta":{"type":"object","description":"Workflow metadata such as template information","properties":{"onboardingId":{"type":"string"},"templateId":{"type":"string"},"instanceId":{"type":"string"},"templateCredsSetupCompleted":{"type":"boolean"}},"nullable":true},"tags":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","readOnly":true},"name":{"type":"string"},"createdAt":{"type":"string","format":"date-time","readOnly":true},"updatedAt":{"type":"string","format":"date-time","readOnly":true}},"required":["id","name","createdAt","updatedAt"]}},"shared":{"type":"array","items":{"type":"object","properties":{"role":{"type":"string"},"workflowId":{"type":"string"},"projectId":{"type":"string"},"project":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"type":{"type":"string","enum":["personal","team"]},"icon":{"type":"object","nullable":true,"properties":{"type":{"type":"string","enum":["emoji","icon"]},"value":{"type":"string"}},"required":["type","value"]},"description":{"type":"string","nullable":true},"customTelemetryTags":{"type":"array","items":{"type":"object","properties":{"key":{"type":"string"},"value":{"type":"string"}},"required":["key","value"]}},"creatorId":{"type":"string","nullable":true},"createdAt":{"type":"string","format":"date-time"},"updatedAt":{"type":"string","format":"date-time"}},"required":["id","name","type","icon","description","customTelemetryTags","creatorId","createdAt","updatedAt"]},"createdAt":{"type":"string","format":"date-time"},"updatedAt":{"type":"string","format":"date-time"}},"required":["role","workflowId","projectId","project","createdAt","updatedAt"]}},"activeVersion":{"type":"object","nullable":true,"properties":{"versionId":{"type":"string"},"workflowId":{"type":"string"},"nodes":{"type":"array","description":"Nodes that make up the workflow","items":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"webhookId":{"type":"string"},"disabled":{"type":"boolean"},"notesInFlow":{"type":"boolean"},"notes":{"type":"string"},"type":{"type":"string"},"typeVersion":{"type":"number"},"executeOnce":{"type":"boolean"},"alwaysOutputData":{"type":"boolean"},"retryOnFail":{"type":"boolean"},"maxTries":{"type":"number"},"waitBetweenTries":{"type":"number"},"continueOnFail":{"type":"boolean","description":"use onError instead","deprecated":true},"onError":{"type":"string"},"position":{"type":"array","items":{"type":"number"}},"parameters":{"type":"object","additionalProperties":true},"credentials":{"type":"object"},"customTelemetryTags":{"type":"object","properties":{"tag":{"type":"array","items":{"type":"object","properties":{"key":{"type":"string"},"value":{"type":"string"}},"required":["key","value"]}}}},"createdAt":{"type":"string","format":"date-time"},"updatedAt":{"type":"string","format":"date-time"}}}},"connections":{"type":"object","description":"Connections between nodes, keyed by source node name"},"nodeGroups":{"type":"array","description":"Visual groupings of nodes shown as frames on the canvas","items":{"type":"object","properties":{"id":{"type":"string","description":"Unique identifier for the node group"},"name":{"type":"string","description":"Display name of the node group"},"description":{"type":"string","maxLength":155,"description":"Optional plain-text description of the node group"},"nodeIds":{"type":"array","description":"IDs of the nodes that belong to this group","items":{"type":"string"}}},"required":["id","name","nodeIds"]}},"authors":{"type":"string"},"name":{"type":"string","nullable":true},"description":{"type":"string","nullable":true},"autosaved":{"type":"boolean"},"createdAt":{"type":"string","format":"date-time"},"updatedAt":{"type":"string","format":"date-time"},"workflowPublishHistory":{"type":"array","items":{"type":"object","properties":{"id":{"type":"number"},"workflowId":{"type":"string"},"versionId":{"type":"string","nullable":true},"event":{"type":"string","enum":["activated","deactivated"]},"userId":{"type":"string","nullable":true},"createdAt":{"type":"string","format":"date-time"}},"required":["id","workflowId","versionId","event","userId","createdAt"]}}},"required":["versionId","workflowId","nodes","connections","nodeGroups","authors","name","description","autosaved","createdAt","updatedAt","workflowPublishHistory"]}},"required":["id","name","description","active","activeVersionId","createdAt","updatedAt","isArchived","versionId","versionCounter","sourceWorkflowId","triggerCount","nodes","connections","nodeGroups","settings","staticData","meta","shared","activeVersion"]}},"responses":{"badRequest":{"description":"The request is invalid or provides malformed data."},"unauthorized":{"description":"Unauthorized"},"forbidden":{"description":"Forbidden"},"notFound":{"description":"The specified resource was not found."}}},"paths":{"/workflows/{workflowId}":{"get":{"operationId":"getWorkflow","tags":["Workflow"],"summary":"Retrieve a workflow","description":"Retrieve a workflow.","parameters":[{"schema":{"type":"string"},"required":true,"name":"workflowId","in":"path"},{"schema":{"type":"string","enum":["true","false"],"default":"false"},"required":false,"name":"excludePinnedData","in":"query"}],"responses":{"200":{"description":"Operation successful.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/workflowPublicDto.generated"}}}},"400":{"$ref":"#/components/responses/badRequest"},"401":{"$ref":"#/components/responses/unauthorized"},"403":{"$ref":"#/components/responses/forbidden"},"404":{"$ref":"#/components/responses/notFound"}}}}}}
```

## Update a workflow

> Update a workflow. If the workflow is published, the updated version will be automatically re-published unless \`publishIfActive\` is set to \`false\`. Because that re-publication puts a new version live, it additionally requires the \`workflow:activate\` API key scope and the \`workflow:publish\` project permission. A caller without either can still save: the new version is stored as a draft and the response is a \`403\` naming the missing permission, leaving the published version live. Saving an unpublished workflow, or saving with \`publishIfActive=false\`, only needs \`workflow:update\`.

```json
{"openapi":"3.0.0","info":{"title":"n8n Public API","version":"1.1.1"},"tags":[{"name":"Workflow","description":"Operations about workflows"}],"servers":[{"url":"/api/v1","description":"Current n8n instance (self-hosted built-in playground)"},{"url":"{url}/api/v1","description":"Self-hosted n8n instance","variables":{"url":{"default":"https://example.com"}}}],"security":[{"ApiKeyAuth":[]},{"BearerAuth":[]},{"CookieAuth":[]}],"components":{"securitySchemes":{"ApiKeyAuth":{"type":"apiKey","in":"header","name":"X-N8N-API-KEY"},"BearerAuth":{"type":"http","scheme":"bearer","bearerFormat":"JWT"},"CookieAuth":{"type":"apiKey","in":"cookie","name":"n8n-auth"}},"responses":{"badRequest":{"description":"The request is invalid or provides malformed data."},"unauthorized":{"description":"Unauthorized"},"notFound":{"description":"The specified resource was not found."},"unsupportedMediaType":{"description":"Unsupported media type."},"unprocessableEntity":{"description":"Unprocessable Entity"}}},"paths":{"/workflows/{workflowId}":{"put":{"operationId":"updateWorkflow","tags":["Workflow"],"summary":"Update a workflow","description":"Update a workflow. If the workflow is published, the updated version will be automatically re-published unless `publishIfActive` is set to `false`. Because that re-publication puts a new version live, it additionally requires the `workflow:activate` API key scope and the `workflow:publish` project permission. A caller without either can still save: the new version is stored as a draft and the response is a `403` naming the missing permission, leaving the published version live. Saving an unpublished workflow, or saving with `publishIfActive=false`, only needs `workflow:update`.","parameters":[{"schema":{"type":"string"},"required":true,"name":"workflowId","in":"path"},{"schema":{"type":"string","enum":["true","false"],"default":"true","description":"Whether to publish the update if the workflow is currently published. Set to `false` to save the change as a draft on the existing published version instead of releasing it. Has no effect on a workflow that isn't currently published."},"required":false,"name":"publishIfActive","in":"query"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string","readOnly":true},"name":{"type":"string"},"active":{"type":"boolean","readOnly":true},"createdAt":{"type":"string","format":"date-time","readOnly":true},"updatedAt":{"type":"string","format":"date-time","readOnly":true},"isArchived":{"type":"boolean","readOnly":true},"versionId":{"type":"string","description":"Current version identifier used for optimistic locking","readOnly":true},"triggerCount":{"type":"integer","description":"Number of active trigger nodes in the workflow","readOnly":true},"nodes":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"webhookId":{"type":"string"},"disabled":{"type":"boolean"},"notesInFlow":{"type":"boolean"},"notes":{"type":"string"},"type":{"type":"string"},"typeVersion":{"type":"number"},"executeOnce":{"type":"boolean"},"alwaysOutputData":{"type":"boolean"},"retryOnFail":{"type":"boolean"},"maxTries":{"type":"number"},"waitBetweenTries":{"type":"number"},"continueOnFail":{"type":"boolean","description":"use onError instead","deprecated":true},"onError":{"type":"string"},"position":{"type":"array","items":{"type":"number"}},"parameters":{"type":"object","additionalProperties":{"nullable":true}},"credentials":{"type":"object","additionalProperties":{"nullable":true}},"customTelemetryTags":{"type":"object","properties":{"tag":{"type":"array","items":{"type":"object","properties":{"key":{"type":"string"},"value":{"type":"string"}},"required":["key","value"],"additionalProperties":false}}},"additionalProperties":false},"createdAt":{"type":"string","format":"date-time","readOnly":true},"updatedAt":{"type":"string","format":"date-time","readOnly":true}},"additionalProperties":false},"description":"Nodes that make up the workflow"},"connections":{"type":"object","description":"Connections between nodes, keyed by source node name"},"settings":{"type":"object","properties":{"saveExecutionProgress":{"type":"boolean"},"saveManualExecutions":{"type":"boolean"},"saveDataErrorExecution":{"type":"string","enum":["all","none"]},"saveDataSuccessExecution":{"type":"string","enum":["all","none"]},"executionTimeout":{"type":"number"},"errorWorkflow":{"type":"string","description":"The ID of the workflow that contains the error trigger node."},"timezone":{"type":"string"},"executionOrder":{"type":"string"},"binaryMode":{"type":"string","enum":["separate","combined"],"description":"Controls how binary data is resolved from a node's input. This is a derived, internal setting rather than something intended to be set programmatically. It is included in workflow responses for reference, but any value sent when creating or updating a workflow is ignored."},"callerPolicy":{"type":"string","enum":["any","none","workflowsFromAList","workflowsFromSameOwner"],"description":"Controls which workflows are allowed to call this workflow using the Execute Workflow node. Defaults to workflowsFromSameOwner.\n\nAvailable options:\n- `any`: Any workflow can call this workflow (no restrictions)\n- `none`: No other workflows can call this workflow (completely blocked)\n- `workflowsFromSameOwner` (default): Only workflows owned by the same project can call this workflow\n- `workflowsFromAList`: Only the workflows listed in `callerIds` can call this workflow"},"callerIds":{"type":"string","description":"Comma-separated list of workflow IDs allowed to call this workflow (only used with the workflowsFromAList policy)"},"timeSavedMode":{"type":"string","enum":["fixed","dynamic"],"description":"Controls how the time saved per execution is calculated.\n\nAvailable options:\n- `fixed`: Uses the value in `timeSavedPerExecution`. Use when the time saved is the same for every execution.\n- `dynamic`: Calculates the time saved from actual execution metrics. `timeSavedPerExecution` is ignored."},"timeSavedPerExecution":{"type":"number","description":"Estimated time saved per execution in minutes"},"redactionPolicy":{"type":"string","enum":["none","non-manual","manual-only","all"],"description":"Controls whether execution data is redacted for this workflow.\n\nAvailable options:\n- `none` (default): No redaction. All execution data is stored.\n- `non-manual`: Redact production (non-manually triggered) executions only.\n- `manual-only`: Redact manually triggered executions only.\n- `all`: Redact all executions, manual and production."},"availableInMCP":{"type":"boolean","description":"Controls whether this workflow is reachable over the Model Context Protocol (MCP). Defaults to false. The workflow must be active and must hold at least one active Webhook node."},"customTelemetryTags":{"type":"array","items":{"type":"object","properties":{"key":{"type":"string"},"value":{"type":"string"}},"required":["key","value"],"additionalProperties":false}},"credentialResolverId":{"type":"string","description":"ID of the credential resolver that resolves credentials for this workflow. This is a derived, internal setting managed through the credential resolver configuration rather than something intended to be set programmatically. It is included in workflow responses for reference, but any value sent when creating or updating a workflow is ignored."}},"additionalProperties":false},"nodeGroups":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","description":"Unique identifier for the node group"},"name":{"type":"string","description":"Display name of the node group"},"description":{"type":"string","maxLength":155,"description":"Optional plain-text description of the node group"},"nodeIds":{"type":"array","items":{"type":"string"},"description":"IDs of the nodes that belong to this group"}},"required":["id","name","nodeIds"],"additionalProperties":false},"description":"Visual groupings of nodes shown as frames on the canvas"},"staticData":{"anyOf":[{"type":"string","format":"jsonString"},{"type":"object","additionalProperties":{"nullable":true}},{"nullable":true}],"description":"Data the workflow keeps between executions"},"pinData":{"type":"object","nullable":true,"additionalProperties":{"nullable":true},"description":"Pinned sample data for nodes, keyed by node name"},"parentFolderId":{"type":"string","nullable":true,"description":"ID of the folder to move the workflow into. Pass null to move it to the project root; omit to leave its current folder unchanged.","writeOnly":true},"meta":{"type":"object","description":"Workflow metadata such as template information","readOnly":true,"properties":{"onboardingId":{"type":"string"},"templateId":{"type":"string"},"instanceId":{"type":"string"},"templateCredsSetupCompleted":{"type":"boolean"}},"nullable":true},"tags":{"type":"array","readOnly":true,"items":{"type":"object","additionalProperties":false,"required":["name"],"properties":{"id":{"type":"string","readOnly":true},"name":{"type":"string"},"createdAt":{"type":"string","format":"date-time","readOnly":true},"updatedAt":{"type":"string","format":"date-time","readOnly":true}}}},"shared":{"type":"array","items":{"type":"object","properties":{"role":{"type":"string"},"workflowId":{"type":"string"},"projectId":{"type":"string"},"project":{"type":"object","properties":{"id":{"type":"string","readOnly":true},"name":{"type":"string"},"type":{"type":"string","readOnly":true}}},"createdAt":{"type":"string","format":"date-time","readOnly":true},"updatedAt":{"type":"string","format":"date-time","readOnly":true}},"additionalProperties":false},"description":"Accepted for compatibility and ignored. The owner share is derived from the target project."},"activeVersion":{"type":"object","readOnly":true,"nullable":true,"additionalProperties":false,"properties":{"versionId":{"type":"string","readOnly":true,"description":"Unique identifier for this workflow version"},"workflowId":{"type":"string","readOnly":true,"description":"The workflow this version belongs to"},"nodes":{"type":"array","description":"Nodes that make up the workflow","items":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"webhookId":{"type":"string"},"disabled":{"type":"boolean"},"notesInFlow":{"type":"boolean"},"notes":{"type":"string"},"type":{"type":"string"},"typeVersion":{"type":"number"},"executeOnce":{"type":"boolean"},"alwaysOutputData":{"type":"boolean"},"retryOnFail":{"type":"boolean"},"maxTries":{"type":"number"},"waitBetweenTries":{"type":"number"},"continueOnFail":{"type":"boolean","description":"use onError instead","deprecated":true},"onError":{"type":"string"},"position":{"type":"array","items":{"type":"number"}},"parameters":{"type":"object","additionalProperties":true},"credentials":{"type":"object"},"customTelemetryTags":{"type":"object","additionalProperties":false,"properties":{"tag":{"type":"array","items":{"type":"object","additionalProperties":false,"required":["key","value"],"properties":{"key":{"type":"string"},"value":{"type":"string"}}}}}},"createdAt":{"type":"string","format":"date-time","readOnly":true},"updatedAt":{"type":"string","format":"date-time","readOnly":true}},"additionalProperties":false},"readOnly":true},"connections":{"type":"object","description":"Connections between nodes, keyed by source node name","readOnly":true},"nodeGroups":{"type":"array","description":"Visual groupings of nodes shown as frames on the canvas","items":{"type":"object","properties":{"id":{"type":"string","description":"Unique identifier for the node group"},"name":{"type":"string","description":"Display name of the node group"},"description":{"type":"string","maxLength":155,"description":"Optional plain-text description of the node group"},"nodeIds":{"type":"array","description":"IDs of the nodes that belong to this group","items":{"type":"string"}}},"required":["id","name","nodeIds"],"additionalProperties":false},"readOnly":true},"authors":{"type":"string","readOnly":true,"description":"Comma-separated list of author IDs who contributed to this version"},"name":{"type":"string","nullable":true,"readOnly":true,"description":"Optional name for this workflow version"},"description":{"type":"string","nullable":true,"readOnly":true,"description":"Optional description for this workflow version"},"autosaved":{"type":"boolean","readOnly":true,"description":"Whether this version was created by autosave"},"createdAt":{"type":"string","format":"date-time","readOnly":true},"updatedAt":{"type":"string","format":"date-time","readOnly":true}}},"description":{"type":"string","description":"Description of the workflow"}},"required":["name","nodes","connections","settings"],"additionalProperties":false}}}},"responses":{"200":{"description":"Operation successful.","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"description":{"type":"string","nullable":true},"active":{"type":"boolean"},"activeVersionId":{"type":"string","nullable":true},"createdAt":{"type":"string","format":"date-time"},"updatedAt":{"type":"string","format":"date-time"},"isArchived":{"type":"boolean"},"versionId":{"type":"string"},"versionCounter":{"type":"number"},"sourceWorkflowId":{"type":"string","nullable":true},"triggerCount":{"type":"number"},"nodes":{"type":"array","description":"Nodes that make up the workflow","items":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"webhookId":{"type":"string"},"disabled":{"type":"boolean"},"notesInFlow":{"type":"boolean"},"notes":{"type":"string"},"type":{"type":"string"},"typeVersion":{"type":"number"},"executeOnce":{"type":"boolean"},"alwaysOutputData":{"type":"boolean"},"retryOnFail":{"type":"boolean"},"maxTries":{"type":"number"},"waitBetweenTries":{"type":"number"},"continueOnFail":{"type":"boolean","description":"use onError instead","deprecated":true},"onError":{"type":"string"},"position":{"type":"array","items":{"type":"number"}},"parameters":{"type":"object","additionalProperties":true},"credentials":{"type":"object"},"customTelemetryTags":{"type":"object","properties":{"tag":{"type":"array","items":{"type":"object","properties":{"key":{"type":"string"},"value":{"type":"string"}},"required":["key","value"]}}}},"createdAt":{"type":"string","format":"date-time"},"updatedAt":{"type":"string","format":"date-time"}}}},"connections":{"type":"object","description":"Connections between nodes, keyed by source node name"},"nodeGroups":{"type":"array","description":"Visual groupings of nodes shown as frames on the canvas","items":{"type":"object","properties":{"id":{"type":"string","description":"Unique identifier for the node group"},"name":{"type":"string","description":"Display name of the node group"},"description":{"type":"string","maxLength":155,"description":"Optional plain-text description of the node group"},"nodeIds":{"type":"array","description":"IDs of the nodes that belong to this group","items":{"type":"string"}}},"required":["id","name","nodeIds"]}},"settings":{"type":"object","description":"Execution and behaviour settings for the workflow","properties":{"saveExecutionProgress":{"oneOf":[{"type":"boolean"},{"type":"string","enum":["DEFAULT"]}]},"saveManualExecutions":{"oneOf":[{"type":"boolean"},{"type":"string","enum":["DEFAULT"]}]},"saveDataErrorExecution":{"type":"string","enum":["DEFAULT","all","none"]},"saveDataSuccessExecution":{"type":"string","enum":["DEFAULT","all","none"]},"executionTimeout":{"type":"number"},"errorWorkflow":{"type":"string","description":"The ID of the workflow that contains the error trigger node."},"timezone":{"type":"string"},"executionOrder":{"type":"string"},"binaryMode":{"type":"string","enum":["separate","combined"],"description":"Controls how binary data is resolved from a node's input. This is a derived, internal setting rather than something intended to be set programmatically. It is included in workflow responses for reference, but any value sent when creating or updating a workflow is ignored."},"callerPolicy":{"type":"string","enum":["any","none","workflowsFromAList","workflowsFromSameOwner"],"description":"Controls which workflows are allowed to call this workflow using the Execute Workflow node. Defaults to workflowsFromSameOwner.\n\nAvailable options:\n- `any`: Any workflow can call this workflow (no restrictions)\n- `none`: No other workflows can call this workflow (completely blocked)\n- `workflowsFromSameOwner` (default): Only workflows owned by the same project can call this workflow\n- `workflowsFromAList`: Only the workflows listed in `callerIds` can call this workflow"},"callerIds":{"type":"string","description":"Comma-separated list of workflow IDs allowed to call this workflow (only used with the workflowsFromAList policy)"},"timeSavedMode":{"type":"string","enum":["fixed","dynamic"],"description":"Controls how the time saved per execution is calculated.\n\nAvailable options:\n- `fixed`: Uses the value in `timeSavedPerExecution`. Use when the time saved is the same for every execution.\n- `dynamic`: Calculates the time saved from actual execution metrics. `timeSavedPerExecution` is ignored."},"timeSavedPerExecution":{"type":"number","description":"Estimated time saved per execution in minutes"},"redactionPolicy":{"type":"string","enum":["none","non-manual","manual-only","all"],"description":"Controls whether execution data is redacted for this workflow.\n\nAvailable options:\n- `none` (default): No redaction. All execution data is stored.\n- `non-manual`: Redact production (non-manually triggered) executions only.\n- `manual-only`: Redact manually triggered executions only.\n- `all`: Redact all executions, manual and production."},"availableInMCP":{"type":"boolean","description":"Controls whether this workflow is reachable over the Model Context Protocol (MCP). Defaults to false. The workflow must be active and must hold at least one active Webhook node."},"customTelemetryTags":{"type":"array","items":{"type":"object","properties":{"key":{"type":"string"},"value":{"type":"string"}},"required":["key","value"]}},"credentialResolverId":{"type":"string","description":"ID of the credential resolver that resolves credentials for this workflow. This is a derived, internal setting managed through the credential resolver configuration rather than something intended to be set programmatically. It is included in workflow responses for reference, but any value sent when creating or updating a workflow is ignored."}},"nullable":true},"staticData":{"type":"object","description":"Data the workflow keeps between executions","nullable":true},"pinData":{"type":"object","description":"Pinned sample data for nodes, keyed by node name","nullable":true},"meta":{"type":"object","description":"Workflow metadata such as template information","properties":{"onboardingId":{"type":"string"},"templateId":{"type":"string"},"instanceId":{"type":"string"},"templateCredsSetupCompleted":{"type":"boolean"}},"nullable":true},"tags":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","readOnly":true},"name":{"type":"string"},"createdAt":{"type":"string","format":"date-time","readOnly":true},"updatedAt":{"type":"string","format":"date-time","readOnly":true}},"required":["id","name","createdAt","updatedAt"]}},"activeVersion":{"type":"object","nullable":true,"properties":{"versionId":{"type":"string"},"workflowId":{"type":"string"},"nodes":{"type":"array","description":"Nodes that make up the workflow","items":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"webhookId":{"type":"string"},"disabled":{"type":"boolean"},"notesInFlow":{"type":"boolean"},"notes":{"type":"string"},"type":{"type":"string"},"typeVersion":{"type":"number"},"executeOnce":{"type":"boolean"},"alwaysOutputData":{"type":"boolean"},"retryOnFail":{"type":"boolean"},"maxTries":{"type":"number"},"waitBetweenTries":{"type":"number"},"continueOnFail":{"type":"boolean","description":"use onError instead","deprecated":true},"onError":{"type":"string"},"position":{"type":"array","items":{"type":"number"}},"parameters":{"type":"object","additionalProperties":true},"credentials":{"type":"object"},"customTelemetryTags":{"type":"object","properties":{"tag":{"type":"array","items":{"type":"object","properties":{"key":{"type":"string"},"value":{"type":"string"}},"required":["key","value"]}}}},"createdAt":{"type":"string","format":"date-time"},"updatedAt":{"type":"string","format":"date-time"}}}},"connections":{"type":"object","description":"Connections between nodes, keyed by source node name"},"nodeGroups":{"type":"array","description":"Visual groupings of nodes shown as frames on the canvas","items":{"type":"object","properties":{"id":{"type":"string","description":"Unique identifier for the node group"},"name":{"type":"string","description":"Display name of the node group"},"description":{"type":"string","maxLength":155,"description":"Optional plain-text description of the node group"},"nodeIds":{"type":"array","description":"IDs of the nodes that belong to this group","items":{"type":"string"}}},"required":["id","name","nodeIds"]}},"authors":{"type":"string"},"name":{"type":"string","nullable":true},"description":{"type":"string","nullable":true},"autosaved":{"type":"boolean"},"createdAt":{"type":"string","format":"date-time"},"updatedAt":{"type":"string","format":"date-time"},"workflowPublishHistory":{"type":"array","items":{"type":"object","properties":{"id":{"type":"number"},"workflowId":{"type":"string"},"versionId":{"type":"string","nullable":true},"event":{"type":"string","enum":["activated","deactivated"]},"userId":{"type":"string","nullable":true},"createdAt":{"type":"string","format":"date-time"}},"required":["id","workflowId","versionId","event","userId","createdAt"]}}},"required":["versionId","workflowId","nodes","connections","nodeGroups","authors","name","description","autosaved","createdAt","updatedAt"]}},"required":["id","name","description","active","activeVersionId","createdAt","updatedAt","isArchived","versionId","versionCounter","sourceWorkflowId","triggerCount","nodes","connections","nodeGroups","settings","staticData","meta","activeVersion"]}}}},"400":{"$ref":"#/components/responses/badRequest"},"401":{"$ref":"#/components/responses/unauthorized"},"403":{"description":"The update would re-publish the workflow, but the API key lacks `workflow:activate` or the caller lacks `workflow:publish` on the project. The update is still saved as a draft, named by `versionId`, and the published version stays live.","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"},"reason":{"type":"string","enum":["insufficient_api_key_scope","insufficient_permissions"]},"versionId":{"type":"string"}},"required":["message"]}}}},"404":{"$ref":"#/components/responses/notFound"},"409":{"description":"Conflict, e.g. re-publication blocked by an open workflow review (then `reason` and `workflowReviewRequestId` are present; the update itself is still saved as a draft) or a webhook path conflict.","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"},"reason":{"type":"string","enum":["review_pending","changes_requested"]},"workflowReviewRequestId":{"type":"string"}},"required":["message"]}}}},"415":{"$ref":"#/components/responses/unsupportedMediaType"},"422":{"$ref":"#/components/responses/unprocessableEntity"}}}}}}
```

## Delete a workflow

> Delete a workflow.

```json
{"openapi":"3.0.0","info":{"title":"n8n Public API","version":"1.1.1"},"tags":[{"name":"Workflow","description":"Operations about workflows"}],"servers":[{"url":"/api/v1","description":"Current n8n instance (self-hosted built-in playground)"},{"url":"{url}/api/v1","description":"Self-hosted n8n instance","variables":{"url":{"default":"https://example.com"}}}],"security":[{"ApiKeyAuth":[]},{"BearerAuth":[]},{"CookieAuth":[]}],"components":{"securitySchemes":{"ApiKeyAuth":{"type":"apiKey","in":"header","name":"X-N8N-API-KEY"},"BearerAuth":{"type":"http","scheme":"bearer","bearerFormat":"JWT"},"CookieAuth":{"type":"apiKey","in":"cookie","name":"n8n-auth"}},"responses":{"unauthorized":{"description":"Unauthorized"},"forbidden":{"description":"Forbidden"},"notFound":{"description":"The specified resource was not found."},"conflict":{"description":"Conflict"}}},"paths":{"/workflows/{workflowId}":{"delete":{"operationId":"deleteWorkflow","tags":["Workflow"],"summary":"Delete a workflow","description":"Delete a workflow.","parameters":[{"schema":{"type":"string"},"required":true,"name":"workflowId","in":"path"}],"responses":{"200":{"description":"Operation successful.","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"description":{"type":"string","nullable":true},"active":{"type":"boolean"},"activeVersionId":{"type":"string","nullable":true},"createdAt":{"type":"string","format":"date-time"},"updatedAt":{"type":"string","format":"date-time"},"isArchived":{"type":"boolean"},"versionId":{"type":"string"},"versionCounter":{"type":"number"},"sourceWorkflowId":{"type":"string","nullable":true},"triggerCount":{"type":"number"},"nodes":{"type":"array","description":"Nodes that make up the workflow","items":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"webhookId":{"type":"string"},"disabled":{"type":"boolean"},"notesInFlow":{"type":"boolean"},"notes":{"type":"string"},"type":{"type":"string"},"typeVersion":{"type":"number"},"executeOnce":{"type":"boolean"},"alwaysOutputData":{"type":"boolean"},"retryOnFail":{"type":"boolean"},"maxTries":{"type":"number"},"waitBetweenTries":{"type":"number"},"continueOnFail":{"type":"boolean","description":"use onError instead","deprecated":true},"onError":{"type":"string"},"position":{"type":"array","items":{"type":"number"}},"parameters":{"type":"object","additionalProperties":true},"credentials":{"type":"object"},"customTelemetryTags":{"type":"object","properties":{"tag":{"type":"array","items":{"type":"object","properties":{"key":{"type":"string"},"value":{"type":"string"}},"required":["key","value"]}}}},"createdAt":{"type":"string","format":"date-time"},"updatedAt":{"type":"string","format":"date-time"}}}},"connections":{"type":"object","description":"Connections between nodes, keyed by source node name"},"nodeGroups":{"type":"array","description":"Visual groupings of nodes shown as frames on the canvas","items":{"type":"object","properties":{"id":{"type":"string","description":"Unique identifier for the node group"},"name":{"type":"string","description":"Display name of the node group"},"description":{"type":"string","maxLength":155,"description":"Optional plain-text description of the node group"},"nodeIds":{"type":"array","description":"IDs of the nodes that belong to this group","items":{"type":"string"}}},"required":["id","name","nodeIds"]}},"settings":{"type":"object","description":"Execution and behaviour settings for the workflow","properties":{"saveExecutionProgress":{"oneOf":[{"type":"boolean"},{"type":"string","enum":["DEFAULT"]}]},"saveManualExecutions":{"oneOf":[{"type":"boolean"},{"type":"string","enum":["DEFAULT"]}]},"saveDataErrorExecution":{"type":"string","enum":["DEFAULT","all","none"]},"saveDataSuccessExecution":{"type":"string","enum":["DEFAULT","all","none"]},"executionTimeout":{"type":"number"},"errorWorkflow":{"type":"string","description":"The ID of the workflow that contains the error trigger node."},"timezone":{"type":"string"},"executionOrder":{"type":"string"},"binaryMode":{"type":"string","enum":["separate","combined"],"description":"Controls how binary data is resolved from a node's input. This is a derived, internal setting rather than something intended to be set programmatically. It is included in workflow responses for reference, but any value sent when creating or updating a workflow is ignored."},"callerPolicy":{"type":"string","enum":["any","none","workflowsFromAList","workflowsFromSameOwner"],"description":"Controls which workflows are allowed to call this workflow using the Execute Workflow node. Defaults to workflowsFromSameOwner.\n\nAvailable options:\n- `any`: Any workflow can call this workflow (no restrictions)\n- `none`: No other workflows can call this workflow (completely blocked)\n- `workflowsFromSameOwner` (default): Only workflows owned by the same project can call this workflow\n- `workflowsFromAList`: Only the workflows listed in `callerIds` can call this workflow"},"callerIds":{"type":"string","description":"Comma-separated list of workflow IDs allowed to call this workflow (only used with the workflowsFromAList policy)"},"timeSavedMode":{"type":"string","enum":["fixed","dynamic"],"description":"Controls how the time saved per execution is calculated.\n\nAvailable options:\n- `fixed`: Uses the value in `timeSavedPerExecution`. Use when the time saved is the same for every execution.\n- `dynamic`: Calculates the time saved from actual execution metrics. `timeSavedPerExecution` is ignored."},"timeSavedPerExecution":{"type":"number","description":"Estimated time saved per execution in minutes"},"redactionPolicy":{"type":"string","enum":["none","non-manual","manual-only","all"],"description":"Controls whether execution data is redacted for this workflow.\n\nAvailable options:\n- `none` (default): No redaction. All execution data is stored.\n- `non-manual`: Redact production (non-manually triggered) executions only.\n- `manual-only`: Redact manually triggered executions only.\n- `all`: Redact all executions, manual and production."},"availableInMCP":{"type":"boolean","description":"Controls whether this workflow is reachable over the Model Context Protocol (MCP). Defaults to false. The workflow must be active and must hold at least one active Webhook node."},"customTelemetryTags":{"type":"array","items":{"type":"object","properties":{"key":{"type":"string"},"value":{"type":"string"}},"required":["key","value"]}},"credentialResolverId":{"type":"string","description":"ID of the credential resolver that resolves credentials for this workflow. This is a derived, internal setting managed through the credential resolver configuration rather than something intended to be set programmatically. It is included in workflow responses for reference, but any value sent when creating or updating a workflow is ignored."}},"nullable":true},"staticData":{"type":"object","description":"Data the workflow keeps between executions","nullable":true},"pinData":{"type":"object","description":"Pinned sample data for nodes, keyed by node name","nullable":true},"meta":{"type":"object","description":"Workflow metadata such as template information","properties":{"onboardingId":{"type":"string"},"templateId":{"type":"string"},"instanceId":{"type":"string"},"templateCredsSetupCompleted":{"type":"boolean"}},"nullable":true},"tags":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","readOnly":true},"name":{"type":"string"},"createdAt":{"type":"string","format":"date-time","readOnly":true},"updatedAt":{"type":"string","format":"date-time","readOnly":true}},"required":["id","name","createdAt","updatedAt"]}},"shared":{"type":"array","items":{"type":"object","properties":{"role":{"type":"string"},"workflowId":{"type":"string"},"projectId":{"type":"string"},"project":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"type":{"type":"string","enum":["personal","team"]},"icon":{"type":"object","nullable":true,"properties":{"type":{"type":"string","enum":["emoji","icon"]},"value":{"type":"string"}},"required":["type","value"]},"description":{"type":"string","nullable":true},"customTelemetryTags":{"type":"array","items":{"type":"object","properties":{"key":{"type":"string"},"value":{"type":"string"}},"required":["key","value"]}},"creatorId":{"type":"string","nullable":true},"createdAt":{"type":"string","format":"date-time"},"updatedAt":{"type":"string","format":"date-time"}},"required":["id","name","type","icon","description","customTelemetryTags","creatorId","createdAt","updatedAt"]},"createdAt":{"type":"string","format":"date-time"},"updatedAt":{"type":"string","format":"date-time"}},"required":["role","workflowId","projectId","project","createdAt","updatedAt"]}},"activeVersion":{"type":"object","nullable":true,"properties":{"versionId":{"type":"string"},"workflowId":{"type":"string"},"nodes":{"type":"array","description":"Nodes that make up the workflow","items":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"webhookId":{"type":"string"},"disabled":{"type":"boolean"},"notesInFlow":{"type":"boolean"},"notes":{"type":"string"},"type":{"type":"string"},"typeVersion":{"type":"number"},"executeOnce":{"type":"boolean"},"alwaysOutputData":{"type":"boolean"},"retryOnFail":{"type":"boolean"},"maxTries":{"type":"number"},"waitBetweenTries":{"type":"number"},"continueOnFail":{"type":"boolean","description":"use onError instead","deprecated":true},"onError":{"type":"string"},"position":{"type":"array","items":{"type":"number"}},"parameters":{"type":"object","additionalProperties":true},"credentials":{"type":"object"},"customTelemetryTags":{"type":"object","properties":{"tag":{"type":"array","items":{"type":"object","properties":{"key":{"type":"string"},"value":{"type":"string"}},"required":["key","value"]}}}},"createdAt":{"type":"string","format":"date-time"},"updatedAt":{"type":"string","format":"date-time"}}}},"connections":{"type":"object","description":"Connections between nodes, keyed by source node name"},"nodeGroups":{"type":"array","description":"Visual groupings of nodes shown as frames on the canvas","items":{"type":"object","properties":{"id":{"type":"string","description":"Unique identifier for the node group"},"name":{"type":"string","description":"Display name of the node group"},"description":{"type":"string","maxLength":155,"description":"Optional plain-text description of the node group"},"nodeIds":{"type":"array","description":"IDs of the nodes that belong to this group","items":{"type":"string"}}},"required":["id","name","nodeIds"]}},"authors":{"type":"string"},"name":{"type":"string","nullable":true},"description":{"type":"string","nullable":true},"autosaved":{"type":"boolean"},"createdAt":{"type":"string","format":"date-time"},"updatedAt":{"type":"string","format":"date-time"},"workflowPublishHistory":{"type":"array","items":{"type":"object","properties":{"id":{"type":"number"},"workflowId":{"type":"string"},"versionId":{"type":"string","nullable":true},"event":{"type":"string","enum":["activated","deactivated"]},"userId":{"type":"string","nullable":true},"createdAt":{"type":"string","format":"date-time"}},"required":["id","workflowId","versionId","event","userId","createdAt"]}}},"required":["versionId","workflowId","nodes","connections","nodeGroups","authors","name","description","autosaved","createdAt","updatedAt","workflowPublishHistory"]}},"required":["id","name","description","active","activeVersionId","createdAt","updatedAt","isArchived","versionId","versionCounter","sourceWorkflowId","triggerCount","nodes","connections","nodeGroups","settings","staticData","meta","shared"]}}}},"401":{"$ref":"#/components/responses/unauthorized"},"403":{"$ref":"#/components/responses/forbidden"},"404":{"$ref":"#/components/responses/notFound"},"409":{"$ref":"#/components/responses/conflict"}}}}}}
```

## Archive a workflow

> Soft-deletes a workflow by archiving it. Idempotent: archiving an already archived workflow returns 200 with the current workflow.

```json
{"openapi":"3.0.0","info":{"title":"n8n Public API","version":"1.1.1"},"tags":[{"name":"Workflow","description":"Operations about workflows"}],"servers":[{"url":"/api/v1","description":"Current n8n instance (self-hosted built-in playground)"},{"url":"{url}/api/v1","description":"Self-hosted n8n instance","variables":{"url":{"default":"https://example.com"}}}],"security":[{"ApiKeyAuth":[]},{"BearerAuth":[]},{"CookieAuth":[]}],"components":{"securitySchemes":{"ApiKeyAuth":{"type":"apiKey","in":"header","name":"X-N8N-API-KEY"},"BearerAuth":{"type":"http","scheme":"bearer","bearerFormat":"JWT"},"CookieAuth":{"type":"apiKey","in":"cookie","name":"n8n-auth"}},"schemas":{"workflowPublicDto.generated":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"description":{"type":"string","nullable":true},"active":{"type":"boolean"},"activeVersionId":{"type":"string","nullable":true},"createdAt":{"type":"string","format":"date-time"},"updatedAt":{"type":"string","format":"date-time"},"isArchived":{"type":"boolean"},"versionId":{"type":"string"},"versionCounter":{"type":"number"},"sourceWorkflowId":{"type":"string","nullable":true},"triggerCount":{"type":"number"},"nodes":{"type":"array","description":"Nodes that make up the workflow","items":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"webhookId":{"type":"string"},"disabled":{"type":"boolean"},"notesInFlow":{"type":"boolean"},"notes":{"type":"string"},"type":{"type":"string"},"typeVersion":{"type":"number"},"executeOnce":{"type":"boolean"},"alwaysOutputData":{"type":"boolean"},"retryOnFail":{"type":"boolean"},"maxTries":{"type":"number"},"waitBetweenTries":{"type":"number"},"continueOnFail":{"type":"boolean","description":"use onError instead","deprecated":true},"onError":{"type":"string"},"position":{"type":"array","items":{"type":"number"}},"parameters":{"type":"object","additionalProperties":true},"credentials":{"type":"object"},"customTelemetryTags":{"type":"object","properties":{"tag":{"type":"array","items":{"type":"object","properties":{"key":{"type":"string"},"value":{"type":"string"}},"required":["key","value"]}}}},"createdAt":{"type":"string","format":"date-time"},"updatedAt":{"type":"string","format":"date-time"}}}},"connections":{"type":"object","description":"Connections between nodes, keyed by source node name"},"nodeGroups":{"type":"array","description":"Visual groupings of nodes shown as frames on the canvas","items":{"type":"object","properties":{"id":{"type":"string","description":"Unique identifier for the node group"},"name":{"type":"string","description":"Display name of the node group"},"description":{"type":"string","maxLength":155,"description":"Optional plain-text description of the node group"},"nodeIds":{"type":"array","description":"IDs of the nodes that belong to this group","items":{"type":"string"}}},"required":["id","name","nodeIds"]}},"settings":{"type":"object","description":"Execution and behaviour settings for the workflow","properties":{"saveExecutionProgress":{"oneOf":[{"type":"boolean"},{"type":"string","enum":["DEFAULT"]}]},"saveManualExecutions":{"oneOf":[{"type":"boolean"},{"type":"string","enum":["DEFAULT"]}]},"saveDataErrorExecution":{"type":"string","enum":["DEFAULT","all","none"]},"saveDataSuccessExecution":{"type":"string","enum":["DEFAULT","all","none"]},"executionTimeout":{"type":"number"},"errorWorkflow":{"type":"string","description":"The ID of the workflow that contains the error trigger node."},"timezone":{"type":"string"},"executionOrder":{"type":"string"},"binaryMode":{"type":"string","enum":["separate","combined"],"description":"Controls how binary data is resolved from a node's input. This is a derived, internal setting rather than something intended to be set programmatically. It is included in workflow responses for reference, but any value sent when creating or updating a workflow is ignored."},"callerPolicy":{"type":"string","enum":["any","none","workflowsFromAList","workflowsFromSameOwner"],"description":"Controls which workflows are allowed to call this workflow using the Execute Workflow node. Defaults to workflowsFromSameOwner.\n\nAvailable options:\n- `any`: Any workflow can call this workflow (no restrictions)\n- `none`: No other workflows can call this workflow (completely blocked)\n- `workflowsFromSameOwner` (default): Only workflows owned by the same project can call this workflow\n- `workflowsFromAList`: Only the workflows listed in `callerIds` can call this workflow"},"callerIds":{"type":"string","description":"Comma-separated list of workflow IDs allowed to call this workflow (only used with the workflowsFromAList policy)"},"timeSavedMode":{"type":"string","enum":["fixed","dynamic"],"description":"Controls how the time saved per execution is calculated.\n\nAvailable options:\n- `fixed`: Uses the value in `timeSavedPerExecution`. Use when the time saved is the same for every execution.\n- `dynamic`: Calculates the time saved from actual execution metrics. `timeSavedPerExecution` is ignored."},"timeSavedPerExecution":{"type":"number","description":"Estimated time saved per execution in minutes"},"redactionPolicy":{"type":"string","enum":["none","non-manual","manual-only","all"],"description":"Controls whether execution data is redacted for this workflow.\n\nAvailable options:\n- `none` (default): No redaction. All execution data is stored.\n- `non-manual`: Redact production (non-manually triggered) executions only.\n- `manual-only`: Redact manually triggered executions only.\n- `all`: Redact all executions, manual and production."},"availableInMCP":{"type":"boolean","description":"Controls whether this workflow is reachable over the Model Context Protocol (MCP). Defaults to false. The workflow must be active and must hold at least one active Webhook node."},"customTelemetryTags":{"type":"array","items":{"type":"object","properties":{"key":{"type":"string"},"value":{"type":"string"}},"required":["key","value"]}},"credentialResolverId":{"type":"string","description":"ID of the credential resolver that resolves credentials for this workflow. This is a derived, internal setting managed through the credential resolver configuration rather than something intended to be set programmatically. It is included in workflow responses for reference, but any value sent when creating or updating a workflow is ignored."}},"nullable":true},"staticData":{"type":"object","description":"Data the workflow keeps between executions","nullable":true},"pinData":{"type":"object","description":"Pinned sample data for nodes, keyed by node name","nullable":true},"meta":{"type":"object","description":"Workflow metadata such as template information","properties":{"onboardingId":{"type":"string"},"templateId":{"type":"string"},"instanceId":{"type":"string"},"templateCredsSetupCompleted":{"type":"boolean"}},"nullable":true},"tags":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","readOnly":true},"name":{"type":"string"},"createdAt":{"type":"string","format":"date-time","readOnly":true},"updatedAt":{"type":"string","format":"date-time","readOnly":true}},"required":["id","name","createdAt","updatedAt"]}},"shared":{"type":"array","items":{"type":"object","properties":{"role":{"type":"string"},"workflowId":{"type":"string"},"projectId":{"type":"string"},"project":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"type":{"type":"string","enum":["personal","team"]},"icon":{"type":"object","nullable":true,"properties":{"type":{"type":"string","enum":["emoji","icon"]},"value":{"type":"string"}},"required":["type","value"]},"description":{"type":"string","nullable":true},"customTelemetryTags":{"type":"array","items":{"type":"object","properties":{"key":{"type":"string"},"value":{"type":"string"}},"required":["key","value"]}},"creatorId":{"type":"string","nullable":true},"createdAt":{"type":"string","format":"date-time"},"updatedAt":{"type":"string","format":"date-time"}},"required":["id","name","type","icon","description","customTelemetryTags","creatorId","createdAt","updatedAt"]},"createdAt":{"type":"string","format":"date-time"},"updatedAt":{"type":"string","format":"date-time"}},"required":["role","workflowId","projectId","project","createdAt","updatedAt"]}},"activeVersion":{"type":"object","nullable":true,"properties":{"versionId":{"type":"string"},"workflowId":{"type":"string"},"nodes":{"type":"array","description":"Nodes that make up the workflow","items":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"webhookId":{"type":"string"},"disabled":{"type":"boolean"},"notesInFlow":{"type":"boolean"},"notes":{"type":"string"},"type":{"type":"string"},"typeVersion":{"type":"number"},"executeOnce":{"type":"boolean"},"alwaysOutputData":{"type":"boolean"},"retryOnFail":{"type":"boolean"},"maxTries":{"type":"number"},"waitBetweenTries":{"type":"number"},"continueOnFail":{"type":"boolean","description":"use onError instead","deprecated":true},"onError":{"type":"string"},"position":{"type":"array","items":{"type":"number"}},"parameters":{"type":"object","additionalProperties":true},"credentials":{"type":"object"},"customTelemetryTags":{"type":"object","properties":{"tag":{"type":"array","items":{"type":"object","properties":{"key":{"type":"string"},"value":{"type":"string"}},"required":["key","value"]}}}},"createdAt":{"type":"string","format":"date-time"},"updatedAt":{"type":"string","format":"date-time"}}}},"connections":{"type":"object","description":"Connections between nodes, keyed by source node name"},"nodeGroups":{"type":"array","description":"Visual groupings of nodes shown as frames on the canvas","items":{"type":"object","properties":{"id":{"type":"string","description":"Unique identifier for the node group"},"name":{"type":"string","description":"Display name of the node group"},"description":{"type":"string","maxLength":155,"description":"Optional plain-text description of the node group"},"nodeIds":{"type":"array","description":"IDs of the nodes that belong to this group","items":{"type":"string"}}},"required":["id","name","nodeIds"]}},"authors":{"type":"string"},"name":{"type":"string","nullable":true},"description":{"type":"string","nullable":true},"autosaved":{"type":"boolean"},"createdAt":{"type":"string","format":"date-time"},"updatedAt":{"type":"string","format":"date-time"},"workflowPublishHistory":{"type":"array","items":{"type":"object","properties":{"id":{"type":"number"},"workflowId":{"type":"string"},"versionId":{"type":"string","nullable":true},"event":{"type":"string","enum":["activated","deactivated"]},"userId":{"type":"string","nullable":true},"createdAt":{"type":"string","format":"date-time"}},"required":["id","workflowId","versionId","event","userId","createdAt"]}}},"required":["versionId","workflowId","nodes","connections","nodeGroups","authors","name","description","autosaved","createdAt","updatedAt","workflowPublishHistory"]}},"required":["id","name","description","active","activeVersionId","createdAt","updatedAt","isArchived","versionId","versionCounter","sourceWorkflowId","triggerCount","nodes","connections","nodeGroups","settings","staticData","meta","shared","activeVersion"]}},"responses":{"unauthorized":{"description":"Unauthorized"},"forbidden":{"description":"Forbidden"},"notFound":{"description":"The specified resource was not found."}}},"paths":{"/workflows/{workflowId}/archive":{"post":{"operationId":"archiveWorkflow","tags":["Workflow"],"summary":"Archive a workflow","description":"Soft-deletes a workflow by archiving it. Idempotent: archiving an already archived workflow returns 200 with the current workflow.","parameters":[{"schema":{"type":"string"},"required":true,"name":"workflowId","in":"path"}],"responses":{"200":{"description":"Operation successful.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/workflowPublicDto.generated"}}}},"401":{"$ref":"#/components/responses/unauthorized"},"403":{"$ref":"#/components/responses/forbidden"},"404":{"$ref":"#/components/responses/notFound"}}}}}}
```

## Unarchive a workflow

> Restores an archived workflow.

```json
{"openapi":"3.0.0","info":{"title":"n8n Public API","version":"1.1.1"},"tags":[{"name":"Workflow","description":"Operations about workflows"}],"servers":[{"url":"/api/v1","description":"Current n8n instance (self-hosted built-in playground)"},{"url":"{url}/api/v1","description":"Self-hosted n8n instance","variables":{"url":{"default":"https://example.com"}}}],"security":[{"ApiKeyAuth":[]},{"BearerAuth":[]},{"CookieAuth":[]}],"components":{"securitySchemes":{"ApiKeyAuth":{"type":"apiKey","in":"header","name":"X-N8N-API-KEY"},"BearerAuth":{"type":"http","scheme":"bearer","bearerFormat":"JWT"},"CookieAuth":{"type":"apiKey","in":"cookie","name":"n8n-auth"}},"schemas":{"workflowPublicDto.generated":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"description":{"type":"string","nullable":true},"active":{"type":"boolean"},"activeVersionId":{"type":"string","nullable":true},"createdAt":{"type":"string","format":"date-time"},"updatedAt":{"type":"string","format":"date-time"},"isArchived":{"type":"boolean"},"versionId":{"type":"string"},"versionCounter":{"type":"number"},"sourceWorkflowId":{"type":"string","nullable":true},"triggerCount":{"type":"number"},"nodes":{"type":"array","description":"Nodes that make up the workflow","items":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"webhookId":{"type":"string"},"disabled":{"type":"boolean"},"notesInFlow":{"type":"boolean"},"notes":{"type":"string"},"type":{"type":"string"},"typeVersion":{"type":"number"},"executeOnce":{"type":"boolean"},"alwaysOutputData":{"type":"boolean"},"retryOnFail":{"type":"boolean"},"maxTries":{"type":"number"},"waitBetweenTries":{"type":"number"},"continueOnFail":{"type":"boolean","description":"use onError instead","deprecated":true},"onError":{"type":"string"},"position":{"type":"array","items":{"type":"number"}},"parameters":{"type":"object","additionalProperties":true},"credentials":{"type":"object"},"customTelemetryTags":{"type":"object","properties":{"tag":{"type":"array","items":{"type":"object","properties":{"key":{"type":"string"},"value":{"type":"string"}},"required":["key","value"]}}}},"createdAt":{"type":"string","format":"date-time"},"updatedAt":{"type":"string","format":"date-time"}}}},"connections":{"type":"object","description":"Connections between nodes, keyed by source node name"},"nodeGroups":{"type":"array","description":"Visual groupings of nodes shown as frames on the canvas","items":{"type":"object","properties":{"id":{"type":"string","description":"Unique identifier for the node group"},"name":{"type":"string","description":"Display name of the node group"},"description":{"type":"string","maxLength":155,"description":"Optional plain-text description of the node group"},"nodeIds":{"type":"array","description":"IDs of the nodes that belong to this group","items":{"type":"string"}}},"required":["id","name","nodeIds"]}},"settings":{"type":"object","description":"Execution and behaviour settings for the workflow","properties":{"saveExecutionProgress":{"oneOf":[{"type":"boolean"},{"type":"string","enum":["DEFAULT"]}]},"saveManualExecutions":{"oneOf":[{"type":"boolean"},{"type":"string","enum":["DEFAULT"]}]},"saveDataErrorExecution":{"type":"string","enum":["DEFAULT","all","none"]},"saveDataSuccessExecution":{"type":"string","enum":["DEFAULT","all","none"]},"executionTimeout":{"type":"number"},"errorWorkflow":{"type":"string","description":"The ID of the workflow that contains the error trigger node."},"timezone":{"type":"string"},"executionOrder":{"type":"string"},"binaryMode":{"type":"string","enum":["separate","combined"],"description":"Controls how binary data is resolved from a node's input. This is a derived, internal setting rather than something intended to be set programmatically. It is included in workflow responses for reference, but any value sent when creating or updating a workflow is ignored."},"callerPolicy":{"type":"string","enum":["any","none","workflowsFromAList","workflowsFromSameOwner"],"description":"Controls which workflows are allowed to call this workflow using the Execute Workflow node. Defaults to workflowsFromSameOwner.\n\nAvailable options:\n- `any`: Any workflow can call this workflow (no restrictions)\n- `none`: No other workflows can call this workflow (completely blocked)\n- `workflowsFromSameOwner` (default): Only workflows owned by the same project can call this workflow\n- `workflowsFromAList`: Only the workflows listed in `callerIds` can call this workflow"},"callerIds":{"type":"string","description":"Comma-separated list of workflow IDs allowed to call this workflow (only used with the workflowsFromAList policy)"},"timeSavedMode":{"type":"string","enum":["fixed","dynamic"],"description":"Controls how the time saved per execution is calculated.\n\nAvailable options:\n- `fixed`: Uses the value in `timeSavedPerExecution`. Use when the time saved is the same for every execution.\n- `dynamic`: Calculates the time saved from actual execution metrics. `timeSavedPerExecution` is ignored."},"timeSavedPerExecution":{"type":"number","description":"Estimated time saved per execution in minutes"},"redactionPolicy":{"type":"string","enum":["none","non-manual","manual-only","all"],"description":"Controls whether execution data is redacted for this workflow.\n\nAvailable options:\n- `none` (default): No redaction. All execution data is stored.\n- `non-manual`: Redact production (non-manually triggered) executions only.\n- `manual-only`: Redact manually triggered executions only.\n- `all`: Redact all executions, manual and production."},"availableInMCP":{"type":"boolean","description":"Controls whether this workflow is reachable over the Model Context Protocol (MCP). Defaults to false. The workflow must be active and must hold at least one active Webhook node."},"customTelemetryTags":{"type":"array","items":{"type":"object","properties":{"key":{"type":"string"},"value":{"type":"string"}},"required":["key","value"]}},"credentialResolverId":{"type":"string","description":"ID of the credential resolver that resolves credentials for this workflow. This is a derived, internal setting managed through the credential resolver configuration rather than something intended to be set programmatically. It is included in workflow responses for reference, but any value sent when creating or updating a workflow is ignored."}},"nullable":true},"staticData":{"type":"object","description":"Data the workflow keeps between executions","nullable":true},"pinData":{"type":"object","description":"Pinned sample data for nodes, keyed by node name","nullable":true},"meta":{"type":"object","description":"Workflow metadata such as template information","properties":{"onboardingId":{"type":"string"},"templateId":{"type":"string"},"instanceId":{"type":"string"},"templateCredsSetupCompleted":{"type":"boolean"}},"nullable":true},"tags":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","readOnly":true},"name":{"type":"string"},"createdAt":{"type":"string","format":"date-time","readOnly":true},"updatedAt":{"type":"string","format":"date-time","readOnly":true}},"required":["id","name","createdAt","updatedAt"]}},"shared":{"type":"array","items":{"type":"object","properties":{"role":{"type":"string"},"workflowId":{"type":"string"},"projectId":{"type":"string"},"project":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"type":{"type":"string","enum":["personal","team"]},"icon":{"type":"object","nullable":true,"properties":{"type":{"type":"string","enum":["emoji","icon"]},"value":{"type":"string"}},"required":["type","value"]},"description":{"type":"string","nullable":true},"customTelemetryTags":{"type":"array","items":{"type":"object","properties":{"key":{"type":"string"},"value":{"type":"string"}},"required":["key","value"]}},"creatorId":{"type":"string","nullable":true},"createdAt":{"type":"string","format":"date-time"},"updatedAt":{"type":"string","format":"date-time"}},"required":["id","name","type","icon","description","customTelemetryTags","creatorId","createdAt","updatedAt"]},"createdAt":{"type":"string","format":"date-time"},"updatedAt":{"type":"string","format":"date-time"}},"required":["role","workflowId","projectId","project","createdAt","updatedAt"]}},"activeVersion":{"type":"object","nullable":true,"properties":{"versionId":{"type":"string"},"workflowId":{"type":"string"},"nodes":{"type":"array","description":"Nodes that make up the workflow","items":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"webhookId":{"type":"string"},"disabled":{"type":"boolean"},"notesInFlow":{"type":"boolean"},"notes":{"type":"string"},"type":{"type":"string"},"typeVersion":{"type":"number"},"executeOnce":{"type":"boolean"},"alwaysOutputData":{"type":"boolean"},"retryOnFail":{"type":"boolean"},"maxTries":{"type":"number"},"waitBetweenTries":{"type":"number"},"continueOnFail":{"type":"boolean","description":"use onError instead","deprecated":true},"onError":{"type":"string"},"position":{"type":"array","items":{"type":"number"}},"parameters":{"type":"object","additionalProperties":true},"credentials":{"type":"object"},"customTelemetryTags":{"type":"object","properties":{"tag":{"type":"array","items":{"type":"object","properties":{"key":{"type":"string"},"value":{"type":"string"}},"required":["key","value"]}}}},"createdAt":{"type":"string","format":"date-time"},"updatedAt":{"type":"string","format":"date-time"}}}},"connections":{"type":"object","description":"Connections between nodes, keyed by source node name"},"nodeGroups":{"type":"array","description":"Visual groupings of nodes shown as frames on the canvas","items":{"type":"object","properties":{"id":{"type":"string","description":"Unique identifier for the node group"},"name":{"type":"string","description":"Display name of the node group"},"description":{"type":"string","maxLength":155,"description":"Optional plain-text description of the node group"},"nodeIds":{"type":"array","description":"IDs of the nodes that belong to this group","items":{"type":"string"}}},"required":["id","name","nodeIds"]}},"authors":{"type":"string"},"name":{"type":"string","nullable":true},"description":{"type":"string","nullable":true},"autosaved":{"type":"boolean"},"createdAt":{"type":"string","format":"date-time"},"updatedAt":{"type":"string","format":"date-time"},"workflowPublishHistory":{"type":"array","items":{"type":"object","properties":{"id":{"type":"number"},"workflowId":{"type":"string"},"versionId":{"type":"string","nullable":true},"event":{"type":"string","enum":["activated","deactivated"]},"userId":{"type":"string","nullable":true},"createdAt":{"type":"string","format":"date-time"}},"required":["id","workflowId","versionId","event","userId","createdAt"]}}},"required":["versionId","workflowId","nodes","connections","nodeGroups","authors","name","description","autosaved","createdAt","updatedAt","workflowPublishHistory"]}},"required":["id","name","description","active","activeVersionId","createdAt","updatedAt","isArchived","versionId","versionCounter","sourceWorkflowId","triggerCount","nodes","connections","nodeGroups","settings","staticData","meta","shared","activeVersion"]}},"responses":{"badRequest":{"description":"The request is invalid or provides malformed data."},"unauthorized":{"description":"Unauthorized"},"forbidden":{"description":"Forbidden"},"notFound":{"description":"The specified resource was not found."}}},"paths":{"/workflows/{workflowId}/unarchive":{"post":{"operationId":"unarchiveWorkflow","tags":["Workflow"],"summary":"Unarchive a workflow","description":"Restores an archived workflow.","parameters":[{"schema":{"type":"string"},"required":true,"name":"workflowId","in":"path"}],"responses":{"200":{"description":"Operation successful.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/workflowPublicDto.generated"}}}},"400":{"$ref":"#/components/responses/badRequest"},"401":{"$ref":"#/components/responses/unauthorized"},"403":{"$ref":"#/components/responses/forbidden"},"404":{"$ref":"#/components/responses/notFound"}}}}}}
```

## Transfer a workflow to another project

> Transfer a workflow to another project.

```json
{"openapi":"3.0.0","info":{"title":"n8n Public API","version":"1.1.1"},"tags":[{"name":"Workflow","description":"Operations about workflows"}],"servers":[{"url":"/api/v1","description":"Current n8n instance (self-hosted built-in playground)"},{"url":"{url}/api/v1","description":"Self-hosted n8n instance","variables":{"url":{"default":"https://example.com"}}}],"security":[{"ApiKeyAuth":[]},{"BearerAuth":[]},{"CookieAuth":[]}],"components":{"securitySchemes":{"ApiKeyAuth":{"type":"apiKey","in":"header","name":"X-N8N-API-KEY"},"BearerAuth":{"type":"http","scheme":"bearer","bearerFormat":"JWT"},"CookieAuth":{"type":"apiKey","in":"cookie","name":"n8n-auth"}},"responses":{"badRequest":{"description":"The request is invalid or provides malformed data."},"unauthorized":{"description":"Unauthorized"},"forbidden":{"description":"Forbidden"},"notFound":{"description":"The specified resource was not found."},"unsupportedMediaType":{"description":"Unsupported media type."}}},"paths":{"/workflows/{workflowId}/transfer":{"put":{"operationId":"transferWorkflow","tags":["Workflow"],"summary":"Transfer a workflow to another project","description":"Transfer a workflow to another project.","parameters":[{"schema":{"type":"string"},"required":true,"name":"workflowId","in":"path"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"destinationProjectId":{"type":"string"}},"required":["destinationProjectId"]}}}},"responses":{"204":{"description":"Operation successful."},"400":{"$ref":"#/components/responses/badRequest"},"401":{"$ref":"#/components/responses/unauthorized"},"403":{"$ref":"#/components/responses/forbidden"},"404":{"$ref":"#/components/responses/notFound"},"415":{"$ref":"#/components/responses/unsupportedMediaType"}}}}}}
```

## Publish a workflow

> Publish a workflow. In n8n v1, this action was termed activating a workflow.

```json
{"openapi":"3.0.0","info":{"title":"n8n Public API","version":"1.1.1"},"tags":[{"name":"Workflow","description":"Operations about workflows"}],"servers":[{"url":"/api/v1","description":"Current n8n instance (self-hosted built-in playground)"},{"url":"{url}/api/v1","description":"Self-hosted n8n instance","variables":{"url":{"default":"https://example.com"}}}],"security":[{"ApiKeyAuth":[]},{"BearerAuth":[]},{"CookieAuth":[]}],"components":{"securitySchemes":{"ApiKeyAuth":{"type":"apiKey","in":"header","name":"X-N8N-API-KEY"},"BearerAuth":{"type":"http","scheme":"bearer","bearerFormat":"JWT"},"CookieAuth":{"type":"apiKey","in":"cookie","name":"n8n-auth"}},"schemas":{"workflowPublishPublicDto.generated":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"description":{"type":"string","nullable":true},"active":{"type":"boolean"},"activeVersionId":{"type":"string","nullable":true},"createdAt":{"type":"string","format":"date-time"},"updatedAt":{"type":"string","format":"date-time"},"isArchived":{"type":"boolean"},"versionId":{"type":"string"},"versionCounter":{"type":"number"},"sourceWorkflowId":{"type":"string","nullable":true},"triggerCount":{"type":"number"},"nodes":{"type":"array","description":"Nodes that make up the workflow","items":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"webhookId":{"type":"string"},"disabled":{"type":"boolean"},"notesInFlow":{"type":"boolean"},"notes":{"type":"string"},"type":{"type":"string"},"typeVersion":{"type":"number"},"executeOnce":{"type":"boolean"},"alwaysOutputData":{"type":"boolean"},"retryOnFail":{"type":"boolean"},"maxTries":{"type":"number"},"waitBetweenTries":{"type":"number"},"continueOnFail":{"type":"boolean","description":"use onError instead","deprecated":true},"onError":{"type":"string"},"position":{"type":"array","items":{"type":"number"}},"parameters":{"type":"object","additionalProperties":true},"credentials":{"type":"object"},"customTelemetryTags":{"type":"object","properties":{"tag":{"type":"array","items":{"type":"object","properties":{"key":{"type":"string"},"value":{"type":"string"}},"required":["key","value"]}}}},"createdAt":{"type":"string","format":"date-time"},"updatedAt":{"type":"string","format":"date-time"}}}},"connections":{"type":"object","description":"Connections between nodes, keyed by source node name"},"nodeGroups":{"type":"array","description":"Visual groupings of nodes shown as frames on the canvas","items":{"type":"object","properties":{"id":{"type":"string","description":"Unique identifier for the node group"},"name":{"type":"string","description":"Display name of the node group"},"description":{"type":"string","maxLength":155,"description":"Optional plain-text description of the node group"},"nodeIds":{"type":"array","description":"IDs of the nodes that belong to this group","items":{"type":"string"}}},"required":["id","name","nodeIds"]}},"settings":{"type":"object","description":"Execution and behaviour settings for the workflow","properties":{"saveExecutionProgress":{"oneOf":[{"type":"boolean"},{"type":"string","enum":["DEFAULT"]}]},"saveManualExecutions":{"oneOf":[{"type":"boolean"},{"type":"string","enum":["DEFAULT"]}]},"saveDataErrorExecution":{"type":"string","enum":["DEFAULT","all","none"]},"saveDataSuccessExecution":{"type":"string","enum":["DEFAULT","all","none"]},"executionTimeout":{"type":"number"},"errorWorkflow":{"type":"string","description":"The ID of the workflow that contains the error trigger node."},"timezone":{"type":"string"},"executionOrder":{"type":"string"},"binaryMode":{"type":"string","enum":["separate","combined"],"description":"Controls how binary data is resolved from a node's input. This is a derived, internal setting rather than something intended to be set programmatically. It is included in workflow responses for reference, but any value sent when creating or updating a workflow is ignored."},"callerPolicy":{"type":"string","enum":["any","none","workflowsFromAList","workflowsFromSameOwner"],"description":"Controls which workflows are allowed to call this workflow using the Execute Workflow node. Defaults to workflowsFromSameOwner.\n\nAvailable options:\n- `any`: Any workflow can call this workflow (no restrictions)\n- `none`: No other workflows can call this workflow (completely blocked)\n- `workflowsFromSameOwner` (default): Only workflows owned by the same project can call this workflow\n- `workflowsFromAList`: Only the workflows listed in `callerIds` can call this workflow"},"callerIds":{"type":"string","description":"Comma-separated list of workflow IDs allowed to call this workflow (only used with the workflowsFromAList policy)"},"timeSavedMode":{"type":"string","enum":["fixed","dynamic"],"description":"Controls how the time saved per execution is calculated.\n\nAvailable options:\n- `fixed`: Uses the value in `timeSavedPerExecution`. Use when the time saved is the same for every execution.\n- `dynamic`: Calculates the time saved from actual execution metrics. `timeSavedPerExecution` is ignored."},"timeSavedPerExecution":{"type":"number","description":"Estimated time saved per execution in minutes"},"redactionPolicy":{"type":"string","enum":["none","non-manual","manual-only","all"],"description":"Controls whether execution data is redacted for this workflow.\n\nAvailable options:\n- `none` (default): No redaction. All execution data is stored.\n- `non-manual`: Redact production (non-manually triggered) executions only.\n- `manual-only`: Redact manually triggered executions only.\n- `all`: Redact all executions, manual and production."},"availableInMCP":{"type":"boolean","description":"Controls whether this workflow is reachable over the Model Context Protocol (MCP). Defaults to false. The workflow must be active and must hold at least one active Webhook node."},"customTelemetryTags":{"type":"array","items":{"type":"object","properties":{"key":{"type":"string"},"value":{"type":"string"}},"required":["key","value"]}},"credentialResolverId":{"type":"string","description":"ID of the credential resolver that resolves credentials for this workflow. This is a derived, internal setting managed through the credential resolver configuration rather than something intended to be set programmatically. It is included in workflow responses for reference, but any value sent when creating or updating a workflow is ignored."}},"nullable":true},"staticData":{"type":"object","description":"Data the workflow keeps between executions","nullable":true},"pinData":{"type":"object","description":"Pinned sample data for nodes, keyed by node name","nullable":true},"meta":{"type":"object","description":"Workflow metadata such as template information","properties":{"onboardingId":{"type":"string"},"templateId":{"type":"string"},"instanceId":{"type":"string"},"templateCredsSetupCompleted":{"type":"boolean"}},"nullable":true},"tags":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","readOnly":true},"name":{"type":"string"},"createdAt":{"type":"string","format":"date-time","readOnly":true},"updatedAt":{"type":"string","format":"date-time","readOnly":true}},"required":["id","name","createdAt","updatedAt"]}},"activeVersion":{"type":"object","nullable":true,"properties":{"versionId":{"type":"string"},"workflowId":{"type":"string"},"nodes":{"type":"array","description":"Nodes that make up the workflow","items":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"webhookId":{"type":"string"},"disabled":{"type":"boolean"},"notesInFlow":{"type":"boolean"},"notes":{"type":"string"},"type":{"type":"string"},"typeVersion":{"type":"number"},"executeOnce":{"type":"boolean"},"alwaysOutputData":{"type":"boolean"},"retryOnFail":{"type":"boolean"},"maxTries":{"type":"number"},"waitBetweenTries":{"type":"number"},"continueOnFail":{"type":"boolean","description":"use onError instead","deprecated":true},"onError":{"type":"string"},"position":{"type":"array","items":{"type":"number"}},"parameters":{"type":"object","additionalProperties":true},"credentials":{"type":"object"},"customTelemetryTags":{"type":"object","properties":{"tag":{"type":"array","items":{"type":"object","properties":{"key":{"type":"string"},"value":{"type":"string"}},"required":["key","value"]}}}},"createdAt":{"type":"string","format":"date-time"},"updatedAt":{"type":"string","format":"date-time"}}}},"connections":{"type":"object","description":"Connections between nodes, keyed by source node name"},"nodeGroups":{"type":"array","description":"Visual groupings of nodes shown as frames on the canvas","items":{"type":"object","properties":{"id":{"type":"string","description":"Unique identifier for the node group"},"name":{"type":"string","description":"Display name of the node group"},"description":{"type":"string","maxLength":155,"description":"Optional plain-text description of the node group"},"nodeIds":{"type":"array","description":"IDs of the nodes that belong to this group","items":{"type":"string"}}},"required":["id","name","nodeIds"]}},"authors":{"type":"string"},"name":{"type":"string","nullable":true},"description":{"type":"string","nullable":true},"autosaved":{"type":"boolean"},"createdAt":{"type":"string","format":"date-time"},"updatedAt":{"type":"string","format":"date-time"},"workflowPublishHistory":{"type":"array","items":{"type":"object","properties":{"id":{"type":"number"},"workflowId":{"type":"string"},"versionId":{"type":"string","nullable":true},"event":{"type":"string","enum":["activated","deactivated"]},"userId":{"type":"string","nullable":true},"createdAt":{"type":"string","format":"date-time"}},"required":["id","workflowId","versionId","event","userId","createdAt"]}}},"required":["versionId","workflowId","nodes","connections","nodeGroups","authors","name","description","autosaved","createdAt","updatedAt","workflowPublishHistory"]}},"required":["id","name","description","active","activeVersionId","createdAt","updatedAt","isArchived","versionId","versionCounter","sourceWorkflowId","triggerCount","nodes","connections","nodeGroups","settings","staticData","meta","activeVersion"]}},"responses":{"badRequest":{"description":"The request is invalid or provides malformed data."},"unauthorized":{"description":"Unauthorized"},"forbidden":{"description":"Forbidden"},"notFound":{"description":"The specified resource was not found."},"unsupportedMediaType":{"description":"Unsupported media type."}}},"paths":{"/workflows/{workflowId}/publish":{"post":{"operationId":"publishWorkflow","tags":["Workflow"],"summary":"Publish a workflow","description":"Publish a workflow. In n8n v1, this action was termed activating a workflow.","parameters":[{"schema":{"type":"string"},"required":true,"name":"workflowId","in":"path"}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"versionId":{"type":"string","description":"The specific version ID to publish. If not provided, the latest version is used."},"name":{"type":"string","description":"Optional name for the workflow version during publication."},"description":{"type":"string","description":"Optional description for the workflow version during publication."}}}}}},"responses":{"200":{"description":"Operation successful.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/workflowPublishPublicDto.generated"}}}},"400":{"$ref":"#/components/responses/badRequest"},"401":{"$ref":"#/components/responses/unauthorized"},"403":{"$ref":"#/components/responses/forbidden"},"404":{"$ref":"#/components/responses/notFound"},"409":{"description":"Conflict, e.g. publication blocked by an open workflow review (then `reason` and `workflowReviewRequestId` are present) or a webhook path conflict.","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"},"reason":{"type":"string","enum":["review_pending","changes_requested"]},"workflowReviewRequestId":{"type":"string"}},"required":["message"]}}}},"415":{"$ref":"#/components/responses/unsupportedMediaType"}}}}}}
```

## Unpublish a workflow

> Unpublish a workflow. In n8n v1, this action was termed deactivating a workflow.

```json
{"openapi":"3.0.0","info":{"title":"n8n Public API","version":"1.1.1"},"tags":[{"name":"Workflow","description":"Operations about workflows"}],"servers":[{"url":"/api/v1","description":"Current n8n instance (self-hosted built-in playground)"},{"url":"{url}/api/v1","description":"Self-hosted n8n instance","variables":{"url":{"default":"https://example.com"}}}],"security":[{"ApiKeyAuth":[]},{"BearerAuth":[]},{"CookieAuth":[]}],"components":{"securitySchemes":{"ApiKeyAuth":{"type":"apiKey","in":"header","name":"X-N8N-API-KEY"},"BearerAuth":{"type":"http","scheme":"bearer","bearerFormat":"JWT"},"CookieAuth":{"type":"apiKey","in":"cookie","name":"n8n-auth"}},"schemas":{"workflowPublicDto.generated":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"description":{"type":"string","nullable":true},"active":{"type":"boolean"},"activeVersionId":{"type":"string","nullable":true},"createdAt":{"type":"string","format":"date-time"},"updatedAt":{"type":"string","format":"date-time"},"isArchived":{"type":"boolean"},"versionId":{"type":"string"},"versionCounter":{"type":"number"},"sourceWorkflowId":{"type":"string","nullable":true},"triggerCount":{"type":"number"},"nodes":{"type":"array","description":"Nodes that make up the workflow","items":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"webhookId":{"type":"string"},"disabled":{"type":"boolean"},"notesInFlow":{"type":"boolean"},"notes":{"type":"string"},"type":{"type":"string"},"typeVersion":{"type":"number"},"executeOnce":{"type":"boolean"},"alwaysOutputData":{"type":"boolean"},"retryOnFail":{"type":"boolean"},"maxTries":{"type":"number"},"waitBetweenTries":{"type":"number"},"continueOnFail":{"type":"boolean","description":"use onError instead","deprecated":true},"onError":{"type":"string"},"position":{"type":"array","items":{"type":"number"}},"parameters":{"type":"object","additionalProperties":true},"credentials":{"type":"object"},"customTelemetryTags":{"type":"object","properties":{"tag":{"type":"array","items":{"type":"object","properties":{"key":{"type":"string"},"value":{"type":"string"}},"required":["key","value"]}}}},"createdAt":{"type":"string","format":"date-time"},"updatedAt":{"type":"string","format":"date-time"}}}},"connections":{"type":"object","description":"Connections between nodes, keyed by source node name"},"nodeGroups":{"type":"array","description":"Visual groupings of nodes shown as frames on the canvas","items":{"type":"object","properties":{"id":{"type":"string","description":"Unique identifier for the node group"},"name":{"type":"string","description":"Display name of the node group"},"description":{"type":"string","maxLength":155,"description":"Optional plain-text description of the node group"},"nodeIds":{"type":"array","description":"IDs of the nodes that belong to this group","items":{"type":"string"}}},"required":["id","name","nodeIds"]}},"settings":{"type":"object","description":"Execution and behaviour settings for the workflow","properties":{"saveExecutionProgress":{"oneOf":[{"type":"boolean"},{"type":"string","enum":["DEFAULT"]}]},"saveManualExecutions":{"oneOf":[{"type":"boolean"},{"type":"string","enum":["DEFAULT"]}]},"saveDataErrorExecution":{"type":"string","enum":["DEFAULT","all","none"]},"saveDataSuccessExecution":{"type":"string","enum":["DEFAULT","all","none"]},"executionTimeout":{"type":"number"},"errorWorkflow":{"type":"string","description":"The ID of the workflow that contains the error trigger node."},"timezone":{"type":"string"},"executionOrder":{"type":"string"},"binaryMode":{"type":"string","enum":["separate","combined"],"description":"Controls how binary data is resolved from a node's input. This is a derived, internal setting rather than something intended to be set programmatically. It is included in workflow responses for reference, but any value sent when creating or updating a workflow is ignored."},"callerPolicy":{"type":"string","enum":["any","none","workflowsFromAList","workflowsFromSameOwner"],"description":"Controls which workflows are allowed to call this workflow using the Execute Workflow node. Defaults to workflowsFromSameOwner.\n\nAvailable options:\n- `any`: Any workflow can call this workflow (no restrictions)\n- `none`: No other workflows can call this workflow (completely blocked)\n- `workflowsFromSameOwner` (default): Only workflows owned by the same project can call this workflow\n- `workflowsFromAList`: Only the workflows listed in `callerIds` can call this workflow"},"callerIds":{"type":"string","description":"Comma-separated list of workflow IDs allowed to call this workflow (only used with the workflowsFromAList policy)"},"timeSavedMode":{"type":"string","enum":["fixed","dynamic"],"description":"Controls how the time saved per execution is calculated.\n\nAvailable options:\n- `fixed`: Uses the value in `timeSavedPerExecution`. Use when the time saved is the same for every execution.\n- `dynamic`: Calculates the time saved from actual execution metrics. `timeSavedPerExecution` is ignored."},"timeSavedPerExecution":{"type":"number","description":"Estimated time saved per execution in minutes"},"redactionPolicy":{"type":"string","enum":["none","non-manual","manual-only","all"],"description":"Controls whether execution data is redacted for this workflow.\n\nAvailable options:\n- `none` (default): No redaction. All execution data is stored.\n- `non-manual`: Redact production (non-manually triggered) executions only.\n- `manual-only`: Redact manually triggered executions only.\n- `all`: Redact all executions, manual and production."},"availableInMCP":{"type":"boolean","description":"Controls whether this workflow is reachable over the Model Context Protocol (MCP). Defaults to false. The workflow must be active and must hold at least one active Webhook node."},"customTelemetryTags":{"type":"array","items":{"type":"object","properties":{"key":{"type":"string"},"value":{"type":"string"}},"required":["key","value"]}},"credentialResolverId":{"type":"string","description":"ID of the credential resolver that resolves credentials for this workflow. This is a derived, internal setting managed through the credential resolver configuration rather than something intended to be set programmatically. It is included in workflow responses for reference, but any value sent when creating or updating a workflow is ignored."}},"nullable":true},"staticData":{"type":"object","description":"Data the workflow keeps between executions","nullable":true},"pinData":{"type":"object","description":"Pinned sample data for nodes, keyed by node name","nullable":true},"meta":{"type":"object","description":"Workflow metadata such as template information","properties":{"onboardingId":{"type":"string"},"templateId":{"type":"string"},"instanceId":{"type":"string"},"templateCredsSetupCompleted":{"type":"boolean"}},"nullable":true},"tags":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","readOnly":true},"name":{"type":"string"},"createdAt":{"type":"string","format":"date-time","readOnly":true},"updatedAt":{"type":"string","format":"date-time","readOnly":true}},"required":["id","name","createdAt","updatedAt"]}},"shared":{"type":"array","items":{"type":"object","properties":{"role":{"type":"string"},"workflowId":{"type":"string"},"projectId":{"type":"string"},"project":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"type":{"type":"string","enum":["personal","team"]},"icon":{"type":"object","nullable":true,"properties":{"type":{"type":"string","enum":["emoji","icon"]},"value":{"type":"string"}},"required":["type","value"]},"description":{"type":"string","nullable":true},"customTelemetryTags":{"type":"array","items":{"type":"object","properties":{"key":{"type":"string"},"value":{"type":"string"}},"required":["key","value"]}},"creatorId":{"type":"string","nullable":true},"createdAt":{"type":"string","format":"date-time"},"updatedAt":{"type":"string","format":"date-time"}},"required":["id","name","type","icon","description","customTelemetryTags","creatorId","createdAt","updatedAt"]},"createdAt":{"type":"string","format":"date-time"},"updatedAt":{"type":"string","format":"date-time"}},"required":["role","workflowId","projectId","project","createdAt","updatedAt"]}},"activeVersion":{"type":"object","nullable":true,"properties":{"versionId":{"type":"string"},"workflowId":{"type":"string"},"nodes":{"type":"array","description":"Nodes that make up the workflow","items":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"webhookId":{"type":"string"},"disabled":{"type":"boolean"},"notesInFlow":{"type":"boolean"},"notes":{"type":"string"},"type":{"type":"string"},"typeVersion":{"type":"number"},"executeOnce":{"type":"boolean"},"alwaysOutputData":{"type":"boolean"},"retryOnFail":{"type":"boolean"},"maxTries":{"type":"number"},"waitBetweenTries":{"type":"number"},"continueOnFail":{"type":"boolean","description":"use onError instead","deprecated":true},"onError":{"type":"string"},"position":{"type":"array","items":{"type":"number"}},"parameters":{"type":"object","additionalProperties":true},"credentials":{"type":"object"},"customTelemetryTags":{"type":"object","properties":{"tag":{"type":"array","items":{"type":"object","properties":{"key":{"type":"string"},"value":{"type":"string"}},"required":["key","value"]}}}},"createdAt":{"type":"string","format":"date-time"},"updatedAt":{"type":"string","format":"date-time"}}}},"connections":{"type":"object","description":"Connections between nodes, keyed by source node name"},"nodeGroups":{"type":"array","description":"Visual groupings of nodes shown as frames on the canvas","items":{"type":"object","properties":{"id":{"type":"string","description":"Unique identifier for the node group"},"name":{"type":"string","description":"Display name of the node group"},"description":{"type":"string","maxLength":155,"description":"Optional plain-text description of the node group"},"nodeIds":{"type":"array","description":"IDs of the nodes that belong to this group","items":{"type":"string"}}},"required":["id","name","nodeIds"]}},"authors":{"type":"string"},"name":{"type":"string","nullable":true},"description":{"type":"string","nullable":true},"autosaved":{"type":"boolean"},"createdAt":{"type":"string","format":"date-time"},"updatedAt":{"type":"string","format":"date-time"},"workflowPublishHistory":{"type":"array","items":{"type":"object","properties":{"id":{"type":"number"},"workflowId":{"type":"string"},"versionId":{"type":"string","nullable":true},"event":{"type":"string","enum":["activated","deactivated"]},"userId":{"type":"string","nullable":true},"createdAt":{"type":"string","format":"date-time"}},"required":["id","workflowId","versionId","event","userId","createdAt"]}}},"required":["versionId","workflowId","nodes","connections","nodeGroups","authors","name","description","autosaved","createdAt","updatedAt","workflowPublishHistory"]}},"required":["id","name","description","active","activeVersionId","createdAt","updatedAt","isArchived","versionId","versionCounter","sourceWorkflowId","triggerCount","nodes","connections","nodeGroups","settings","staticData","meta","shared","activeVersion"]}},"responses":{"unauthorized":{"description":"Unauthorized"},"forbidden":{"description":"Forbidden"},"notFound":{"description":"The specified resource was not found."}}},"paths":{"/workflows/{workflowId}/unpublish":{"post":{"operationId":"unpublishWorkflow","tags":["Workflow"],"summary":"Unpublish a workflow","description":"Unpublish a workflow. In n8n v1, this action was termed deactivating a workflow.","parameters":[{"schema":{"type":"string"},"required":true,"name":"workflowId","in":"path"}],"responses":{"200":{"description":"Operation successful.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/workflowPublicDto.generated"}}}},"401":{"$ref":"#/components/responses/unauthorized"},"403":{"$ref":"#/components/responses/forbidden"},"404":{"$ref":"#/components/responses/notFound"}}}}}}
```

## Publish a workflow

> Deprecated: use POST /workflows/{id}/publish instead. Publish a workflow. In n8n v1, this action was termed activating a workflow.

```json
{"openapi":"3.0.0","info":{"title":"n8n Public API","version":"1.1.1"},"tags":[{"name":"Workflow","description":"Operations about workflows"}],"servers":[{"url":"/api/v1","description":"Current n8n instance (self-hosted built-in playground)"},{"url":"{url}/api/v1","description":"Self-hosted n8n instance","variables":{"url":{"default":"https://example.com"}}}],"security":[{"ApiKeyAuth":[]},{"BearerAuth":[]},{"CookieAuth":[]}],"components":{"securitySchemes":{"ApiKeyAuth":{"type":"apiKey","in":"header","name":"X-N8N-API-KEY"},"BearerAuth":{"type":"http","scheme":"bearer","bearerFormat":"JWT"},"CookieAuth":{"type":"apiKey","in":"cookie","name":"n8n-auth"}},"schemas":{"workflowPublishPublicDto.generated":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"description":{"type":"string","nullable":true},"active":{"type":"boolean"},"activeVersionId":{"type":"string","nullable":true},"createdAt":{"type":"string","format":"date-time"},"updatedAt":{"type":"string","format":"date-time"},"isArchived":{"type":"boolean"},"versionId":{"type":"string"},"versionCounter":{"type":"number"},"sourceWorkflowId":{"type":"string","nullable":true},"triggerCount":{"type":"number"},"nodes":{"type":"array","description":"Nodes that make up the workflow","items":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"webhookId":{"type":"string"},"disabled":{"type":"boolean"},"notesInFlow":{"type":"boolean"},"notes":{"type":"string"},"type":{"type":"string"},"typeVersion":{"type":"number"},"executeOnce":{"type":"boolean"},"alwaysOutputData":{"type":"boolean"},"retryOnFail":{"type":"boolean"},"maxTries":{"type":"number"},"waitBetweenTries":{"type":"number"},"continueOnFail":{"type":"boolean","description":"use onError instead","deprecated":true},"onError":{"type":"string"},"position":{"type":"array","items":{"type":"number"}},"parameters":{"type":"object","additionalProperties":true},"credentials":{"type":"object"},"customTelemetryTags":{"type":"object","properties":{"tag":{"type":"array","items":{"type":"object","properties":{"key":{"type":"string"},"value":{"type":"string"}},"required":["key","value"]}}}},"createdAt":{"type":"string","format":"date-time"},"updatedAt":{"type":"string","format":"date-time"}}}},"connections":{"type":"object","description":"Connections between nodes, keyed by source node name"},"nodeGroups":{"type":"array","description":"Visual groupings of nodes shown as frames on the canvas","items":{"type":"object","properties":{"id":{"type":"string","description":"Unique identifier for the node group"},"name":{"type":"string","description":"Display name of the node group"},"description":{"type":"string","maxLength":155,"description":"Optional plain-text description of the node group"},"nodeIds":{"type":"array","description":"IDs of the nodes that belong to this group","items":{"type":"string"}}},"required":["id","name","nodeIds"]}},"settings":{"type":"object","description":"Execution and behaviour settings for the workflow","properties":{"saveExecutionProgress":{"oneOf":[{"type":"boolean"},{"type":"string","enum":["DEFAULT"]}]},"saveManualExecutions":{"oneOf":[{"type":"boolean"},{"type":"string","enum":["DEFAULT"]}]},"saveDataErrorExecution":{"type":"string","enum":["DEFAULT","all","none"]},"saveDataSuccessExecution":{"type":"string","enum":["DEFAULT","all","none"]},"executionTimeout":{"type":"number"},"errorWorkflow":{"type":"string","description":"The ID of the workflow that contains the error trigger node."},"timezone":{"type":"string"},"executionOrder":{"type":"string"},"binaryMode":{"type":"string","enum":["separate","combined"],"description":"Controls how binary data is resolved from a node's input. This is a derived, internal setting rather than something intended to be set programmatically. It is included in workflow responses for reference, but any value sent when creating or updating a workflow is ignored."},"callerPolicy":{"type":"string","enum":["any","none","workflowsFromAList","workflowsFromSameOwner"],"description":"Controls which workflows are allowed to call this workflow using the Execute Workflow node. Defaults to workflowsFromSameOwner.\n\nAvailable options:\n- `any`: Any workflow can call this workflow (no restrictions)\n- `none`: No other workflows can call this workflow (completely blocked)\n- `workflowsFromSameOwner` (default): Only workflows owned by the same project can call this workflow\n- `workflowsFromAList`: Only the workflows listed in `callerIds` can call this workflow"},"callerIds":{"type":"string","description":"Comma-separated list of workflow IDs allowed to call this workflow (only used with the workflowsFromAList policy)"},"timeSavedMode":{"type":"string","enum":["fixed","dynamic"],"description":"Controls how the time saved per execution is calculated.\n\nAvailable options:\n- `fixed`: Uses the value in `timeSavedPerExecution`. Use when the time saved is the same for every execution.\n- `dynamic`: Calculates the time saved from actual execution metrics. `timeSavedPerExecution` is ignored."},"timeSavedPerExecution":{"type":"number","description":"Estimated time saved per execution in minutes"},"redactionPolicy":{"type":"string","enum":["none","non-manual","manual-only","all"],"description":"Controls whether execution data is redacted for this workflow.\n\nAvailable options:\n- `none` (default): No redaction. All execution data is stored.\n- `non-manual`: Redact production (non-manually triggered) executions only.\n- `manual-only`: Redact manually triggered executions only.\n- `all`: Redact all executions, manual and production."},"availableInMCP":{"type":"boolean","description":"Controls whether this workflow is reachable over the Model Context Protocol (MCP). Defaults to false. The workflow must be active and must hold at least one active Webhook node."},"customTelemetryTags":{"type":"array","items":{"type":"object","properties":{"key":{"type":"string"},"value":{"type":"string"}},"required":["key","value"]}},"credentialResolverId":{"type":"string","description":"ID of the credential resolver that resolves credentials for this workflow. This is a derived, internal setting managed through the credential resolver configuration rather than something intended to be set programmatically. It is included in workflow responses for reference, but any value sent when creating or updating a workflow is ignored."}},"nullable":true},"staticData":{"type":"object","description":"Data the workflow keeps between executions","nullable":true},"pinData":{"type":"object","description":"Pinned sample data for nodes, keyed by node name","nullable":true},"meta":{"type":"object","description":"Workflow metadata such as template information","properties":{"onboardingId":{"type":"string"},"templateId":{"type":"string"},"instanceId":{"type":"string"},"templateCredsSetupCompleted":{"type":"boolean"}},"nullable":true},"tags":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","readOnly":true},"name":{"type":"string"},"createdAt":{"type":"string","format":"date-time","readOnly":true},"updatedAt":{"type":"string","format":"date-time","readOnly":true}},"required":["id","name","createdAt","updatedAt"]}},"activeVersion":{"type":"object","nullable":true,"properties":{"versionId":{"type":"string"},"workflowId":{"type":"string"},"nodes":{"type":"array","description":"Nodes that make up the workflow","items":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"webhookId":{"type":"string"},"disabled":{"type":"boolean"},"notesInFlow":{"type":"boolean"},"notes":{"type":"string"},"type":{"type":"string"},"typeVersion":{"type":"number"},"executeOnce":{"type":"boolean"},"alwaysOutputData":{"type":"boolean"},"retryOnFail":{"type":"boolean"},"maxTries":{"type":"number"},"waitBetweenTries":{"type":"number"},"continueOnFail":{"type":"boolean","description":"use onError instead","deprecated":true},"onError":{"type":"string"},"position":{"type":"array","items":{"type":"number"}},"parameters":{"type":"object","additionalProperties":true},"credentials":{"type":"object"},"customTelemetryTags":{"type":"object","properties":{"tag":{"type":"array","items":{"type":"object","properties":{"key":{"type":"string"},"value":{"type":"string"}},"required":["key","value"]}}}},"createdAt":{"type":"string","format":"date-time"},"updatedAt":{"type":"string","format":"date-time"}}}},"connections":{"type":"object","description":"Connections between nodes, keyed by source node name"},"nodeGroups":{"type":"array","description":"Visual groupings of nodes shown as frames on the canvas","items":{"type":"object","properties":{"id":{"type":"string","description":"Unique identifier for the node group"},"name":{"type":"string","description":"Display name of the node group"},"description":{"type":"string","maxLength":155,"description":"Optional plain-text description of the node group"},"nodeIds":{"type":"array","description":"IDs of the nodes that belong to this group","items":{"type":"string"}}},"required":["id","name","nodeIds"]}},"authors":{"type":"string"},"name":{"type":"string","nullable":true},"description":{"type":"string","nullable":true},"autosaved":{"type":"boolean"},"createdAt":{"type":"string","format":"date-time"},"updatedAt":{"type":"string","format":"date-time"},"workflowPublishHistory":{"type":"array","items":{"type":"object","properties":{"id":{"type":"number"},"workflowId":{"type":"string"},"versionId":{"type":"string","nullable":true},"event":{"type":"string","enum":["activated","deactivated"]},"userId":{"type":"string","nullable":true},"createdAt":{"type":"string","format":"date-time"}},"required":["id","workflowId","versionId","event","userId","createdAt"]}}},"required":["versionId","workflowId","nodes","connections","nodeGroups","authors","name","description","autosaved","createdAt","updatedAt","workflowPublishHistory"]}},"required":["id","name","description","active","activeVersionId","createdAt","updatedAt","isArchived","versionId","versionCounter","sourceWorkflowId","triggerCount","nodes","connections","nodeGroups","settings","staticData","meta","activeVersion"]}},"responses":{"badRequest":{"description":"The request is invalid or provides malformed data."},"unauthorized":{"description":"Unauthorized"},"forbidden":{"description":"Forbidden"},"notFound":{"description":"The specified resource was not found."},"unsupportedMediaType":{"description":"Unsupported media type."}}},"paths":{"/workflows/{workflowId}/activate":{"post":{"operationId":"activateWorkflow","tags":["Workflow"],"summary":"Publish a workflow","description":"Deprecated: use POST /workflows/{id}/publish instead. Publish a workflow. In n8n v1, this action was termed activating a workflow.","deprecated":true,"parameters":[{"schema":{"type":"string"},"required":true,"name":"workflowId","in":"path"}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"versionId":{"type":"string","description":"The specific version ID to activate or publish. If not provided, the latest version is used."},"name":{"type":"string","description":"Optional name for the workflow version during activation."},"description":{"type":"string","description":"Optional description for the workflow version during activation."}}}}}},"responses":{"200":{"description":"Operation successful.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/workflowPublishPublicDto.generated"}}}},"400":{"$ref":"#/components/responses/badRequest"},"401":{"$ref":"#/components/responses/unauthorized"},"403":{"$ref":"#/components/responses/forbidden"},"404":{"$ref":"#/components/responses/notFound"},"409":{"description":"Conflict, e.g. publication blocked by an open workflow review (then `reason` and `workflowReviewRequestId` are present) or a webhook path conflict.","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"},"reason":{"type":"string","enum":["review_pending","changes_requested"]},"workflowReviewRequestId":{"type":"string"}},"required":["message"]}}}},"415":{"$ref":"#/components/responses/unsupportedMediaType"}}}}}}
```

## Deactivate a workflow

> Deprecated: use POST /workflows/{id}/unpublish instead. Deactivate a workflow.

```json
{"openapi":"3.0.0","info":{"title":"n8n Public API","version":"1.1.1"},"tags":[{"name":"Workflow","description":"Operations about workflows"}],"servers":[{"url":"/api/v1","description":"Current n8n instance (self-hosted built-in playground)"},{"url":"{url}/api/v1","description":"Self-hosted n8n instance","variables":{"url":{"default":"https://example.com"}}}],"security":[{"ApiKeyAuth":[]},{"BearerAuth":[]},{"CookieAuth":[]}],"components":{"securitySchemes":{"ApiKeyAuth":{"type":"apiKey","in":"header","name":"X-N8N-API-KEY"},"BearerAuth":{"type":"http","scheme":"bearer","bearerFormat":"JWT"},"CookieAuth":{"type":"apiKey","in":"cookie","name":"n8n-auth"}},"schemas":{"workflowPublicDto.generated":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"description":{"type":"string","nullable":true},"active":{"type":"boolean"},"activeVersionId":{"type":"string","nullable":true},"createdAt":{"type":"string","format":"date-time"},"updatedAt":{"type":"string","format":"date-time"},"isArchived":{"type":"boolean"},"versionId":{"type":"string"},"versionCounter":{"type":"number"},"sourceWorkflowId":{"type":"string","nullable":true},"triggerCount":{"type":"number"},"nodes":{"type":"array","description":"Nodes that make up the workflow","items":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"webhookId":{"type":"string"},"disabled":{"type":"boolean"},"notesInFlow":{"type":"boolean"},"notes":{"type":"string"},"type":{"type":"string"},"typeVersion":{"type":"number"},"executeOnce":{"type":"boolean"},"alwaysOutputData":{"type":"boolean"},"retryOnFail":{"type":"boolean"},"maxTries":{"type":"number"},"waitBetweenTries":{"type":"number"},"continueOnFail":{"type":"boolean","description":"use onError instead","deprecated":true},"onError":{"type":"string"},"position":{"type":"array","items":{"type":"number"}},"parameters":{"type":"object","additionalProperties":true},"credentials":{"type":"object"},"customTelemetryTags":{"type":"object","properties":{"tag":{"type":"array","items":{"type":"object","properties":{"key":{"type":"string"},"value":{"type":"string"}},"required":["key","value"]}}}},"createdAt":{"type":"string","format":"date-time"},"updatedAt":{"type":"string","format":"date-time"}}}},"connections":{"type":"object","description":"Connections between nodes, keyed by source node name"},"nodeGroups":{"type":"array","description":"Visual groupings of nodes shown as frames on the canvas","items":{"type":"object","properties":{"id":{"type":"string","description":"Unique identifier for the node group"},"name":{"type":"string","description":"Display name of the node group"},"description":{"type":"string","maxLength":155,"description":"Optional plain-text description of the node group"},"nodeIds":{"type":"array","description":"IDs of the nodes that belong to this group","items":{"type":"string"}}},"required":["id","name","nodeIds"]}},"settings":{"type":"object","description":"Execution and behaviour settings for the workflow","properties":{"saveExecutionProgress":{"oneOf":[{"type":"boolean"},{"type":"string","enum":["DEFAULT"]}]},"saveManualExecutions":{"oneOf":[{"type":"boolean"},{"type":"string","enum":["DEFAULT"]}]},"saveDataErrorExecution":{"type":"string","enum":["DEFAULT","all","none"]},"saveDataSuccessExecution":{"type":"string","enum":["DEFAULT","all","none"]},"executionTimeout":{"type":"number"},"errorWorkflow":{"type":"string","description":"The ID of the workflow that contains the error trigger node."},"timezone":{"type":"string"},"executionOrder":{"type":"string"},"binaryMode":{"type":"string","enum":["separate","combined"],"description":"Controls how binary data is resolved from a node's input. This is a derived, internal setting rather than something intended to be set programmatically. It is included in workflow responses for reference, but any value sent when creating or updating a workflow is ignored."},"callerPolicy":{"type":"string","enum":["any","none","workflowsFromAList","workflowsFromSameOwner"],"description":"Controls which workflows are allowed to call this workflow using the Execute Workflow node. Defaults to workflowsFromSameOwner.\n\nAvailable options:\n- `any`: Any workflow can call this workflow (no restrictions)\n- `none`: No other workflows can call this workflow (completely blocked)\n- `workflowsFromSameOwner` (default): Only workflows owned by the same project can call this workflow\n- `workflowsFromAList`: Only the workflows listed in `callerIds` can call this workflow"},"callerIds":{"type":"string","description":"Comma-separated list of workflow IDs allowed to call this workflow (only used with the workflowsFromAList policy)"},"timeSavedMode":{"type":"string","enum":["fixed","dynamic"],"description":"Controls how the time saved per execution is calculated.\n\nAvailable options:\n- `fixed`: Uses the value in `timeSavedPerExecution`. Use when the time saved is the same for every execution.\n- `dynamic`: Calculates the time saved from actual execution metrics. `timeSavedPerExecution` is ignored."},"timeSavedPerExecution":{"type":"number","description":"Estimated time saved per execution in minutes"},"redactionPolicy":{"type":"string","enum":["none","non-manual","manual-only","all"],"description":"Controls whether execution data is redacted for this workflow.\n\nAvailable options:\n- `none` (default): No redaction. All execution data is stored.\n- `non-manual`: Redact production (non-manually triggered) executions only.\n- `manual-only`: Redact manually triggered executions only.\n- `all`: Redact all executions, manual and production."},"availableInMCP":{"type":"boolean","description":"Controls whether this workflow is reachable over the Model Context Protocol (MCP). Defaults to false. The workflow must be active and must hold at least one active Webhook node."},"customTelemetryTags":{"type":"array","items":{"type":"object","properties":{"key":{"type":"string"},"value":{"type":"string"}},"required":["key","value"]}},"credentialResolverId":{"type":"string","description":"ID of the credential resolver that resolves credentials for this workflow. This is a derived, internal setting managed through the credential resolver configuration rather than something intended to be set programmatically. It is included in workflow responses for reference, but any value sent when creating or updating a workflow is ignored."}},"nullable":true},"staticData":{"type":"object","description":"Data the workflow keeps between executions","nullable":true},"pinData":{"type":"object","description":"Pinned sample data for nodes, keyed by node name","nullable":true},"meta":{"type":"object","description":"Workflow metadata such as template information","properties":{"onboardingId":{"type":"string"},"templateId":{"type":"string"},"instanceId":{"type":"string"},"templateCredsSetupCompleted":{"type":"boolean"}},"nullable":true},"tags":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","readOnly":true},"name":{"type":"string"},"createdAt":{"type":"string","format":"date-time","readOnly":true},"updatedAt":{"type":"string","format":"date-time","readOnly":true}},"required":["id","name","createdAt","updatedAt"]}},"shared":{"type":"array","items":{"type":"object","properties":{"role":{"type":"string"},"workflowId":{"type":"string"},"projectId":{"type":"string"},"project":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"type":{"type":"string","enum":["personal","team"]},"icon":{"type":"object","nullable":true,"properties":{"type":{"type":"string","enum":["emoji","icon"]},"value":{"type":"string"}},"required":["type","value"]},"description":{"type":"string","nullable":true},"customTelemetryTags":{"type":"array","items":{"type":"object","properties":{"key":{"type":"string"},"value":{"type":"string"}},"required":["key","value"]}},"creatorId":{"type":"string","nullable":true},"createdAt":{"type":"string","format":"date-time"},"updatedAt":{"type":"string","format":"date-time"}},"required":["id","name","type","icon","description","customTelemetryTags","creatorId","createdAt","updatedAt"]},"createdAt":{"type":"string","format":"date-time"},"updatedAt":{"type":"string","format":"date-time"}},"required":["role","workflowId","projectId","project","createdAt","updatedAt"]}},"activeVersion":{"type":"object","nullable":true,"properties":{"versionId":{"type":"string"},"workflowId":{"type":"string"},"nodes":{"type":"array","description":"Nodes that make up the workflow","items":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"webhookId":{"type":"string"},"disabled":{"type":"boolean"},"notesInFlow":{"type":"boolean"},"notes":{"type":"string"},"type":{"type":"string"},"typeVersion":{"type":"number"},"executeOnce":{"type":"boolean"},"alwaysOutputData":{"type":"boolean"},"retryOnFail":{"type":"boolean"},"maxTries":{"type":"number"},"waitBetweenTries":{"type":"number"},"continueOnFail":{"type":"boolean","description":"use onError instead","deprecated":true},"onError":{"type":"string"},"position":{"type":"array","items":{"type":"number"}},"parameters":{"type":"object","additionalProperties":true},"credentials":{"type":"object"},"customTelemetryTags":{"type":"object","properties":{"tag":{"type":"array","items":{"type":"object","properties":{"key":{"type":"string"},"value":{"type":"string"}},"required":["key","value"]}}}},"createdAt":{"type":"string","format":"date-time"},"updatedAt":{"type":"string","format":"date-time"}}}},"connections":{"type":"object","description":"Connections between nodes, keyed by source node name"},"nodeGroups":{"type":"array","description":"Visual groupings of nodes shown as frames on the canvas","items":{"type":"object","properties":{"id":{"type":"string","description":"Unique identifier for the node group"},"name":{"type":"string","description":"Display name of the node group"},"description":{"type":"string","maxLength":155,"description":"Optional plain-text description of the node group"},"nodeIds":{"type":"array","description":"IDs of the nodes that belong to this group","items":{"type":"string"}}},"required":["id","name","nodeIds"]}},"authors":{"type":"string"},"name":{"type":"string","nullable":true},"description":{"type":"string","nullable":true},"autosaved":{"type":"boolean"},"createdAt":{"type":"string","format":"date-time"},"updatedAt":{"type":"string","format":"date-time"},"workflowPublishHistory":{"type":"array","items":{"type":"object","properties":{"id":{"type":"number"},"workflowId":{"type":"string"},"versionId":{"type":"string","nullable":true},"event":{"type":"string","enum":["activated","deactivated"]},"userId":{"type":"string","nullable":true},"createdAt":{"type":"string","format":"date-time"}},"required":["id","workflowId","versionId","event","userId","createdAt"]}}},"required":["versionId","workflowId","nodes","connections","nodeGroups","authors","name","description","autosaved","createdAt","updatedAt","workflowPublishHistory"]}},"required":["id","name","description","active","activeVersionId","createdAt","updatedAt","isArchived","versionId","versionCounter","sourceWorkflowId","triggerCount","nodes","connections","nodeGroups","settings","staticData","meta","shared","activeVersion"]}},"responses":{"unauthorized":{"description":"Unauthorized"},"forbidden":{"description":"Forbidden"},"notFound":{"description":"The specified resource was not found."}}},"paths":{"/workflows/{workflowId}/deactivate":{"post":{"operationId":"deactivateWorkflow","tags":["Workflow"],"summary":"Deactivate a workflow","description":"Deprecated: use POST /workflows/{id}/unpublish instead. Deactivate a workflow.","deprecated":true,"parameters":[{"schema":{"type":"string"},"required":true,"name":"workflowId","in":"path"}],"responses":{"200":{"description":"Operation successful.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/workflowPublicDto.generated"}}}},"401":{"$ref":"#/components/responses/unauthorized"},"403":{"$ref":"#/components/responses/forbidden"},"404":{"$ref":"#/components/responses/notFound"}}}}}}
```

## Retrieve workflow version history

> Returns a paginated list of workflow versions (version IDs and metadata) for a workflow.

```json
{"openapi":"3.0.0","info":{"title":"n8n Public API","version":"1.1.1"},"tags":[{"name":"Workflow","description":"Operations about workflows"}],"servers":[{"url":"/api/v1","description":"Current n8n instance (self-hosted built-in playground)"},{"url":"{url}/api/v1","description":"Self-hosted n8n instance","variables":{"url":{"default":"https://example.com"}}}],"security":[{"ApiKeyAuth":[]},{"BearerAuth":[]},{"CookieAuth":[]}],"components":{"securitySchemes":{"ApiKeyAuth":{"type":"apiKey","in":"header","name":"X-N8N-API-KEY"},"BearerAuth":{"type":"http","scheme":"bearer","bearerFormat":"JWT"},"CookieAuth":{"type":"apiKey","in":"cookie","name":"n8n-auth"}},"parameters":{"limit":{"name":"limit","in":"query","description":"The maximum number of items to return.","required":false,"schema":{"type":"number","default":100,"maximum":250}},"cursor":{"name":"cursor","in":"query","description":"Paginate by setting the cursor parameter to the nextCursor attribute returned by the previous request's response. Default value fetches the first \"page\" of the collection. See pagination for more detail.","required":false,"style":"form","schema":{"type":"string"}}},"responses":{"badRequest":{"description":"The request is invalid or provides malformed data."},"unauthorized":{"description":"Unauthorized"},"forbidden":{"description":"Forbidden"},"notFound":{"description":"The specified resource was not found."}}},"paths":{"/workflows/{workflowId}/history":{"get":{"operationId":"getWorkflowHistory","tags":["Workflow"],"summary":"Retrieve workflow version history","description":"Returns a paginated list of workflow versions (version IDs and metadata) for a workflow.","parameters":[{"$ref":"#/components/parameters/limit"},{"$ref":"#/components/parameters/cursor"},{"schema":{"type":"string"},"required":true,"name":"workflowId","in":"path"}],"responses":{"200":{"description":"Operation successful.","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"type":"object","properties":{"versionId":{"type":"string"},"workflowId":{"type":"string"},"authors":{"type":"string"},"name":{"type":"string","nullable":true},"description":{"type":"string","nullable":true},"createdAt":{"type":"string","format":"date-time"},"updatedAt":{"type":"string","format":"date-time"}},"required":["versionId","workflowId","authors","name","description","createdAt","updatedAt"]}},"nextCursor":{"type":"string","nullable":true}},"required":["data","nextCursor"]}}}},"400":{"$ref":"#/components/responses/badRequest"},"401":{"$ref":"#/components/responses/unauthorized"},"403":{"$ref":"#/components/responses/forbidden"},"404":{"$ref":"#/components/responses/notFound"}}}}}}
```

## Retrieve a workflow version

> Retrieve a single version of a workflow from its version history.

```json
{"openapi":"3.0.0","info":{"title":"n8n Public API","version":"1.1.1"},"tags":[{"name":"Workflow","description":"Operations about workflows"}],"servers":[{"url":"/api/v1","description":"Current n8n instance (self-hosted built-in playground)"},{"url":"{url}/api/v1","description":"Self-hosted n8n instance","variables":{"url":{"default":"https://example.com"}}}],"security":[{"ApiKeyAuth":[]},{"BearerAuth":[]},{"CookieAuth":[]}],"components":{"securitySchemes":{"ApiKeyAuth":{"type":"apiKey","in":"header","name":"X-N8N-API-KEY"},"BearerAuth":{"type":"http","scheme":"bearer","bearerFormat":"JWT"},"CookieAuth":{"type":"apiKey","in":"cookie","name":"n8n-auth"}},"responses":{"unauthorized":{"description":"Unauthorized"},"forbidden":{"description":"Forbidden"},"notFound":{"description":"The specified resource was not found."}}},"paths":{"/workflows/{workflowId}/versions/{versionId}":{"get":{"operationId":"getWorkflowVersion","tags":["Workflow"],"summary":"Retrieve a workflow version","description":"Retrieve a single version of a workflow from its version history.","parameters":[{"schema":{"type":"string"},"required":true,"name":"workflowId","in":"path"},{"schema":{"type":"string"},"required":true,"name":"versionId","in":"path"}],"responses":{"200":{"description":"Operation successful.","content":{"application/json":{"schema":{"type":"object","properties":{"versionId":{"type":"string"},"workflowId":{"type":"string"},"nodes":{"type":"array","description":"Nodes that make up the workflow","items":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"webhookId":{"type":"string"},"disabled":{"type":"boolean"},"notesInFlow":{"type":"boolean"},"notes":{"type":"string"},"type":{"type":"string"},"typeVersion":{"type":"number"},"executeOnce":{"type":"boolean"},"alwaysOutputData":{"type":"boolean"},"retryOnFail":{"type":"boolean"},"maxTries":{"type":"number"},"waitBetweenTries":{"type":"number"},"continueOnFail":{"type":"boolean","description":"use onError instead","deprecated":true},"onError":{"type":"string"},"position":{"type":"array","items":{"type":"number"}},"parameters":{"type":"object","additionalProperties":true},"credentials":{"type":"object"},"customTelemetryTags":{"type":"object","properties":{"tag":{"type":"array","items":{"type":"object","properties":{"key":{"type":"string"},"value":{"type":"string"}},"required":["key","value"]}}}},"createdAt":{"type":"string","format":"date-time"},"updatedAt":{"type":"string","format":"date-time"}}}},"connections":{"type":"object","description":"Connections between nodes, keyed by source node name"},"nodeGroups":{"type":"array","description":"Visual groupings of nodes shown as frames on the canvas","items":{"type":"object","properties":{"id":{"type":"string","description":"Unique identifier for the node group"},"name":{"type":"string","description":"Display name of the node group"},"description":{"type":"string","maxLength":155,"description":"Optional plain-text description of the node group"},"nodeIds":{"type":"array","description":"IDs of the nodes that belong to this group","items":{"type":"string"}}},"required":["id","name","nodeIds"]}},"authors":{"type":"string"},"name":{"type":"string","nullable":true},"description":{"type":"string","nullable":true},"createdAt":{"type":"string","format":"date-time"},"updatedAt":{"type":"string","format":"date-time"}},"required":["versionId","workflowId","nodes","connections","nodeGroups","authors","name","description","createdAt","updatedAt"]}}}},"401":{"$ref":"#/components/responses/unauthorized"},"403":{"$ref":"#/components/responses/forbidden"},"404":{"$ref":"#/components/responses/notFound"}}}}}}
```

## Get workflow tags

> Get workflow tags.

```json
{"openapi":"3.0.0","info":{"title":"n8n Public API","version":"1.1.1"},"tags":[{"name":"Workflow","description":"Operations about workflows"}],"servers":[{"url":"/api/v1","description":"Current n8n instance (self-hosted built-in playground)"},{"url":"{url}/api/v1","description":"Self-hosted n8n instance","variables":{"url":{"default":"https://example.com"}}}],"security":[{"ApiKeyAuth":[]},{"BearerAuth":[]},{"CookieAuth":[]}],"components":{"securitySchemes":{"ApiKeyAuth":{"type":"apiKey","in":"header","name":"X-N8N-API-KEY"},"BearerAuth":{"type":"http","scheme":"bearer","bearerFormat":"JWT"},"CookieAuth":{"type":"apiKey","in":"cookie","name":"n8n-auth"}},"schemas":{"workflowTagsPublicDto.generated":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","readOnly":true},"name":{"type":"string"},"createdAt":{"type":"string","format":"date-time","readOnly":true},"updatedAt":{"type":"string","format":"date-time","readOnly":true}},"required":["id","name","createdAt","updatedAt"]}}},"responses":{"badRequest":{"description":"The request is invalid or provides malformed data."},"unauthorized":{"description":"Unauthorized"},"forbidden":{"description":"Forbidden"},"notFound":{"description":"The specified resource was not found."}}},"paths":{"/workflows/{workflowId}/tags":{"get":{"operationId":"getWorkflowTags","tags":["Workflow"],"summary":"Get workflow tags","description":"Get workflow tags.","parameters":[{"schema":{"type":"string"},"required":true,"name":"workflowId","in":"path"}],"responses":{"200":{"description":"Operation successful.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/workflowTagsPublicDto.generated"}}}},"400":{"$ref":"#/components/responses/badRequest"},"401":{"$ref":"#/components/responses/unauthorized"},"403":{"$ref":"#/components/responses/forbidden"},"404":{"$ref":"#/components/responses/notFound"}}}}}}
```

## Update tags of a workflow

> Update tags of a workflow.

```json
{"openapi":"3.0.0","info":{"title":"n8n Public API","version":"1.1.1"},"tags":[{"name":"Workflow","description":"Operations about workflows"}],"servers":[{"url":"/api/v1","description":"Current n8n instance (self-hosted built-in playground)"},{"url":"{url}/api/v1","description":"Self-hosted n8n instance","variables":{"url":{"default":"https://example.com"}}}],"security":[{"ApiKeyAuth":[]},{"BearerAuth":[]},{"CookieAuth":[]}],"components":{"securitySchemes":{"ApiKeyAuth":{"type":"apiKey","in":"header","name":"X-N8N-API-KEY"},"BearerAuth":{"type":"http","scheme":"bearer","bearerFormat":"JWT"},"CookieAuth":{"type":"apiKey","in":"cookie","name":"n8n-auth"}},"schemas":{"workflowTagsPublicDto.generated":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","readOnly":true},"name":{"type":"string"},"createdAt":{"type":"string","format":"date-time","readOnly":true},"updatedAt":{"type":"string","format":"date-time","readOnly":true}},"required":["id","name","createdAt","updatedAt"]}}},"responses":{"badRequest":{"description":"The request is invalid or provides malformed data."},"unauthorized":{"description":"Unauthorized"},"forbidden":{"description":"Forbidden"},"notFound":{"description":"The specified resource was not found."},"unsupportedMediaType":{"description":"Unsupported media type."}}},"paths":{"/workflows/{workflowId}/tags":{"put":{"operationId":"updateWorkflowTags","tags":["Workflow"],"summary":"Update tags of a workflow","description":"Update tags of a workflow.","parameters":[{"schema":{"type":"string"},"required":true,"name":"workflowId","in":"path"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"}},"required":["id"],"additionalProperties":false}}}}},"responses":{"200":{"description":"Operation successful.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/workflowTagsPublicDto.generated"}}}},"400":{"$ref":"#/components/responses/badRequest"},"401":{"$ref":"#/components/responses/unauthorized"},"403":{"$ref":"#/components/responses/forbidden"},"404":{"$ref":"#/components/responses/notFound"},"415":{"$ref":"#/components/responses/unsupportedMediaType"}}}}}}
```
