0

I am trying to find a way to retrieve daily list count statistics for New Marketing Campaigns on the SendGrid API. The normal API endpoint for getting the current momentary amount of List contact amount, will not take date range as an input.

What is the proper approach for this? Is there an endpoint?

Potential solutions can of course include a cron job, but that will not gather stats from prior dates.

andiOak
  • 356
  • 3
  • 9

1 Answers1

0

After some support messages and digging I can conclude that the SendGrid API can not retrieve historical data on the total amount of contacts in a list. The solution will be to use the endpoint GET /marketing/lists/{id}/contacts/count together with a script through a cron job. Ways of setting up a cron job:

Many web hosting solutions offer cron jobs or recurring tasks included with the packaged tools in cpanel or others alike.

andiOak
  • 356
  • 3
  • 9