I am trying to use sendgrid with MongoDB stitch,and I have a domain name already on namecheap. I set up the domian authentication already,but do I need to have an email address with my domain ready before using sendgrid on MongoDB?I am not quite how everything works with sendgrid and its api. Anyone could help explain it a bit more?
You'll need to verify the sender address that you want to use. You can do that either for the entire domain (with domain authentication) or just a single sender. As you've already done the domain authentication, you are good. This guide should enable you to send emails with a snippet that looks like this:
curl --request POST \
--url https://api.sendgrid.com/v3/mail/send \
--header 'Authorization: Bearer <<YOUR_API_KEY>>' \
--header 'Content-Type: application/json' \
--data '{"personalizations":[{"to":[{"email":"john.doe@example.com","name":"John Doe"}],"subject":"Hello, World!"}],"content": [{"type": "text/plain", "value": "Heya!"}],"from":{"email":"sam.smith@example.com","name":"Sam Smith"},"reply_to":{"email":"sam.smith@example.com","name":"Sam Smith"}}'