hauhau23 hauhau23
hauhau23 hauhau23

Reputation: 21

Mailgun Get Bounces

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

Upvotes: 0

Views: 1180

Answers (2)

MegPhillips91
MegPhillips91

Reputation: 336

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

Upvotes: 0

API_sheriff_orlie
API_sheriff_orlie

Reputation: 1273

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

Upvotes: 0

Related Questions