I was trying to send email to the contact in the (custom) registration process by calling createContact() first and then calling emailContact(). The createContact() didn’t work for me for some reason even with minimum code as:
wixCRM.createContact({
"name": $w('#name').value,
"email": $w('#email').value
}).then((contactId) => {
console.log(contactId);
The JS debugging shows “bad request” no matter what I did.
Bad Request: please check the user inputs.