---
search:
  tags:
    - billing
    - POST
seo:
  description: >-
    What does this do? Sets the billed… Reference for the POST
    /billing/potential-invoices/{id}/tasks/{taskId}/billed-time endpoint in the
    Leadtime Public API API.
sidebar:
  badge: POST
  label: Set task billed time
title: Set task billed time
type: openapi-operation
---
**What does this do?**
Sets the billed time (hours) for a task in a potential invoice. The billed time is the amount of time that will be charged to the customer, which may differ from the actual time spent on the task.

**When to use:**
- To adjust the billed hours up or down from the actual time spent
- To bill the estimated time instead of actual time
- To correct billing amounts before finalizing the invoice

**How it works:**
- Updates the task's billedTime field directly
- The billed time is used to calculate the total charge (billedTime × hourly rate)
- Can be set to any non-negative number
- Setting a different value than spent time will show a difference in the invoice details

**Task requirements:**
- Task must belong to the potential invoice's project
- Task must not be already billed (billed: false)
- User must have access to the project

**Invoice ID Format:**
The invoice ID follows the format: &#123;type&#125;::&#123;projectId&#125;::&#123;dateFrom&#125;::&#123;dateTo&#125;
- Example: SingleProject::0e9d033a-ab41-4212-8637-66c4e3b01fe2::2025-10-01::2025-10-31

**Permission requirements:**
Requires Invoices.manage permission and access to the project.

<Operation source="api-reference" id="potentialinvoicescontroller-settaskbilledtime" />
