Starts a workflow from an active template on documents you may read (a test run by a template author, dry_run, may use an inactive draft), or on no document at all with without_document true, as a record's sync-only workflow starts. The workflow and its rows are created now; the run is queued and the workers carry it on, so the workflow's status is pending until they do. An external recipient needs Workflows Assign External; a dry run also needs Run Workflow Tests.
| |
|---|
| Scope | workflows:write |
| Asynchronous | No |
| MCP tool | create_workflow |
| Portal permissions | start_workflows |
Parameters
| Name | In | Type | Required | Description |
|---|
Docwize-Version | header | string (date) | Optional | |
Idempotency-Key | header | string | Optional | max 255 |
Request body
Responses
Errors
The problem codes this operation can answer with. Each code links to its page.
Schemas
UserRef
| Field | Type | Required | Description |
|---|
display_name | string | Required | |
kind | string: user, system, integration or string | Required | |
user_id | string or null | Required | |
Workflow
| Field | Type | Required | Description |
|---|
due_at | string (date-time) or null | Required | |
is_cancelled | boolean | Required | |
is_completed | boolean | Required | |
open_action_count | integer | Required | ≥ -2147483648; ≤ 2147483647 |
open_action_count_for_me | integer | Required | ≥ -2147483648; ≤ 2147483647 |
recipients | array of WorkflowRecipient | Required | Who the workflow was sent to (its recipients): the people and groups it shows to, beside the requests it sends them. |
started_at | string (date-time) or null | Required | |
started_by | UserRef | Required | |
status | string | Required | cancelled, failed, in_progress, completed or pending (open enum). |
subject | string | Required | |
template_name | string or null | Required | |
workflow_id | string | Required | |
workflow_template_version_id | string or null | Required | The version of the template the workflow runs. |
| Field | Type | Required | Description |
|---|
document_ids | array of string | Optional | The documents the workflow runs on, one item each. Required unless without_document is true. |
dry_run | boolean | Optional | Run as a test: documents are not changed and real recipients are not notified. A test run needs Run Workflow Tests and may use an inactive draft template. |
inputs | array of WorkflowStartInputInput | Optional | |
message | string or null | Optional | A message posted to the workflow when it starts. |
subject | string | Required | |
without_document | boolean | Optional | Start the workflow on no document, as a record's sync-only workflow does: its one item is not a document. document_ids must then be empty. |
workflow_template_id | string | Required | The template's root ID; the latest version runs. |
WorkflowRecipient
| Field | Type | Required | Description |
|---|
group_id | string or null | Required | |
type | string | Required | user, group or unknown (open enum). |
type_code | string or null | Required | The stored type code, for an unknown recipient type; null otherwise. |
user | UserRef or null | Required | |
| Field | Type | Required | Description |
|---|
node_id | string or null | Optional | The Custom Input step the answer is for (its node_id from get_workflow_template_start_inputs). |
node_type | string | Required | |
node_value | string or null | Optional | |