Create a new attendance.

This endpoint creates an attendance entry for one employee. A user identifier is required (userId, email or externalId).
date and startTime are required. The new entry has a unique _id returned in the response.

Overlapping: A day accepts many attendance entries per employee but they cannot overlap. Creating an entry whose start or end falls inside an existing entry for the same day and user returns BAD REQUEST.

Overnight shifts (single entry): To create one entry for a shift that ends the next calendar day (e.g. 22:00 on Jan 1 to 06:00 on Jan 2), send date = start day (e.g. 2026-01-01), startTime = 22:00:00, endTime = 06:00:00, and isOvernightShift = true. The API stores it as one entry on the start day with end time interpreted as 06:00 next day. For overnight shifts, endTime cannot be later than 18:00; otherwise the API returns 400 with message "For overnight shifts, end time cannot be later than 18:00." If you do not use isOvernightShift, then endTime is always the same day as date; for overnight you would need two separate entries (one per day).
Same-day rule: When isOvernightShift is not set or is false, endTime must be after startTime. Sending an end time earlier than or equal to start time (e.g. 22:00 start and 06:00 end) without isOvernightShift = true returns 400 with message "When isOvernightShift is not set, endTime must be after startTime. For shifts that end the next day, set isOvernightShift to true."

Language
URL
Click Try It! to start a request and see the response here!