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-Version | header | string (date) | 任意 | |
Idempotency-Key | header | string | 任意 | max 255 |
リクエスト本文
| Content-Type | 型 |
|---|---|
application/json | WorkflowCreateInput |
応答
| ステータス | 説明 | 本文 |
|---|---|---|
201 | Success. | application/json Workflow または object |
400 | invalid_version, malformed_json | application/problem+json Problem |
401 | token_expired, unauthenticated | application/problem+json Problem |
403 | forbidden, insufficient_scope, token_owner_inactive | application/problem+json Problem |
405 | method_not_allowed | application/problem+json Problem |
406 | not_acceptable | application/problem+json Problem |
409 | conflict, idempotency_in_progress | application/problem+json Problem |
413 | payload_too_large | application/problem+json Problem |
415 | unsupported_media_type | application/problem+json Problem |
421 | wrong_region | application/problem+json Problem |
422 | idempotency_key_reused, validation_failed | application/problem+json Problem |
500 | internal_error | application/problem+json Problem |
503 | tenant_unavailable, unavailable | application/problem+json Problem |
504 | timeout | application/problem+json Problem |
エラー
この操作が返す可能性のある problem のコードです。各コードからそのページに移動できます。
スキーマ
UserRef
| フィールド | 型 | 必須 | 説明 |
|---|---|---|---|
display_name | string | 必須 | |
kind | string: user, system, integration または string | 必須 | |
user_id | string または null | 必須 |
Workflow
| フィールド | 型 | 必須 | 説明 |
|---|---|---|---|
due_at | string (date-time) または null | 必須 | |
is_cancelled | boolean | 必須 | |
is_completed | boolean | 必須 | |
open_action_count | integer | 必須 | ≥ -2147483648; ≤ 2147483647 |
open_action_count_for_me | integer | 必須 | ≥ -2147483648; ≤ 2147483647 |
recipients | WorkflowRecipient の配列 | 必須 | 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) または null | 必須 | |
started_by | UserRef | 必須 | |
status | string | 必須 | cancelled, failed, in_progress, completed or pending (open enum). |
subject | string | 必須 | |
template_name | string または null | 必須 | |
workflow_id | string | 必須 | |
workflow_template_version_id | string または null | 必須 | The version of the template the workflow runs. |
WorkflowCreateInput
| フィールド | 型 | 必須 | 説明 |
|---|---|---|---|
document_ids | string の配列 | 任意 | The documents the workflow runs on, one item each. Required unless without_document is true. |
dry_run | boolean | 任意 | 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 | WorkflowStartInputInput の配列 | 任意 | |
message | string または null | 任意 | A message posted to the workflow when it starts. |
subject | string | 必須 | |
without_document | boolean | 任意 | 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 | 必須 | The template's root ID; the latest version runs. |
WorkflowRecipient
| フィールド | 型 | 必須 | 説明 |
|---|---|---|---|
group_id | string または null | 必須 | |
type | string | 必須 | user, group or unknown (open enum). |
type_code | string または null | 必須 | The stored type code, for an unknown recipient type; null otherwise. |
user | UserRef または null | 必須 |
WorkflowStartInputInput
| フィールド | 型 | 必須 | 説明 |
|---|---|---|---|
node_id | string または null | 任意 | The Custom Input step the answer is for (its node_id from get_workflow_template_start_inputs). |
node_type | string | 必須 | |
node_value | string または null | 任意 |