VocalDocscontracts 1.65.0

Archive a Workflow

DELETE /v1/workflows/{workflow_id}

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

Archives the Workflow at the revision If-Match names and answers it with archived_at set (1.59.0). Nothing is deleted: the versions Agent versions pin keep running, and the Workflow can still be read; a later write, publish or activation is refused with workflow_archived, and an Agent draft may no longer name it.

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 DELETE "$VOCAL_API/v1/workflows/wfl_..." \
  -H "Authorization: Bearer $VOCAL_API_KEY" \
  -H 'If-Match: "1"'

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.

Responses

StatusContent typeShapeError codes
200application/jsonWorkflow
400application/jsonErrorEnvelopeinvalid_request
401application/jsonErrorEnvelopeunauthenticated
403application/jsonErrorEnvelopeforbidden, org_suspended
404application/jsonErrorEnvelopenot_found
409application/jsonErrorEnvelopeworkflow_archived
412application/jsonErrorEnveloperevision_mismatch
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.