VocalDocscontracts 1.65.0

Update the Workflow draft

PATCH /v1/workflows/{workflow_id}

PropertyValue
Operationupdate_workflow
GroupWorkflows
Scopeworkflows:write
Route classcontrol
IdempotencyNo Idempotency-Key
AuditAudited workflow.update (mutation)
Released in1.59.0
Phase 0 hostServed (the hosted api pins 1.65.0)

Replaces the named fields of the draft at the revision If-Match names and checks the merged definition as a create does (1.59.0). scope is fixed at create. An archived Workflow is refused with workflow_archived.

Request

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

curl -X PATCH "$VOCAL_API/v1/workflows/wfl_..." \
  -H "Authorization: Bearer $VOCAL_API_KEY" \
  -H 'If-Match: "1"' \
  -H "Content-Type: application/json" \
  -d '{}'

Parameters

NameInTypeRequiredDescription
workflow_idpathWorkflowIdyesThe id of a Workflow: wfl_ and the row's UUIDv7 in 26 Crockford base32 characters. Opaque and safe to log.
if-matchheaderstringyesThe revision the change was made against, quoted as the ETag returns it, or * to overwrite.

Request body

Content type application/json, required: WorkflowUpdateRequest.

FieldTypeRequiredDescription
agent_idAgentIdno
correlationWorkflowCorrelationInputno
descriptionstring or nullnoFor reviewers; never spoken or sent to a model.
entryWorkflowNodeIdno
inputsmap of WorkflowFieldInputnoCall variables (conversation) or start inputs (process).
limitsWorkflowLimitsInputno
namestringnoKebab-case, unique per Organization.
nodesarray of WorkflowNodeInputnoReplaces every node. The merged draft is checked as a create is.
outputsmap of WorkflowFieldInputnoThe typed result returned to a parent or a starting Process.
settingsmap of WorkflowSettingnoProcess scope: named thresholds and constants that evaluate nodes read.
slotsmap of WorkflowFieldInputnoConversation scope: the Session's typed slots.
varsmap of WorkflowFieldInputnoProcess scope: the instance's working data.

Responses

StatusContent typeShapeError codes
200application/jsonWorkflow
400application/jsonErrorEnvelopeinvalid_request
401application/jsonErrorEnvelopeunauthenticated
403application/jsonErrorEnvelopeforbidden, org_suspended
404application/jsonErrorEnvelopenot_found
409application/jsonErrorEnvelopeworkflow_archived
412application/jsonErrorEnveloperevision_mismatch
422application/jsonErrorEnvelopevalidation_failed, capability_not_available
428application/jsonErrorEnvelopeprecondition_required
429application/jsonErrorEnveloperate_limited
500application/jsonErrorEnvelopeinternal_error

Fields of the 200 answer

The shape is Workflow.

FieldTypeRequiredDescription
active_versioninteger or nullyesThe version the next Agent version publish pins, or null when none is active.
agent_idAgentIdnoConversation scope only, and required there: the default Agent, which supplies voice, transcriber, model, Policies, Tools and destinations.
archived_atTimestamp or nullyesWhen DELETE archived the Workflow, or null. An archived Workflow takes no write, publish or activation (409 workflow_archived); its pinned versions keep running.
correlationWorkflowCorrelationno
created_atTimestampyes
descriptionstring or nullyesFor reviewers; never spoken or sent to a model.
entryWorkflowNodeIdyes
idWorkflowIdyes
inputsmap of WorkflowFieldnoCall variables (conversation) or start inputs (process).
latest_versioninteger or nullyesThe highest published version, or null before the first publish.
limitsWorkflowLimitsyes
namestringyesKebab-case, unique per Organization.
nodesarray of WorkflowNodeyesExactly one entry node; at most 200 nodes, loop bodies included (target).
object"workflow"yes
organization_idOrganizationIdyes
outputsmap of WorkflowFieldnoThe typed result returned to a parent or a starting Process.
revisionintegeryesCounts writes to the draft; returned as the ETag and required in If-Match.
scopeWorkflowScopeyes
settingsmap of WorkflowSettingnoProcess scope: named thresholds and constants that evaluate nodes read.
slotsmap of WorkflowFieldnoConversation scope: the Session's typed slots.
updated_atTimestampyes
varsmap of WorkflowFieldnoProcess scope: the instance's working data.