VocalDocscontracts 1.65.0

Activate a Workflow version

POST /v1/workflows/{workflow_id}/versions/{version}/activate

PropertyValue
Operationactivate_workflow_version
GroupWorkflows
Scopeworkflows:write
Route classcontrol
IdempotencyIdempotency-Key accepted: a retry with the same key replays the first answer
AuditAudited workflow.version.activate (mutation)
Released in1.59.0
Phase 0 hostServed (the hosted api pins 1.65.0)

Makes the version the active one and answers it (1.59.0). The change reaches Calls only through the next Agent version publish, which pins it; a Call never changes Workflow versions.

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 POST "$VOCAL_API/v1/workflows/wfl_.../versions/1/activate" \
  -H "Authorization: Bearer $VOCAL_API_KEY" \
  -H "Idempotency-Key: $(uuidgen)"

Parameters

NameInTypeRequiredDescription
workflow_idpathWorkflowIdyesThe id of a Workflow: wfl_ and the row's UUIDv7 in 26 Crockford base32 characters. Opaque and safe to log.
versionpathintegeryesA version number, from 1.
idempotency-keyheaderstringnoA client-chosen key, kept 24 hours per Organization, environment and route. A replay returns the stored response.

Responses

StatusContent typeShapeError codes
200application/jsonWorkflowVersion
400application/jsonErrorEnvelopeinvalid_request
401application/jsonErrorEnvelopeunauthenticated
403application/jsonErrorEnvelopeforbidden, org_suspended
404application/jsonErrorEnvelopenot_found
409application/jsonErrorEnvelopeworkflow_archived, idempotency_in_progress, idempotency_key_reused
429application/jsonErrorEnveloperate_limited
500application/jsonErrorEnvelopeinternal_error

Fields of the 200 answer

The shape is WorkflowVersion.

FieldTypeRequiredDescription
activebooleanyesTrue for the active version: the one the next Agent version publish pins.
agent_idAgentIdnoConversation scope only, and required there: the default Agent, which supplies voice, transcriber, model, Policies, Tools and destinations.
correlationWorkflowCorrelationno
descriptionstring or nullyes
engine_versionstringyesThe Zen engine version the version's decisions and expressions were checked under.
entryWorkflowNodeIdyes
format_versionintegeryesThe version of the compiled form the Session runs, 1 in this release.
graph_sha256stringyesThe SHA-256 of the canonical JSON (RFC 8785) of the definition as published, in lowercase hex.
inputsmap of WorkflowFieldnoCall variables (conversation) or start inputs (process).
limitsWorkflowLimitsyes
namestringyesKebab-case, unique per Organization.
nodesarray of WorkflowNodeyesExactly one entry node; at most 200 nodes, loop bodies included (target).
notesstring or nullyes
object"workflow_version"yes
outputsmap of WorkflowFieldnoThe typed result returned to a parent or a starting Process.
pinsWorkflowPinsyes
published_atTimestampyes
published_byActorRefyes
scopeWorkflowScopeyes
settingsmap of WorkflowSettingnoProcess scope: named thresholds and constants that evaluate nodes read.
slotsmap of WorkflowFieldnoConversation scope: the Session's typed slots.
source_revisionintegeryesThe draft revision this version was published from.
statusWorkflowVersionStatusyes
varsmap of WorkflowFieldnoProcess scope: the instance's working data.
versionintegeryesThe snapshot number, from 1.
workflow_idWorkflowIdyes