Link to home
Create AccountLog in
Avatar of Errol Farro
Errol FarroFlag for Aruba

asked on

Using ColdFusion with Sendgrid’s API

Sendgrid provides a set of API to retrieve data at https://docs.sendgrid.com/for-developers/sending-email/getting-started-email-activity-api

How would one get the API to work in ColdFusion ?

1. Filter by subject
curl --request GET \
 --url 'https://api.sendgrid.com/v3/messages?limit=10&query=subject%3D<<subject>>' \
 --header 'authorization: Bearer <<your API key>>'

2. Filter by recipient email
curl --request GET \
 --url 'https://api.sendgrid.com/v3/messages?limit=10&query=to_email%3D%22<<email>>%22' \
 --header 'authorization: Bearer <<your API key>>'

3. Filter by bounced emails
curl --request GET \
 --url 'https://api.sendgrid.com/v3/messages?limit=10&query=status%3D%22bounced%22' \
 --header 'authorization: Bearer <<your API key>>'


ASKER CERTIFIED SOLUTION
Avatar of David H.H.Lee
David H.H.Lee
Flag of Malaysia image

Link to home
membership
Create a free account to see this answer
Signing up is free and takes 30 seconds. No credit card required.
See answer