I am trying to test emailing an invoice through the API. I keep getting an error when using the https://bluemoonbcdev.sfprocessing.com/api/v1/invoices/“invoice hash”/email endpoint. The error is “You are not authorized to view or perform this action”. Does this API request not work?
Additionally, I attempted to send an email through the bulk request. I am getting a Server Down error on that one.
Here is the one I saw in the web app I tried to copy:
curl -X POST https://<hosted url>/api/v1/emails -H "Content-Type: application/json" -H "X-API-TOKEN: <Token>" -H "X-Requested-With: XMLHttpRequest" -d '{"entity":"invoice","entity_id":"WJxbojagwO","template":"email_template_invoice","body":"<p>To view your invoice for $amount, click the link below.</p><div class=\"center\">$view_link</div>","subject":"New invoice $number from $company.name"}'