---
title: "Create Workflow Approval Procedure"
method: POST
path: "/v2/workflows/{workflow_id}/approval-procedures"
tags: ["Workflow Approval Procedure API"]
---

# Create Workflow Approval Procedure

`POST /v2/workflows/{workflow_id}/approval-procedures`

Create a new approval procedure for a workflow.

## Path parameters

- `workflow_id` string, required — The ID of the workflow to create the approval procedure for.

## Request body

- object
  - `steps` SvflowPubapimodelsApprovalStep[] — The approval steps for the procedure.
    - `id` string — The ID of the approval step.
    - `allowSelfApproval` boolean, nullable — Whether the step can be approved by the requester themselves. optional so server can distinguish "not set" from "explicitly false" (DB defaults to TRUE; proto3 defaults bool to false)
    - `approvers` SvflowPubapimodelsApprover[] — Exactly one of approvers or custom_workflow must be set. Mutual exclusivity validated server-side.
      - union — An approver source with notification preference.
        - object — App-instance owners as approvers. Only valid for access policy approval procedures.
          - `appOwner` SvflowPubapimodelsAppOwnerApprover, required — The owners of the app instance the requested role belongs to. Only valid for access policy approval procedures.
          - `notify` boolean — Whether to notify this approver when the step is pending.
        - object — A Serval group as approvers.
          - `group` SvflowPubapimodelsGroupApprover, required — A Serval group as an approver.
            - `groupId` string — The ID of the Serval group.
          - `notify` boolean — Whether to notify this approver when the step is pending.
        - object — The requester's manager as an approver.
          - `manager` SvflowPubapimodelsManagerApprover, required — The requester's manager as an approver.
          - `notify` boolean — Whether to notify this approver when the step is pending.
        - object — Resource owners as approvers. Only valid for access policy approval procedures.
          - `resourceOwner` SvflowPubapimodelsResourceOwnerApprover, required — The owners of the resource the requested role belongs to. Only valid for access policy approval procedures.
          - `notify` boolean — Whether to notify this approver when the step is pending.
        - object — Role (entitlement) owners as approvers. Only valid for access policy approval procedures.
          - `roleOwner` SvflowPubapimodelsRoleOwnerApprover, required — The owners of the requested role (entitlement) itself. Only valid for access policy approval procedures.
          - `notify` boolean — Whether to notify this approver when the step is pending.
        - object — Team owners as approvers. Only valid for access policy approval procedures.
          - `teamOwner` SvflowPubapimodelsTeamOwnerApprover, required — The owners of the team that owns the requested role's app instance. Only valid for access policy approval procedures.
          - `notify` boolean — Whether to notify this approver when the step is pending.
        - object — A specific user as an approver.
          - `user` SvflowPubapimodelsUserApprover, required — A specific user as an approver.
            - `userId` string — The ID of the user.
          - `notify` boolean — Whether to notify this approver when the step is pending.
    - `customWorkflow` SvflowPubapimodelsCustomWorkflowConfig — Configuration for a custom workflow that determines approvers or auto-approves.
      - `workflowId` string — The ID of the workflow to execute.
    - `approverJustificationMode` string — Controls whether approvers are asked for a justification when deciding this step. Valid values: "not_requested", "optional", "required", "required_for_approval", "required_for_denial". Empty defaults to "not_requested". The "_for_approval" and "_for_denial" variants make the justification mandatory only when approving or denying, respectively.

## Response `200`

Success

- SvflowPublicapiCreateWorkflowApprovalProcedureResponse
  - `data` SvflowPubapimodelsWorkflowApprovalProcedure
    - `id` string — The ID of the workflow approval procedure.
    - `workflowId` string — The ID of the workflow this approval procedure belongs to.
    - `steps` SvflowPubapimodelsApprovalStep[] — The steps in the approval procedure.
      - `id` string — The ID of the approval step.
      - `allowSelfApproval` boolean, nullable — Whether the step can be approved by the requester themselves. optional so server can distinguish "not set" from "explicitly false" (DB defaults to TRUE; proto3 defaults bool to false)
      - `approvers` SvflowPubapimodelsApprover[] — Exactly one of approvers or custom_workflow must be set. Mutual exclusivity validated server-side.
        - union — An approver source with notification preference.
          - object — App-instance owners as approvers. Only valid for access policy approval procedures.
            - `appOwner` SvflowPubapimodelsAppOwnerApprover, required — The owners of the app instance the requested role belongs to. Only valid for access policy approval procedures.
            - `notify` boolean — Whether to notify this approver when the step is pending.
          - object — A Serval group as approvers.
            - `group` SvflowPubapimodelsGroupApprover, required — A Serval group as an approver.
              - …
            - `notify` boolean — Whether to notify this approver when the step is pending.
          - object — The requester's manager as an approver.
            - `manager` SvflowPubapimodelsManagerApprover, required — The requester's manager as an approver.
            - `notify` boolean — Whether to notify this approver when the step is pending.
          - object — Resource owners as approvers. Only valid for access policy approval procedures.
            - `resourceOwner` SvflowPubapimodelsResourceOwnerApprover, required — The owners of the resource the requested role belongs to. Only valid for access policy approval procedures.
            - `notify` boolean — Whether to notify this approver when the step is pending.
          - object — Role (entitlement) owners as approvers. Only valid for access policy approval procedures.
            - `roleOwner` SvflowPubapimodelsRoleOwnerApprover, required — The owners of the requested role (entitlement) itself. Only valid for access policy approval procedures.
            - `notify` boolean — Whether to notify this approver when the step is pending.
          - object — Team owners as approvers. Only valid for access policy approval procedures.
            - `teamOwner` SvflowPubapimodelsTeamOwnerApprover, required — The owners of the team that owns the requested role's app instance. Only valid for access policy approval procedures.
            - `notify` boolean — Whether to notify this approver when the step is pending.
          - object — A specific user as an approver.
            - `user` SvflowPubapimodelsUserApprover, required — A specific user as an approver.
              - …
            - `notify` boolean — Whether to notify this approver when the step is pending.
      - `customWorkflow` SvflowPubapimodelsCustomWorkflowConfig — Configuration for a custom workflow that determines approvers or auto-approves.
        - `workflowId` string — The ID of the workflow to execute.
      - `approverJustificationMode` string — Controls whether approvers are asked for a justification when deciding this step. Valid values: "not_requested", "optional", "required", "required_for_approval", "required_for_denial". Empty defaults to "not_requested". The "_for_approval" and "_for_denial" variants make the justification mandatory only when approving or denying, respectively.

## Other responses

- `default` — Error

---

[API](https://skmtc.net/serval/apis/serval-public-api.md) · [All operations](https://skmtc.net/serval/apis/serval-public-api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/serval/serval-public-api/versions/0549515e9384/schema)
