Bootstrap FreeKB - SendGrid - Create email using REST API
SendGrid - Create email using REST API

Updated:   |  SendGrid articles

Here is an example of how you can send an using the SendGrid REST API.

curl 
--header "Authorization: Bearer SA.14Hj6fh1RBSXoatMt4f5hg.zOhdOFKuitjqOtWatZXmGefxDMFDWIIElNhe7vb78z9" 
--header "Content-Type: application/json" 
--request POST 
--url https://api.sendgrid.com/v3/mail/send 
--data '{"personalizations": [{"to": [{"email": "jane.doe@example.com"}]}],"from": {"email": "john.doe@example.com"},"subject": "test","content": [{"type": "text/plain", "value": "test"}]}'

 




Did you find this article helpful?

If so, consider buying me a coffee over at Buy Me A Coffee



Comments


Add a Comment


Please enter d816f9 in the box below so that we can be sure you are a human.