---
search:
  tags:
    - attendance
    - POST
seo:
  description: >-
    Creates a new attendance record or updates an existing one for the current
    employee. Reference for the POST /attendance endpoint in the Leadtime Public
    API API.
sidebar:
  badge: POST
  label: Create or update attendance record
title: Create or update attendance record
type: openapi-operation
---
Creates a new attendance record or updates an existing one for the current employee.

**What is Attendance Tracking?**
Attendance tracking records when employees clock in and clock out (check in/check out). It captures the start and end times of work periods, allowing the system to:
- Calculate total hours worked
- Track presence and absence
- Monitor team availability
- Integrate with time tracking and overtime calculations

**What can be recorded:**
- **Date**: The work date
- **Start time** (timeFrom): When the employee clocked in (required, format: HH:mm)
- **End time** (timeTo): When the employee clocked out (optional, format: HH:mm)
- **Mood**: Employee mood for the day (Good, Neutral, Bad)
- **Comment**: Optional notes about the workday

**How it works:**
- If an attendance record already exists for the date, it will be updated
- If no record exists, a new one will be created
- Total hours are automatically calculated from start and end times
- The system validates that attendance doesn't overlap with vacation or sick days

**Note:** This endpoint is only available for employee accounts. Attendance tracking must be enabled in the workspace settings.

<Operation source="api-reference" id="attendancecontroller-createorupdate" />
