Learn how to create multi-step approval workflows using the SignumFlow API with smart routing and analytics.
Creating a workflow involves three main steps:
Define a workflow with multiple approval steps. Each step includes approvers, estimated duration, and execution order.
name - Workflow name (max 100 characters)isSequential - Whether steps execute in order (default: true)steps - Array of approval steps with approvers and estimated duration# Create a new approval workflow
curl -X POST "https://api.signumflow.com/api/v1/workflows" \
-H "Authorization: sf_test_YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"name": "Contract Approval",
"description": "3-step contract approval process",
"isSequential": true,
"steps": [
{
"step_id": "legal_review",
"name": "Legal Review",
"order": 1,
"type": "approval",
"approvers": [
{"email": "[email protected]", "name": "Legal Team"}
],
"estimated_duration": 120
},
{
"step_id": "finance_approval",
"name": "Finance Approval",
"order": 2,
"type": "approval",
"approvers": [
{"email": "[email protected]", "name": "CFO"}
],
"estimated_duration": 60
},
{
"step_id": "executive_approval",
"name": "Executive Approval",
"order": 3,
"type": "approval",
"approvers": [
{"email": "[email protected]", "name": "CEO"}
],
"estimated_duration": 30
}
]
}'Once your workflow is created, execute it for a specific document. SignumFlow will automatically route to the appropriate approvers using smart routing.
# Execute workflow for a document
curl -X POST "https://api.signumflow.com/api/v1/workflows/{workflow_id}/execute" \
-H "Authorization: sf_test_YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"document_id": "doc_xyz789",
"submitter_email": "[email protected]",
"execution_mode": "standard",
"priority": "high"
}'Retrieve workflow details including execution metrics, step performance, and optimization recommendations.
# Get workflow details and analytics
curl -X GET "https://api.signumflow.com/api/v1/workflows/{workflow_id}" \
-H "Authorization: sf_test_YOUR_API_KEY"AI-powered routing assigns documents to the most appropriate approvers based on historical data and performance.
Track workflow performance with bottleneck detection, success rates, and completion time metrics.
Get AI-driven recommendations to optimize your workflows for faster completion times.