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."
}'
const invoice = await stateset.invoices.send(
'inv_0901f083-aa1c-43c5-af5c-0a9d2fc64e30',
{
cc: ["accounting@acme.com"],
message: "Please find attached invoice for January services. Let me know if you have any questions."
}
);
invoice = stateset.invoices.send(
'inv_0901f083-aa1c-43c5-af5c-0a9d2fc64e30',
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"
}
Send an invoice to the customer via email
POST
/
v1
/
invoices
/
:id
/
send
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."
}'
const invoice = await stateset.invoices.send(
'inv_0901f083-aa1c-43c5-af5c-0a9d2fc64e30',
{
cc: ["accounting@acme.com"],
message: "Please find attached invoice for January services. Let me know if you have any questions."
}
);
invoice = stateset.invoices.send(
'inv_0901f083-aa1c-43c5-af5c-0a9d2fc64e30',
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"
}
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 withinvoices:write permissions.
Authorization: Bearer YOUR_API_KEY
Path Parameters
string
required
The unique identifier of the invoice to send
Request Body
array
Email addresses to send to (defaults to customer email)
array
CC email addresses
array
BCC email addresses
string
Custom email subject (defaults to “Invoice [number] from [company]”)
string
Custom email message
boolean
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."
}'
const invoice = await stateset.invoices.send(
'inv_0901f083-aa1c-43c5-af5c-0a9d2fc64e30',
{
cc: ["accounting@acme.com"],
message: "Please find attached invoice for January services. Let me know if you have any questions."
}
);
invoice = stateset.invoices.send(
'inv_0901f083-aa1c-43c5-af5c-0a9d2fc64e30',
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"
}
⌘I