Magidoc

changeApprovalStageApprover
Mutation

Add or change an approver at a specific position in an approval stage. This is the primary way to assign approvers (users, teams, placeholders, or external approvers) to approval stages. The index parameter specifies which approval slot to update (0 for first approver, 1 for second, etc). If an approver already exists at that index, they will be replaced. If the index is beyond the current array length, a new approval will be added.

Arguments

#

actionId

ID !
Non-null

ID of the action containing the approval stage

stageId

ID !
Non-null

ID of the approval stage to modify. Use the stage._id field from approvalStages query, not the sortIndex.

type

Non-null

Type of approver being added (user, team, placeholder, or external)

index

Non-null

Position in the approvals array where to add/replace the approver (0 for first position, 1 for second, etc)

approvalItemId

ID !
Non-null

ID of the approver to assign (user ID, team ID, placeholder ID, or external user ID)

Response

#

Returns ApprovalStage .

Example

#