---
search:
  tags:
    - timebookings
    - POST
seo:
  description: >-
    Creates a new time booking entry to record working hours spent on a task or…
    Reference for the POST /timebookings endpoint in the Leadtime Public API
    API.
sidebar:
  badge: POST
  label: Create a new time booking
title: Create a new time booking
type: openapi-operation
---
Creates a new time booking entry to record working hours spent on a task or project.

**What is a Time Booking?**
A time booking is a record of working hours that you have spent on a specific task or project. Time bookings are used for retroactive time tracking - documenting work that has already been completed.

**Two types of time bookings:**
1. **Task-based**: Time logged to a specific task within a project. Use this when you want to track time for a particular work item (e.g., "Fix bug in login form"). The time automatically counts toward the parent project.
2. **Project-based**: Time logged directly to a project without a specific task. Use this for general project activities that are not tied to a particular task (e.g., "Marketing research for Q1 campaign").

**Required information:**
- **Type**: Either "task" or "project"
- **Task ID** (if type is "task"): The UUID of the task you worked on
- **Project ID** (if type is "project"): The UUID of the project
- **Activity ID**: The type of work performed (e.g., development, design, management). Activities are defined in your workspace settings.
- **Hours**: The amount of time spent (decimal format, e.g., 2.5 for 2 hours 30 minutes)
- **Date**: The date when the work was performed (ISO date format: YYYY-MM-DD)

**Optional information:**
- **Minutes**: Additional minutes (0-59) to add to the hours. If you provide both hours and minutes, they are combined (e.g., hours: 2, minutes: 30 = 2.5 hours total).
- **Comment**: Notes about what was accomplished during this time

**How it works:**
- Time bookings are always created for the authenticated user (you cannot log time for other users)
- When logging time to a task, the system automatically links it to the task's parent project
- The time entry is immediately available in time tracking reports and project analytics
- Hours and minutes are combined: if you provide hours: 2 and minutes: 30, the total is 2.5 hours

**Example use cases:**
- Documenting time spent on a completed feature
- Recording billable hours for client projects
- Tracking time for internal projects and activities
- Completing time logs at the end of the day or week

**Note:** For real-time time tracking while working, use the Time Tracker feature instead of manual time bookings.

<Operation source="api-reference" id="timebookingscontroller-createtimebooking" />
