---
search:
  tags:
    - billing
    - POST
seo:
  description: >-
    Creates a new invoice from a potential invoice. A potential invoice…
    Reference for the POST /billing/invoices endpoint in the Leadtime Public API
    API.
sidebar:
  badge: POST
  label: Create a new invoice
title: Create a new invoice
type: openapi-operation
---
Creates a new invoice from a potential invoice. A potential invoice represents billable items (tasks, products, subscriptions, express quotations) that are ready to be invoiced.

**How invoice creation works:**
1. First, retrieve available potential invoices using GET /billing/potential-invoices
2. Review and customize the potential invoice details if needed (adjust billing periods, skip tasks, add manual positions)
3. Create the invoice using this endpoint with the potential invoice ID
4. The system automatically:
   - Generates a sequential invoice number in the format: `{ORG}{PRJ}-{YY}{MM}-{NNN}`
   - Calculates all amounts, taxes, and fees
   - Marks tasks, subscriptions, and express quotations as billed
   - Updates project billing status
   - Handles interim payments

**What happens after creation:**
- The invoice is created in status "New" (not yet sent)
- All billable items included in the invoice are marked as billed
- The invoice appears in the "New" invoices grid
- You can then send the invoice using the invoice sending endpoints

**Potential Invoice ID Format:**
The `potentialInvoiceId` follows the format: `{type}::{projectId}::{dateFrom}::{dateTo}`
- Type: One of Mixed, Subscription, TimeBased, ExpressQuotation, SingleProject, InterimPayment
- ProjectId: UUID of the project
- DateFrom/DateTo: Dates in YYYY-MM-DD format
Example: `SingleProject::0e9d033a-ab41-4212-8637-66c4e3b01fe2::2025-10-01::2025-10-31`

**What is returned:**
- Invoice ID (UUID) - Use this to reference the invoice in other endpoints
- Invoice number - The official sequential invoice number for accounting

<Operation source="api-reference" id="invoicescontroller-createinvoice" />
