This endpoint sends an invoice to the customer via email. The invoice must be in draft or sent status.
Authentication
This endpoint requires a valid API key with invoices:write
permissions.
Authorization: Bearer YOUR_API_KEY
Path Parameters
The unique identifier of the invoice to send
Request Body
Email addresses to send to (defaults to customer email)
Custom email subject (defaults to “Invoice [number] from [company]”)
Whether to attach PDF (default: true)
Response
Returns the sent invoice with email details.
curl --location --request POST 'https://api.stateset.com/v1/invoices/inv_0901f083-aa1c-43c5-af5c-0a9d2fc64e30/send' \
--header 'Content-Type: application/json' \
--header 'Authorization: Bearer YOUR_API_KEY' \
--data-raw '{
"cc": ["accounting@acme.com"],
"message": "Please find attached invoice for January services. Let me know if you have any questions."
}'
{
"id": "inv_0901f083-aa1c-43c5-af5c-0a9d2fc64e30",
"object": "invoice",
"status": "sent",
"sent_at": "2024-01-20T12:00:00Z",
"email_details": {
"sent_to": ["billing@acme.com"],
"cc": ["accounting@acme.com"],
"subject": "Invoice INV-2024-0001 from Stateset",
"message": "Please find attached invoice for January services. Let me know if you have any questions.",
"attachments": ["invoice_INV-2024-0001.pdf"]
},
"sent_count": 1,
"last_sent_at": "2024-01-20T12:00:00Z",
"next_reminder_date": "2024-01-27T12:00:00Z"
}