---
title: "Insert or update user attendance records"
method: POST
path: "/attendance/{userId}/user"
tags: ["[v1] Attendance"]
---

# Insert or update user attendance records

`POST /attendance/{userId}/user`

Inserts or updates attendance records for a user. Each entry corresponds to one day.
The `shouldBe` and `vacationTime` fields are optional.

**Important:** The date range constraint does not mean a limit of 100 entries, but rather that the maximum range between the earliest and latest dates in the payload must not exceed 100 days.

## Path parameters

- `userId` integer, required

## Request body

- object[] — List of attendance records to insert or update
  - `day` string, date
  - `dayTypeId` integer
  - `shouldBe` integer — Optional - expected working time in minutes
  - `vacationTime` integer — Optional - vacation time in minutes

## Response `200`

Attendance was updated successfully

- object
  - `message` string

## Other responses

- `400` — Bad Request - Invalid payload
- `403` — Forbidden - Not allowed to modify attendance or attendance module is disabled
- `404` — Not Found - User was not found

---

[API](https://skmtc.net/timecamp/apis/timecamp-api.md) · [All operations](https://skmtc.net/timecamp/apis/timecamp-api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/timecamp/timecamp-api/versions/c7e9d1f9cf61/schema)
