SendGrid - Create email using REST API
by
Jeremy Canfield |
Updated: November 06 2023
| 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