This method allows you to get list of blacklist reasons. At this moment we have provided 4 reasons which are hardbounce, unsubscribe, spam_complaint and other. Run this method once in a while to check if there are new reasons added.
Authorizations
Responses
application/json
objectoptional
application/json
application/json
application/json
options
using System.Threading.Tasks;
internal class Program
{
private static void Main(string[] args)
{
string requestBody = "";
try {
using var client = new HttpClient{};
using var request = new HttpRequestMessage(HttpMethod.Options, "https://api.messageflow.com/v2.1/email/blacklist/reason");
request.Headers.Add("Authorization", "YourAuthorizationKey");
request.Headers.Add("Application-Key", "YourApplicationKey");
request.Content = new StringContent(requestBody, null, "application/json");
var response = await client.SendAsync(request);
response.EnsureSuccessStatusCode();
string content = await response.Content.ReadAsStringAsync();
Console.WriteLine(content);
} catch (HttpRequestException e) {
Console.WriteLine("\n Exception Caught!\n Message :{0} ", e.Message);
}
}
}