Email Communications on Invoices via API Checkbox (Automatic Email Reminders)

Email Communications on Invoices via API Checkbox (Automatic Email Reminders)

We have a script that creates an invoice in Books from CRM when a deal reaches a specific stage.  When that invoice is created we need to ensure the check box is checked on the Email Communications section of the invoice.  The purpose of this is so the email reminders will send to our customers for past due invoices.  

Can we ensure these contacts have the checkbox automatically checked via the API or script?  Perhaps there is a setting that I am missing elsewhere?  Regardless, whenever an invoice is created and there are contacts associated with the customer (primary or secondary contacts) I need to ensure they are associated with the invoice and the Email Communications checkbox is checked.  See screenshot.  Thank you