Skip to main content

Create a workflow template, or a new version of one.

POST/api/v1/workflow-templatesworkflows:author

Saves the details, the builder canvas and the steps as a template, or as a new version on top of parent_workflow_template_id, which then runs. The canvas and the steps must agree: every step is on the canvas with the same node_id and type. A new step takes a new node_id, and previous_node_id names the step it continues. A canvas without steps goes through POST .../compile. A credential sent as the redaction marker (a Password, Token, TokenSecret or auth_request_config input, a header value in a Headers input, a canvas credential key) keeps the credential the step it continues stores, in a version of the template parent_workflow_template_id names; a marker on a step with none is refused.

Scopeworkflows:author
AsynchronousNo
MCP toolcreate_workflow_template
Portal permissionscreate_workflow_templates

Parameters​

NameInTypeRequiredDescription
Docwize-Versionheaderstring (date)Optional
Idempotency-KeyheaderstringOptionalmax 255

Request body​

Content typeType
application/jsonWorkflowTemplateCreateInput

Responses​

StatusDescriptionBody
201Success.application/json WorkflowTemplate or object
400invalid_version, malformed_jsonapplication/problem+json Problem
401token_expired, unauthenticatedapplication/problem+json Problem
403forbidden, insufficient_scope, token_owner_inactiveapplication/problem+json Problem
405method_not_allowedapplication/problem+json Problem
406not_acceptableapplication/problem+json Problem
409conflict, idempotency_in_progressapplication/problem+json Problem
413payload_too_largeapplication/problem+json Problem
415unsupported_media_typeapplication/problem+json Problem
421wrong_regionapplication/problem+json Problem
422idempotency_key_reused, validation_failedapplication/problem+json Problem
500internal_errorapplication/problem+json Problem
503tenant_unavailable, unavailableapplication/problem+json Problem
504timeoutapplication/problem+json Problem

Errors​

The problem codes this operation can answer with. Each code links to its page.

Schemas​

WorkflowTemplate​

FieldTypeRequiredDescription
current_workflow_template_version_idstringRequiredThe version that runs now; a workflow started from the template runs it.
entity_sub_typestringRequiredThe document type the template applies to; empty for any.
entity_typestringRequiredThe entity the template applies to; empty for any.
is_activebooleanRequiredfalse when the template cannot be started.
namestringRequired
project_idstring or nullRequiredThe project the template applies to; null for any project.
workflow_template_group_idstring or nullRequiredThe template group it sits in; null for none.
workflow_template_idstringRequired

WorkflowTemplateCreateInput​

FieldTypeRequiredDescription
canvasobjectRequiredThe builder canvas (format workflow_canvas, version 1): an object with nodes, edges and sections.
entity_sub_typestring or nullOptionalThe document type the template applies to; absent for any.
entity_typestring or nullOptionalThe entity the template applies to; absent for any.
namestringRequiredThe template's name, up to 500 characters.
parent_workflow_template_idstring or nullOptionalSave this as a new version of the template this ID names (any of its versions); null or absent for a new template.
project_idstring or nullOptionalThe project the template applies to; null or absent for any.
stepsarray of WorkflowTemplateStepInputRequiredThe template's steps. A canvas without steps goes through POST .../compile instead.
workflow_template_group_idstring or nullOptionalThe group to file it in; null or absent for none.

WorkflowTemplateStepInput​

FieldTypeRequiredDescription
inputsarray of WorkflowTemplateStepSettingInputOptional
labelstring or nullOptional
node_idstringRequired
node_typestringRequiredThe step type, as list_node_types names it (for example StartNode).
original_node_idstring or nullOptionalA source step in the visible parent lineage whose unchanged credentials may be retained, independent of step identity.
outputsarray of WorkflowTemplateStepOutputInputOptional
previous_node_idstring or nullOptionalThe step's node_id in the version it was copied from, so it keeps its identity; null for a new step.

WorkflowTemplateStepOutputInput​

FieldTypeRequiredDescription
response_node_idstring or nullOptional
typestringRequired
valuestring or nullOptional

WorkflowTemplateStepSettingInput​

FieldTypeRequiredDescription
redactedbooleanOptionaltrue when the value is a redacted credential the read replaced. Send it back as the marker to keep the credential the step it continues stores (previous_node_id); a marker on a step with no stored credential is refused.
typestringRequired
valuestring or nullOptional