Is there any API to get emails count

Hello Team,
Thanks for providing such a wonderful disposable email, could you help us in answering the below query?

  1. Is there any API available to fetch the number of emails (Inbox) associated with a disposable email?

Because our team is currently using sleep time 1 minute default to read the latest email from mailsac Inbox, To avoid that, we would like to call an API to fetch the email count before and after requesting for new email.

Thanks and much appreciated your help.

If this is feasible with mailsac, we would like to go for Annual premium subscription

Best Regards

Hi Srinivas,

The List Messages For an Inbox Endpoint returns a JSON array of messages and their meta data. It is easy to turn this array into a number of messages using almost any programming language.

For example. I sent two emails to

I can fetch the number of messages by using the following curl command.

curl --request GET \
  --url \
  --header 'Mailsac-Key: REPLACE_KEY_VALUE' | jq length


By piping the curl output to jq length, we are able to get the number of messages in the inbox.

I hope this helps. If you have a specific use case where returning the JSON array counting the length doesn’t work, let me know.