Mark invoice as sent
Marks an invoice as sent to the customer. This changes the invoice status from “New” to “Sent”, records the sending date, and calculates the payment due date based on organization or workspace payment terms.
What happens when you mark an invoice as sent:
- Invoice status changes from “New” to “Sent”
- Sending date (
sentAt) is recorded as the current date - Sending type is set to “Manual” (indicating manual marking, not email sending)
- Contact recipient is recorded (from invoice contactId)
- Payment due date (
dueDate) is calculated based on:- Organization-specific payment terms (
invoiceDueDays), or - Workspace default payment terms (
defaultInvoiceDueDays)
- Organization-specific payment terms (
- Status change timestamp and user are recorded
- The payment term starts running from this point
Important restrictions:
- Only invoices with status “New” or “Sent” can be marked as sent
- Invoices that are “Paid” or “Cancelled” cannot be marked as sent
- This endpoint marks the invoice as sent manually (use send invoice endpoint for email sending)
Use cases:
- Record that an invoice was sent manually (e.g., via postal mail or other channels)
- Update invoice status after external sending
- Start payment term tracking
What is returned:
- Success response confirming the invoice was marked as sent
POST
/billing/invoices/{id}/mark-as-sentAuthorization
AuthorizationOAuth2 access token · headerrequiredScopes:
api:writeor
AuthorizationBearer token (JWT) · headerrequiredPath parameters
idstring<uuid>requiredInvoice ID (UUID)
Responses
200Invoice marked as sent successfully
successbooleanrequiredOperation success flag
400Invoice cannot be marked as sent (only invoices with status "New" or "Sent" can be marked as sent)
401Unauthorized - Invalid or missing authentication token
403Forbidden - Insufficient API scopes or permissions
404Invoice not found
Request
curl -X POST "https://leadtime.app/api/public/billing/invoices/%3Cuuid%3E/mark-as-sent" \
-H "Authorization: Bearer YOUR_ACCESS_TOKEN"const response = await fetch("https://leadtime.app/api/public/billing/invoices/%3Cuuid%3E/mark-as-sent", {
method: "POST",
headers: {
"Authorization": "Bearer YOUR_ACCESS_TOKEN"
}
});import requests
response = requests.post(
"https://leadtime.app/api/public/billing/invoices/%3Cuuid%3E/mark-as-sent",
headers={
"Authorization": "Bearer YOUR_ACCESS_TOKEN"
},
)Response
{
"success": true
}Invoice cannot be marked as sent (only invoices with status "New" or "Sent" can be marked as sent)
Unauthorized - Invalid or missing authentication token
Forbidden - Insufficient API scopes or permissions
Invoice not found