Display attachment(s) in client portal and emails

Display attachment(s) in client portal and emails

I need to set this via the api but can't find any documentation on it.
I have tried "can_send_in_email" but this doesn't seem to work, a clue please guys ?

  var updateArray=
      {
        "customer_id": InvDetails.custID,
        "invoice_number": InvDetails.InvNumber,
        "template_id" : "################",  This doesn't seem to work either ?
        "documents": InvDetails.Documents,
        "attachments" : InvDetails.attachment,
        "has_attachment" : true,
        "can_send_in_mail" : true,
      };