Creating Invoice Via API - Setting reminders/thank you emails

Hi all,

So im creating an invoice via api and that works great. However, I am having to go into Freeagent, find the invoice, and tick the send reminder / send thank you emails, which I have to do on every invoice.

Is it possible to tick these boxes via API or is there a setting in FA to default the boxes to always ticked for each invoice?

Thanks in advance

Hi there!

Good news - you can set those fields over the API.

When you submit your POST request to /invoices to create your invoice, you can include values for send_new_invoice_emails, send_reminder_emails and send_thank_you_emails (assuming you have those email templates set up), like this:

{
  "invoice": {
    "contact":"https://api.freeagent.com/v2/contacts/2",
    "dated_on":"2024-08-29",
    // ... etc.
    "send_new_invoice_emails": true,
    "send_thank_you_emails": true
  }
}

That should enable those settings. Do reply again if you have any problems - these fields are detailed in the API docs for Invoices.

Cheers,
Chris Howlett
FreeAgent

Pergect, thank you.

Works great thanks!