Reject a pending workflow proposal¶
Reject a pending proposal while retaining accepted and saved plans. See Common information for objects, variables, and environment boundaries.
POST https://api.moi.matrixorigin.cn/v5/workflow/v2/workflow-candidates/reject-proposal
Before you call this API¶
Prepare a personal access token with workflow operation privileges for the target workspace. Use conversations, tasks, and artifacts from the same environment. Install jq and set example variables.
Request body¶
curl -X POST "https://api.moi.matrixorigin.cn/v5/workflow/v2/workflow-candidates/reject-proposal" \
-H "X-API-Key: $AI_STUDIO_API_KEY" \
-H "X-Workspace-ID: $WORKSPACE_ID" \
-H 'Content-Type: application/json' \
--data-binary "$(jq -n --arg v0 "$PROPOSAL_ID" '{"proposal_id":$v0}')"
Reject only pending proposals, changing status to rejected. This neither revokes accepted records nor deletes or rolls back published workflows. Repeated rejection is not successful replay. Read history when the result is unknown rather than treating rejection as an idempotent write.
Fields |
Type |
Required |
Description |
|---|---|---|---|
|
string |
Yes |
Pending proposal ID in the current workspace. |
Successful response¶
{
"code": "OK",
"msg": "OK",
"data": {
"proposal_id": "proposal-1",
"status": "rejected"
}
}
Field |
Type |
Description |
|---|---|---|
|
string |
OK on success. |
|
string |
Response information. |
|
object |
Result of this operation. |
|
string |
Rejected proposal. |
|
string |
rejected after success. |
Error response¶
Handle HTTP status and business fields. History and recovery have dedicated errors; see Errors and environments. Retain identity, source references, and operation identifiers, then check state before proceeding. Do not automatically switch workspace, candidate, or confirmation key.