Email an invoice
Email the customer a portal link to an invoice.
POST https://cotlet.dev/api/v1/method-crm/invoices/{invoice_id}
write Confirm
Does what Send > Email does: the customer gets a link to their portal, where they can view the invoice and pay if a payment gateway is set up. It fails if the contact has no email. By default you confirm each call; you can switch that off for this tool.
Parameters
| Name | Type | Description |
|---|---|---|
| invoice_id string required | string | Invoice ID. |
| subject string | string | Email subject. Default from your template. |
| body string | string | Email text. Default from your template. |
Request
curl -X POST https://cotlet.dev/api/v1/method-crm/invoices/1043 \
-H "Authorization: Bearer $COTLET_API_KEY" \
-H "Content-Type: application/json" \
-d '{"subject":"Invoice 1043 is 23 days overdue","body":"Hi Ana, invoice 1043 for 4,800 was due on Sep 30. You can view and pay it in your portal. Tell me if anything is unclear."}' result = client.call("method-crm", "send_invoice", {"invoice_id":"1043","subject":"Invoice 1043 is 23 days overdue","body":"Hi Ana, invoice 1043 for 4,800 was due on Sep 30. You can view and pay it in your portal. Tell me if anything is unclear."}) const result = await cotlet.call('method-crm', 'send_invoice', {"invoice_id":"1043","subject":"Invoice 1043 is 23 days overdue","body":"Hi Ana, invoice 1043 for 4,800 was due on Sep 30. You can view and pay it in your portal. Tell me if anything is unclear."}); cotlet call method-crm send_invoice --data '{"invoice_id":"1043","subject":"Invoice 1043 is 23 days overdue","body":"Hi Ana, invoice 1043 for 4,800 was due on Sep 30. You can view and pay it in your portal. Tell me if anything is unclear."}' Example response
{
"invoice_id": "1043",
"status": "sent",
"sent_to": "billing@ortega-kitchens.example",
"subject": "Invoice 1043 is 23 days overdue"
}