Approvals
Create Approval Workflow
Create an approval workflow for leave requests, memos, or expenses
POST
Overview
Approval workflows define multi-step approval processes for different entity types within your company. Each workflow consists of sequential steps where approvers review and take action on submissions.Only users with Super Admin or HR Manager roles can create approval workflows.
Request Body
string
required
Type of workflow to create. Must be one of:
leave- For leave requestsmemo- For company memosexpense- For expense claims
uuid
Company ID for the workflow. If not provided, uses the authenticated user’s company ID.
uuid
Optional department ID to restrict this workflow to a specific department. If null, the workflow applies company-wide.
array
required
Array of approval steps. Each step is processed sequentially.Example structure:
step(integer): Step sequence numberrole_id(uuid): Required role for this approval stepapprover_id(uuid, optional): Specific approver, or null for any user with the role
boolean
default:"true"
Whether the workflow is active. Inactive workflows are not used for new submissions.
Response
boolean
Indicates if the request was successful
object
The created approval workflow object
Example Request
Workflow Design Best Practices
Sequential vs Parallel Approvals
Sequential vs Parallel Approvals
Currently, approval workflows are sequential - each step must be completed before the next begins. Design your steps accordingly, with the most critical approver first.
Department-Specific vs Company-Wide
Department-Specific vs Company-Wide
- Department-specific workflows: Use when different departments have different approval requirements
- Company-wide workflows: Leave
departmentIdas null to apply the same workflow across all departments
Role-Based vs Specific Approvers
Role-Based vs Specific Approvers
- Set
approver_idto null to allow any user with the specified role to approve - Set a specific
approver_idto require approval from a particular person
Error Responses
Invalid request body or workflow configuration
Missing or invalid authentication token, or insufficient permissions
Server error while creating the workflow