Figured you might have solved this already, but to solve this issue, replace label with the following:
labelKeys: ['custom.resend-activation-form']
Your label should be the key “custom.resend-activation-form” for a label you created in the contact list. Meaning, go to your contact list in Wix dashboard and create a new label “Resend Activation Form”
The code below will now add the label key to the contact you created.
export function resentActivation(email) {
let contactInfo = {
emails: [{tag: "WORK",email: email}],
labelKeys: ['custom.resend-activation-form']
}
return contacts.createContact(contactInfo).then((contact) => {const contactId = contact._id;console.log("create contact", contact)return contact;}).catch((error) => {console.error("error", error);});