Reusable Workflows
Publish versioned execution policies and launch individual runs.
Reusable workflows pin templates, participant roles, signing methods, e-stamping, notifications, and optional internal approval into a versioned execution policy. Use them when callers should supply only recipients and variable field values.
Lifecycle
POST /workflowscreates a definition and version 1 draft.PATCH /workflows/{workflowId}edits the current draft. Editing a workflow after publication creates a new draft version.POST /workflows/{workflowId}/publishvalidates its templates and makes the draft immutable. The previously published version is archived.POST /workflows/{workflowId}/runsalways launches the latest published version and returns the created envelope plus its approval state.
The API key needs workflows:read for list/get and workflows:write for create,
update, publish, and run.
const workflow = await client.workflows.create({
name: "NDA approval",
config: {
documents: [{ templateId: "tpl_123", label: "NDA" }],
participants: [{
key: "signer",
label: "Signer",
order: 1,
signatureMethod: "electronic",
}],
execution: { mode: "sequential", emailNotifications: "all" },
approvalStages: [],
},
});
await client.workflows.publish(workflow.definition.id);
const run = await client.workflows.run(workflow.definition.id, {
title: "NDA — Acme",
recipients: [{
participantKey: "signer",
name: "Asha Rao",
email: "asha@example.com",
}],
idempotencyKey: "nda-acme-2026-07",
});idempotencyKey on a single run is accepted by the public contract.