## Clock in/out or start/end a break for the signed-in user

`POST /api/hr/v1/attendance/{action}`

Module: HR · operationId: `runAttendanceAction` · Tag: Working time · Auth: access token (`Authorization: Bearer <accessToken>`)

Clock-in and break-end open a time entry; break-start and clock-out close it.

### Parameters

| Name | In | Type | Required | Description |
|---|---|---|---|---|
| `action` | path | string | yes | (one of `clock-in`, `clock-out`, `break-start`, `break-end`) |

### Responses

- **200** Attendance (`application/json`)
- **400** Error (`application/json`)
- **409** Error (`application/json`)

Fields of the 200 answer:

- `breakMinutes` (integer): Break minutes today so far
- `employeeId` (string): Id of the employee (empty without an active employee record)
- `employeeName` (string): Display name of the employee
- `registered` (boolean): The caller has an active employee record (false: nothing else is filled)
- `since` (string (date-time)): When the current state began (clock-in or break start)
- `status` (string): Current attendance state (one of `CLOCKED_IN`, `ON_BREAK`, `CLOCKED_OUT`)
- `targetMinutes` (integer): Today's target minutes
- `workedMinutes` (integer): Minutes worked today so far

Example 200 answer:

```json
{
  "breakMinutes": 0,
  "employeeId": "e5a1c3d7-2b4f-4c6e-8a0b-1d3f5b7c9e02",
  "employeeName": "Sophie Huber",
  "registered": true,
  "since": "2026-11-19T06:31:00Z",
  "status": "CLOCKED_IN",
  "targetMinutes": 480,
  "workedMinutes": 145
}
```

### Example request

```bash
curl -X POST 'https://api.mbcom.cloud/api/hr/v1/attendance/clock-in' \
  -H "Authorization: Bearer $ACCESS_TOKEN"
```
