in SampleCPMProject/Program.cs [45:67]
private static void GetEmailContactabilities()
{
var emails = new string[] { "test@microsoft.com", "test@pct.com", "abc@test.com" };
EmailContactabilitiesRequest request = new EmailContactabilitiesRequest()
{
TargetedTopicId = testTopicId, //Topic Id for which you want to contact customers
/*If the UnsubscribeUrlRequired field is set to true CPM will return a URL that customers can use to unsubscribe from this communication.
* This URL will only be returned for customers for whom canContact = true.
* This URL is meant to be included in the email communication that is sent to the customer
*/
UnsubscribeUrlRequired = true
};
foreach (string emailAddress in emails)
{
request.ContactPoints.Add(emailAddress);
}
EmailContactabilitiesResponse result = cpmClient.GetEmailContactability(request).Result;
Console.WriteLine(JsonConvert.SerializeObject(result));
}