How to send emails using senders and templates registered using the API? I can see the flow for trigger an email when something changes on master data but, is there a way to send emails by demand using the API?
Hello
Yes, you can send emails on demand using the VTEX Transactional Email API . Use the POST /api/mail-service/pvt/sendMail
endpoint, ensuring your sender is registered in VTEX Admin.
{
“templateName”: “your-template-id”,
“jsonData”: {
“to”: “customer@example .com”,
“name”: “Customer Name”,
“orderId”: “12345”
}
}
Ensure your API credentials have the right permissions. Checked https://developers.vtex.com/docs/api-reference-java certification online guide and found it quite informative.