メインコンテンツまでスキップ

Start a workflow.

POST/api/v1/workflowsworkflows:write
注記

このページの操作の説明は、API の OpenAPI 文書のとおり英語で記載しています。

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.

スコープworkflows:write
非同期いいえ
MCP ツールcreate_workflow
Portal の権限start_workflows

パラメーター​

名前場所型必須説明
Docwize-Versionheaderstring (date)任意
Idempotency-Keyheaderstring任意max 255

リクエスト本文​

Content-Type型
application/jsonWorkflowCreateInput

応答​

ステータス説明本文
201Success.application/json Workflow または 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

エラー​

この操作が返す可能性のある problem のコードです。各コードからそのページに移動できます。

スキーマ​

UserRef​

フィールド型必須説明
display_namestring必須
kindstring: user, system, integration または string必須
user_idstring または null必須

Workflow​

フィールド型必須説明
due_atstring (date-time) または null必須
is_cancelledboolean必須
is_completedboolean必須
open_action_countinteger必須≥ -2147483648; ≤ 2147483647
open_action_count_for_meinteger必須≥ -2147483648; ≤ 2147483647
recipientsWorkflowRecipient の配列必須Who the workflow was sent to (its recipients): the people and groups it shows to, beside the requests it sends them.
started_atstring (date-time) または null必須
started_byUserRef必須
statusstring必須cancelled, failed, in_progress, completed or pending (open enum).
subjectstring必須
template_namestring または null必須
workflow_idstring必須
workflow_template_version_idstring または null必須The version of the template the workflow runs.

WorkflowCreateInput​

フィールド型必須説明
document_idsstring の配列任意The documents the workflow runs on, one item each. Required unless without_document is true.
dry_runboolean任意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.
inputsWorkflowStartInputInput の配列任意
messagestring または null任意A message posted to the workflow when it starts.
subjectstring必須
without_documentboolean任意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_idstring必須The template's root ID; the latest version runs.

WorkflowRecipient​

フィールド型必須説明
group_idstring または null必須
typestring必須user, group or unknown (open enum).
type_codestring または null必須The stored type code, for an unknown recipient type; null otherwise.
userUserRef または null必須

WorkflowStartInputInput​

フィールド型必須説明
node_idstring または null任意The Custom Input step the answer is for (its node_id from get_workflow_template_start_inputs).
node_typestring必須
node_valuestring または null任意