I'm using this documentation to try and receive bounce information from the SendGrid email activity API:
But it returns no results, despite having ~50 bounces showing on our dashboard (which are viewable from the "activity" section on the SendGrid web interface).
Request:
curl --request GET \
--url 'https://api.sendgrid.com/v3/messages?limit=100&query=status%3D%22bounced%22' \
--header 'authorization: Bearer <<TOKEN_REMOVED>>'
Response:
{"messages":[]}
Obviously <<TOKEN_REMOVED>> is our actual token when I'm running it :)
Note - when I use the v3/suppression/bounces endpoint to return everything it works fine (responds with a huge JSON of bounces), however I'd like to be able to use the more flexible messages endpoint for querying a specific email etc.
curl --request GET \
--url https://api.sendgrid.com/v3/suppression/bounces \
--header 'accept: application/json' \
--header 'authorization: Bearer <<TOKEN_REMOVED>>' \
--header 'content-type: application/json' \
--data '{}' \
