0

Can I use to get bounces for the current date, based on the date?


    GET /domain/bounces/date or GET /domain/bounces/created_at

Is this possible?


    public static IRestResponse GetBounces() {
    RestClient client = new RestClient();
    client.BaseUrl = "https://api.mailgun.net/v2";
    client.Authenticator = new HttpBasicAuthenticator("api","key-3ax6xnjp29jd6fds4gc373sgvjxteol0");
    RestRequest request = new RestRequest();
    request.AddParameter("domain", "samples.mailgun.org", ParameterType.UrlSegment);
    request.Resource = "{domain}/bounces/{created_at}";
    return client.Execute(request);
    }

Thank you

2 Answers2

0

Not directly, you need to get the whole object which returns time-date of bounce within its body and then extract it iteratively

GET /<domain>/bounces

Related: http://documentation.mailgun.com/api-bounces.html#bounces

API_sheriff_orlie
  • 1,223
  • 10
  • 18
0

For the newest, use the events API. You really only need the suppressions API for things older than 30 days.

MegPhillips91
  • 186
  • 1
  • 6