Send triggered emails to multiple contacts

Hello,

I’m trying to send triggered emails to multiple contacts one after another. Please note that each email should be sent separately with completely different content. I’m using WixCrm.emailContact() with the contactId of each client. The problem occurs after sending the email to the first contact, and the next contact will be denied with the following error:
“contactId does not match current session contact (401)”
Any idea on what should I do or what API should I use?

Hello,

If you are trying to send emails to specific members/contacts, you will need to use the following APIs:

https://www.wix.com/corvid/reference/wix-crm-backend.html#emailContact
Wix CRM Email Contact - Sends email to contact.
Wix CRM Backend Email Contact - Sends email to contact that you have specified .

Same with Site Members when using Wix Users.
https://www.wix.com/corvid/reference/wix-users-backend.html#emailUser
Wix Users Email Contact - Sends email to the logged in user.
Wix Users Backend Email Contact - Sends email to the site member that you have specified .

Good luck!