Send invoice by email
Email an invoice to the client, with the PDF attached.
POST https://cotlet.dev/api/v1/fakturownia/invoices/{invoice_id}/email
write Confirm
Emails one invoice to up to 5 addresses, with the PDF attached when email_pdf is true. With KSeF on, Fakturownia emails an invoice only after it has a KSeF number. By default you confirm each call; you can switch that off for this tool.
Parameters
| Name | Type | Description |
|---|---|---|
| invoice_id integer required | integer | Invoice ID from list_invoices. |
| email_to array | array | Up to 5 recipient addresses. Default: the client email. |
| email_cc array | array | Addresses in copy. |
| email_pdf boolean | boolean | Attach the PDF. Default: true. |
| update_buyer_email boolean | boolean | Save email_to as the client email. |
Request
curl -X POST https://cotlet.dev/api/v1/fakturownia/invoices/1/email \
-H "Authorization: Bearer $COTLET_API_KEY" result = client.call("fakturownia", "send_invoice_email", {"invoice_id":1}) const result = await cotlet.call('fakturownia', 'send_invoice_email', {"invoice_id":1}); cotlet call fakturownia send_invoice_email --data '{"invoice_id":1}' Example response
{
"invoice_id": 5120,
"status": "sent",
"email_to": [
"billing@bluefern.example"
],
"email_pdf": true
}