approvalType is null, no approval is required and requiredApprovals must be null or omitted.approvalType is set (e.g. parallel), approvers must contain between 1 and 10 entries.requiredApprovals (optional) is the n-of-x threshold: an integer in [1, approvers.length]. When omitted, the backend defaults to approvers.length (all required, matching legacy parallel behavior).beforeId and/or afterId to position the stage between existing ones. Cannot insert before the first stage or after the last stage of the workflow.curl --location 'https://app.hustro.com/api/v2/project//workflow//stage' \
--header 'hustro-client-version;' \
--header 'hustro-client: m2m' \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '{
"name": "Sophia Gutkowski",
"icon": "assignment",
"beforeId": "dC0CCb8a93acC03532a79DC3",
"afterId": "FC9EDa7Fe4C5Fd4bF84BC5B6",
"approvalType": "sequential",
"approvers": [
{
"userId": "36FA75d3Bc071cd0f43F3F8a"
},
{
"userId": "B4d2a1a8B2a0606dF3eFd7B9"
},
{
"userId": "1a284cE03ba5cDB16f81A261"
},
{
"userId": "e9687cA796DC9CDaCA5ccEBD"
},
{
"userId": "ba2c00F3cf65573e1BccAA9e"
}
]
}'{
"_id": "string",
"createdAt": "string",
"createdBy": "string",
"modifiedAt": "string",
"modifiedBy": "string",
"name": "string",
"icon": "string",
"order": "string",
"approvalType": "string",
"approvers": [
{
"userId": "string",
"order": "string"
}
],
"autoApprove": true,
"deleted": true
}