cURL
curl --request POST \ --url https://api.projectcor.com/v1/user/leaves \ --header 'Authorization: Bearer <token>' \ --header 'Content-Type: application/json' \ --data ' { "userId": 8555, "leaveTypeId": 11, "start": "2024-11-18T03:00:00Z", "end": "2024-11-19T02:59:00Z", "allDay": true } '
{ "user_id": 8555, "company_id": 2336, "leave_type_id": 11, "start": "2024-11-18T03:00:00Z", "end": "2024-11-19T02:59:00Z", "created_at": "2024-11-07 22:11:30", "updated_at": "2024-11-07 22:11:30", "all_day": false, "id": 16332 }
Creates a new leave/license.
⚠️ Important:
2024-11-18T03:00:00Z
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Bearer <token>
<token>
User ID
Leave type ID
Start date in UTC format (e.g., 2024-11-18T03:00:00Z)
End date in UTC format
Whether the leave is for the entire day
Leave created successfully
Show child attributes