Skip to content
Leadtime
English
Esc
↑↓navigate↵open⌘Jpreview

Send invoice via email

Sends an invoice to the customer via email as a PDF attachment. The invoice must have a contact with a valid email address set.

What happens when you send an invoice:

  1. Invoice PDF document is generated
  2. Invoice status changes from “New” to “Sent”
  3. Sending date (sentAt) is recorded as the current date
  4. Sending type is set to “Email” (indicating email sending)
  5. Contact recipient is recorded (from invoice contactId)
  6. Payment due date (dueDate) is calculated based on:
    • Organization-specific payment terms (invoiceDueDays), or
    • Workspace default payment terms (defaultInvoiceDueDays)
  7. Status change timestamp and user are recorded
  8. Email is sent to the contact’s email address with PDF attachment
  9. The payment term starts running from this point

Important restrictions:

  • Only invoices with status “New” or “Sent” can be sent
  • Invoices that are “Paid” or “Cancelled” cannot be sent
  • The invoice must have a contact with a valid email address
  • Use POST /billing/setInvoiceContactId to set the contact if needed

Use cases:

  • Send invoice to customer via email
  • Automate invoice delivery
  • Track invoice sending and payment terms

What is returned:

  • Success response confirming the invoice was sent
POST/billing/invoices/sendInvoice
Authorization
AuthorizationOAuth2 access token · headerrequired
Scopes:api:write
or
AuthorizationBearer token (JWT) · headerrequired
Request body
requiredapplication/json

Invoice ID to send

idstring<uuid>required

Invoice ID (UUID) to send. The invoice must have a contact with a valid email address set. The invoice will be sent via email as a PDF attachment.

Responses
200

Invoice sent successfully

successbooleanrequired

Operation success flag

400

Invoice cannot be sent (only invoices with status "New" or "Sent" can be sent, or contact email is missing)

401

Unauthorized - Invalid or missing authentication token

403

Forbidden - Insufficient API scopes or permissions

404

Invoice not found

Try it
Server
Authorization
Bodyapplication/json
Request
curl -X POST "https://leadtime.app/api/public/billing/invoices/sendInvoice" \
  -H "Authorization: Bearer YOUR_ACCESS_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
  "id": "123e4567-e89b-12d3-a456-426614174000"
}'
Response
{
  "success": true
}