---
search:
  tags:
    - billing
    - POST
seo:
  description: >-
    What does this do? Sets both the… Reference for the POST
    /billing/potential-invoices/{id}/tasks/{taskId}/details endpoint in the
    Leadtime Public API API.
sidebar:
  badge: POST
  label: Set task billing details
title: Set task billing details
type: openapi-operation
---
**What does this do?**
Sets both the billed time and billed title for a task in a potential invoice. This allows you to customize how the task appears on the invoice, including adjusting the time charged and providing a more customer-friendly title.

**When to use:**
- To adjust both the billed hours and the task title in one operation
- To customize how tasks appear on invoices for better customer clarity
- To correct billing details before finalizing the invoice

**How it works:**
- Updates both task.billedTime and task.billedTitle fields
- Both fields are optional - you can update just one or both
- billedTime can be set to null to clear it (revert to using spent time)
- billedTitle can be set to null to use the original task title
- The billed time is used to calculate the total charge (billedTime × hourly rate)

**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-settaskdetails" />
