Send invoice by email

POST/api/invoices/{id}/send

Emails the invoice to the customer using Perfex's own invoice email template, PDF attachment and SMTP configuration, and marks the invoice as sent. Requires the Invoices "Send email" permission. Send an Idempotency-Key header to make retries safe. The customer must have at least one contact flagged to receive invoice emails, and Setup -> Email (SMTP) must be configured or nothing is sent.

Headers

FieldTypeDescription
authtoken String Authentication token, generated from admin area

Parameters

FieldTypeDescription
cc String optional Optional comma-separated CC email addresses.
curl -X POST "https://yoursite.com/api/invoices/123/send" \
  -H "authtoken: YOUR_API_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{ "field": "value" }'

Success-Response:

HTTP/1.1 200 OK
{
  "status": true,
  "invoice_id": "847",
  "invoice_number": "INV-000832",
  "sent": true,
  "datesend": "2026-07-30 14:05:11",
  "message": "Invoice sent to the customer."
}

Not-Sent:

HTTP/1.1 500 Internal Server Error
{
  "status": false,
  "invoice_id": "847",
  "sent": false,
  "message": "Invoice could not be sent. Check SMTP settings and that the customer has a contact set to receive invoice emails."
}
MethodPOST
Path/api/invoices/{id}/send
GroupInvoices
Sincev3.0.2
Defined inmodules/api/controllers/Invoices.php