VocalDocscontracts 1.65.0

Start a Process instance

POST /v1/processes

PropertyValue
Operationcreate_process
GroupProcesses
Scopeprocesses:write
Route classcontrol
IdempotencyIdempotency-Key required: a retry with the same key replays the first answer
AuditAudited processes.process.start (mutation)
Released in1.62.0
Phase 0 hostServed (the hosted api pins 1.65.0)

Starts an instance of a published process-scope Workflow version, the active one when the body names none, and answers it running (1.62.0). The inputs are checked against the version's declared inputs and the correlation key is kept as a keyed hash (ProcessIssueCode); a conversation-scope Workflow is validation_failed (workflow_not_process_scope), an archived one workflow_archived, and one with no active version, or a retired version, workflow_version_unavailable. The Idempotency-Key makes a repeated start answer the same instance.

Request

Set VOCAL_API to the base URL of your API and VOCAL_API_KEY to an API key with the processes:write scope (Authentication and keys). Replace each placeholder, such as agt_... or <name>, with your own value.

curl -X POST "$VOCAL_API/v1/processes" \
  -H "Authorization: Bearer $VOCAL_API_KEY" \
  -H "Idempotency-Key: $(uuidgen)" \
  -H "Content-Type: application/json" \
  -d '{ "workflow_id": "wfl_..." }'

Parameters

NameInTypeRequiredDescription
idempotency-keyheaderstringyesA client-chosen key, kept 24 hours per Organization, environment and route. A replay returns the stored response.

Request body

Content type application/json, required: ProcessCreateRequest.

FieldTypeRequiredDescription
correlationstringnoThe correlation key Process events match on; when omitted, the version's correlation.key over the inputs. Content: stored only as a keyed hash.
inputsmap of anynoThe start inputs, checked against the version's declared inputs; at most 32 KiB (a target). Content.
versionintegernoA published version; the Workflow's active version when omitted.
workflow_idWorkflowIdyes

Responses

StatusContent typeShapeError codes
201application/jsonProcessInstance
400application/jsonErrorEnvelopeinvalid_request
401application/jsonErrorEnvelopeunauthenticated
403application/jsonErrorEnvelopeforbidden, org_suspended
404application/jsonErrorEnvelopenot_found
409application/jsonErrorEnvelopeworkflow_archived, workflow_version_unavailable, idempotency_in_progress, idempotency_key_reused
422application/jsonErrorEnvelopevalidation_failed
429application/jsonErrorEnveloperate_limited
500application/jsonErrorEnvelopeinternal_error

Fields of the 201 answer

The shape is ProcessInstance.

FieldTypeRequiredDescription
compliance_profile_versioninteger or nullyesThe Compliance profile version pinned at the start (section 10, rule 3).
correlatedbooleanyesTrue when the instance has a correlation key, which Process events match on; the key is kept as a keyed hash and never answered.
current_nodesarray of WorkflowNodeIdyesThe nodes the instance is at; empty once it ended.
ended_atTimestamp or nullyes
environmentEnvironmentyes
error_codestring or nullyesWhy a failed instance failed, such as max_steps_reached, max_lifetime_reached or the failure code of the node that ended it failed; null otherwise.
idProcessInstanceIdyes
inputsobject or nullyesThe start inputs. Content; null unless the read names include=content.
interpreter_versionstringyesThe version of Vocal's interpreter the instance pinned at its start, kept by the runner until the instance ends.
object"process"yes
organization_idOrganizationIdyes
outputsobject or nullyesThe declared outputs, once the instance ended on an end node. Content; null unless the read names include=content.
project_idProjectId or nullyesThe instance's Project: the default Project until Projects ship.
started_atTimestampyes
started_byProcessStartedByyes
statusProcessInstanceStatusyes
updated_atTimestampyes
varsobject or nullyesThe working data. Content; null unless the read names include=content.
waiting_onProcessWaitingOn or nullyes
wake_atTimestamp or nullyesThe next timer of a waiting instance, mirrored from the runner; null when none.
workflow_idWorkflowIdyes
workflow_versionintegeryesThe process-scope Workflow version the instance runs to its end (section 10).