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

Parameters: send_invoice
NameTypeDescription
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
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."}'
Python
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."})
Node.js
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."});
CLI
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

JSON

{
  "invoice_id": "1043",
  "status": "sent",
  "sent_to": "billing@ortega-kitchens.example",
  "subject": "Invoice 1043 is 23 days overdue"
}

Sign in once. Your agent does the rest.

Sign up and add the apps you need. Free 7-day trial with 2,000 credits, no card needed.