POST
Send an invoice by email
Scope:
sales:invoices.writehttps://api.holded.com/api/v2/invoices/{invoiceId}/sendSends the invoice by email to the contact, with an optional custom subject and message; without them, the template configured in your account settings is used. Leave `emails` out to send it to the addresses on the document's contact, as the app's send dialog fills them in; if the contact has none, the request is refused.
Parameters
Path parameters
invoiceId
stringrequiredInvoice ID (24-char hex ObjectId)
Request body
object
emails[]string[] | null
List of recipient email addresses. Leave it out to send to the email addresses on the document's contact; an empty list is refused.
subjectstring | null
Custom email subject line
messagestring | null
Custom email body message
mail_template_idstring | null
Identifier of the email template to use
cc[]string[] | null
List of CC email addresses
bcc[]string[] | null
List of BCC email addresses
Request
python
import requests
url = "https://api.holded.com/api/v2/invoices/{invoiceId}/send"
headers = {
"Authorization": "Bearer YOUR_API_KEY",
"Accept": "application/json",
}
payload = {
"emails": [
"string"
],
"subject": "string",
"message": "string",
"mail_template_id": "string",
"cc": [
"string"
],
"bcc": [
"string"
]
}
response = requests.post(url, headers=headers, json=payload)
print(response.json())Responses
Success responses
200Invoice sentError responses
400Bad requestapplication/json401Invalid or missing API keyapplication/json403Insufficient permissionsapplication/json404Invoice not foundapplication/json429Rate limit exceededapplication/json