---
title: "Create time entry"
method: POST
path: "/time-entries"
tags: ["TimeEntries"]
---

# Create time entry

`POST /time-entries`

## Request

- Base URL: `https://app.buildworkpro.com/api/v1`
- URL: `https://app.buildworkpro.com/api/v1/time-entries`
- Auth: HTTP bearer

## Headers

- `Idempotency-Key` string, uuid

## Request body

- object
  - `userId` integer, required
  - `projectId` integer, required
  - `taskId` integer, nullable
  - `phaseId` integer, nullable
  - `date` string, required: Calendar day, YYYY-MM-DD. A datetime is accepted and read as the day it names.
  - `hours` number, required
  - `notes` string, nullable
  - `entryType` string
  - `clockIn` string, nullable
  - `clockOut` string, nullable
  - `lat` number, nullable
  - `lng` number, nullable
  - `clockInAccuracyM` number, nullable
  - `clockOutLat` number, nullable
  - `clockOutLng` number, nullable
  - `clockOutAccuracyM` number, nullable
  - `clientId` string, uuid, nullable: Optional idempotency key (a UUID the client mints once per queued create and repeats on every retry). A repeat with the same key from the same user returns the existing record with 200 instead of creating a duplicate.

## Response `200`

Replay of an earlier create with the same `clientId` — the existing time entry, unchanged

- object
  - `data` TimeEntry, required
    - `id` integer, required
    - `projectId` integer, required
    - `userId` integer, required
    - `taskId` integer, nullable, required
    - `phaseId` integer, nullable, required
    - `date` string, date, required
    - `hours` string, required
    - `hourlyRate` string, nullable, required
    - `totalCost` string, nullable, required
    - `description` string, nullable, required
    - `lat` number, nullable, required
    - `lng` number, nullable, required
    - `isReviewed` boolean, required
    - `createdAt` union, required
      - string, date-time
      - string
    - `updatedAt` union, required
      - string, date-time
      - string
  - `meta` ResponseMeta, required
    - `request_id` string: Server-generated request identifier
    - `pagination` PaginationMeta
      - `cursor` string, nullable, required: Opaque cursor for the next page; null when no more results
      - `has_more` boolean, required: Whether more pages are available after this one
      - `count` integer, required: Items in this page

## Other responses

- `201`: Created
- `409`: Error
- `422`: Error

---

[API](https://skmtc.dev/buildworkpro/apis/buildworkpro-api.md) · [All operations](https://skmtc.dev/buildworkpro/apis/buildworkpro-api/llms.txt) · [OpenAPI document](https://skmtc.dev/buildworkpro/apis/buildworkpro-api/revisions/441cf40012f7?raw)
