Skip to main content
POST
Create a new leave type configuration for a company. Leave types define the different categories of leave available to employees (e.g., Annual Leave, Sick Leave, etc.) along with their policies and allowances.

Authentication

Requires authentication with Bearer token. Available to:
  • Super Admin
  • HR Manager

Path Parameters

string
required
The unique identifier of the company (UUID format)Example: "123e4567-e89b-12d3-a456-426614174000"

Request Body

string
required
Name of the leave typeExample: "Annual Leave"
string
required
Short code for the leave type (typically uppercase)Example: "AL"
string
required
Detailed description of the leave typeExample: "Paid annual vacation time for all employees"
number
required
Total number of days allowed per year for this leave typeExample: 20
boolean
required
Whether this leave type is paid or unpaidExample: true
boolean
required
Whether documentation (e.g., medical certificate) is requiredExample: false
boolean
required
Whether unused days can be carried forward to the next yearExample: true
number
required
Maximum number of days that can be carried forwardExample: 5
string
required
Hex color code for calendar displayExample: "#3B82F6"
string
required
Status of the leave type: active or inactiveExample: "active"

Response

boolean
Indicates if the request was successful
object
The created leave type object
After creating a leave type, employees in the company will need to have leave balances initialized for this type before they can request leave.