I am using a post request to invite users to a group

My problem is that this request sends an email with the wrong template. At the current moment the template of which the email uses is:

What I want to use is the custom message version called:

How do I change the template that is used when I do my mailing POST Request?
When I put the key “user_custom_message” into the current template it gives me this error -

The email Template automatically changes, when you add a custom message to your invite request.
The reason for your request not sending a custom message, is that you may already have send an invite to that specific Email. Discourse automatically just resend the first invite made to a Email, when the user has already been invited 