Delete an invoice
Deletes a new invoice that has not yet been sent. When an invoice is deleted, all included billable items are returned to potential invoices and can be billed again.
What happens when you delete an invoice:
- The invoice is soft-deleted (marked with deletedAt timestamp)
- All included billable items are reverted to unbilled status:
- Tasks: marked as unbilled (
billed=false), invoice time cleared - Express quotations: marked as unbilled (
billed=false) - Subscription billing rows: marked as unbilled (
billed=false) - Projects: marked as unbilled (
billed=false) for SingleProject invoices - Interim payments: marked as unbilled (
isBilled=false)
- Tasks: marked as unbilled (
- All items become available again in potential invoices (GET /billing/potential-invoices)
Important restrictions:
- Only invoices with status “New” can be deleted
- Invoices that have been sent (status “Sent”, “Paid”, or “Cancelled”) cannot be deleted
- To cancel a sent invoice, use the cancel invoice endpoint instead
Use cases:
- Remove an invoice that was created by mistake
- Return items to potential invoices for re-billing with different settings
- Correct billing errors before sending the invoice
What is returned:
- Success response confirming the invoice was deleted
- All billable items are automatically returned to potential invoices
DELETE
/billing/invoices/{id}Authorization
AuthorizationOAuth2 access token · headerrequiredScopes:
api:writeor
AuthorizationBearer token (JWT) · headerrequiredPath parameters
idstring<uuid>requiredInvoice ID (UUID)
Responses
200Invoice deleted successfully. All billable items have been returned to potential invoices.
successbooleanrequiredOperation success flag
400Invoice cannot be deleted (only invoices with status "New" can be deleted)
401Unauthorized - Invalid or missing authentication token
403Forbidden - Insufficient API scopes or permissions
404Invoice not found
Request
curl -X DELETE "https://leadtime.app/api/public/billing/invoices/%3Cuuid%3E" \
-H "Authorization: Bearer YOUR_ACCESS_TOKEN"const response = await fetch("https://leadtime.app/api/public/billing/invoices/%3Cuuid%3E", {
method: "DELETE",
headers: {
"Authorization": "Bearer YOUR_ACCESS_TOKEN"
}
});import requests
response = requests.delete(
"https://leadtime.app/api/public/billing/invoices/%3Cuuid%3E",
headers={
"Authorization": "Bearer YOUR_ACCESS_TOKEN"
},
)Response
{
"success": true
}Invoice cannot be deleted (only invoices with status "New" can be deleted)
Unauthorized - Invalid or missing authentication token
Forbidden - Insufficient API scopes or permissions
Invoice not found