Send Invoice
POST /api/v1/invoices/{id}/send_invoice
Send the invoice to the customer via email. Supports custom subject and HTML body with Liquid templating.
Path Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
id |
integer | Yes | The unique ID of the invoice. |
Request Body
| Field | Type | Required | Description |
|---|---|---|---|
send_invoice_form[recipient] |
string | Yes | Primary email recipient. |
send_invoice_form[copy] |
string | No | CC email addresses (comma-separated). |
send_invoice_form[subject] |
string | No | Email subject (default: “Invoice #{number} from {business}”). |
send_invoice_form[content] |
string (HTML) | No | Email body with Liquid tags (e.g., {{ invoice.number }}, {{ invoice.pay_url }}). |
Request Example
{ "send_invoice_form": { "recipient": "procurement@texas.com", "copy": "given@flixtechs.co.zw", "subject": "Invoice #INV-BA1F-1656 from Flixtechs", "content": "<div>Hi {{ invoice.customer.name }}, <br><br>Thank you for your continued business! Your invoice #{{ invoice.number }} is attached. <br><br>To make things easy, you can pay your invoice online right now<br><br>{%- button url: invoice.pay_url -%}Pay Now{%- endbutton -%}<br><br></div><ul><li>Amount Due: {{ invoice.balance }}</li><li> Due Date: {{ invoice.due_at }} </li></ul><div><br>Let me know if you have any questions. <br><br>{%- button url: invoice.url -%}View Invoice{%- endbutton -%}<br><br>Kind regards, <br>{{ business.name }}</div>" } }
POST /api/v1/invoices/123/send_invoice HTTP/1.1
Host: koteshen.com
Authorization: Bearer {access_token}
Content-Type: application/json
Accept: application/json
{request_body}
Response
Status Codes:
200 OK- Email sent successfully.401 Unauthorized- Invalid or missing token.404 Not Found- Invoice not found.422 Unprocessable Entity- Invalid email or templating errors.
Success Response (200)
{ "message": "Invoice sent to procurement@texas.com", "invoice_id": 123, "sent_at": "2025-10-21T00:00:00.000Z" }