Closed jaaywags closed 1 year ago
I knew I would figure it out as soon as I posted the problem. Here is my solution for any future people.
var request = new MailjetRequest
{
Resource = ContactslistManagemanycontacts.Resource,
ResourceId = ResourceId.Numeric(commandModel.ContactListId)
}
.Property(ContactslistManagemanycontacts.Action, "addnoforce")
.Property(ContactslistManagemanycontacts.Contacts, new JArray
{
new JObject
{
{Contact.Email, commandModel.Email},
{Contact.IsExcludedFromCampaigns, "false"},
{
"Properties",
new JObject
{
{"mycustomproperty", "true"},
}
},
},
});
Hello, I am trying to add a contact to a contact list with a custom property but it is not working. The email is added just fine but not the custom property. How can I go about this? I can manually add or update contacts to this contact list and specify the property through the website, but not through this package.
Here is what I have tried (the commented out sections were past attempts.