POSTMARK_API_KEY=*** curl -s "https://api.postmarkapp.com/stats/outbound?fromdate=$(date '+%Y-%m-%d')&todate=$(date '+%Y-%m-%d')" \ -X GET \ -H "Accept: application/json" \ -H "X-Postmark-Server-Token: $POSTMARK_API_KEY" {"Sent":0,"Bounced":0,"SMTPApiErrors":0,"BounceRate":0.0,"SpamComplaints":0,"SpamComplaintsRate":0.0,"Tracked":0,"Opens":0,"UniqueOpens":0,"TotalClicks":0,"UniqueLinksClicked":0,"WithClientRecorded":0,"WithPlatformRecorded":0,"WithReadTimeRecorded":0,"WithLinkTracking":0,"WithOpenTracking":0,"TotalTrackedLinksSent":0}
... | jq '.Sent'
...| perl -ne 'if(/\"Sent\":\s*(\d+)/){print $1;}'