by Jarek Dec 2, 2016

Learn how to obtain the status of your transaction via HTTP API.

This is a deprecated API Call. For Updated API Documentation, please click here.

The get status command is used to return basic statistics about your multi-recipient job or to determine if your transactional email delivery was successful.

To use the Get Status command GET to https://api.elasticemail.com/mailer/status/

For example: https://api.elasticemail.com/mailer/status/f74b9f96-f89a-4cfe-813f-5f86df1cb37?showstats=true

If sent correctly you will receive a response like:

<job id="f74b9f96-f89a-4cfe-813f-5f86df1cb37"><status>complete</status><recipients>3</recipients><delivered>3</delivered><failed>0</failed><pending>0</pending><opened>0</opened><clicked>0</clicked><unsubscribed>0</unsubscribed><abusereports>0</abusereports></job>

For More Detailed Results

You can append the following query string options to get specific results on which succeeded or failed:
https://api.elasticemail.com/mailer/status/f74b9f96-f89a-4cfe-813f-5f86df1cb37?showdetails=true

This will return all recipients for each status.

https://api.elasticemail.com/mailer/status/f74b9f96-f89a-4cfe-813f-5f86df1cb37?showdelivered=true

This will return all the recipients who succeeded.

https://api.elasticemail.com/mailer/status/f74b9f96-f89a-4cfe-813f-5f86df1cb37?showfailed=true

This will return all the recipients who bounced.

https://api.elasticemail.com/mailer/status/f74b9f96-f89a-4cfe-813f-5f86df1cb37?showfailed=true&showerrors=true

This will return all the recipients who bounced with details on why.

https://api.elasticemail.com/mailer/status/f74b9f96-f89a-4cfe-813f-5f86df1cb37?showpending=true

You can also include more than one of the above query string values in each call:
https://api.elasticemail.com/mailer/status/f74b9f96-f89a-4cfe-813f-5f86df1cb37?showdelivered=true&showfailed=true&showpending=true  

License

All code samples are licensed under MIT license.

If you like this article, share it with friends:

Jarek

Member of the Customer Success Team. Don't hesitate to ask me, if you have any questions related to Elastic Email.

Related Articles

Ready to get started?

Tens of thousands of companies around the world already send their emails with Elastic Email. Join them and discover your own email superpowers.

Free 100 emails/day No credit card required