Send GDPR-related data
POST {{api-domain}}/crm/v2.1/Leads/{{record_id}}/actions/send_mail
Use the following keys when you have enabled GDPR compliance settings, and want to send an email asking for the user's consent or request data. Note that it is mandatory to send the consent form in the email's content
key, when you ask for the lead's/contact's consent. For more details, refer to the documentation.
Request Body
{"data"=>[{"from"=>{"user_name"=>"Patricia Boyle", "email"=>"p.boyle@abc.com"}, "to"=>[{"user_name"=>"user1", "email"=>"user1email@zoho.com"}], "subject"=>"Mail subject", "content"=>"<br><a href=\"${ConsentForm.en_US}\" id=\"ConsentForm\" class=\"en_US\" target=\"_blank\">Consent form link</a><br><br><br><br><br><h3><span style=\"background-color: rgb(254, 255, 102)\">REGARDS,</span></h3><div><span style=\"background-color: rgb(254, 255, 102)\">AZ</span></div><div><span style=\"background-color: rgb(254, 255, 102)\">ADMIN</span></div> <div></div>", "consent_email"=>true, "mail_format"=>"html", "data_subject_request"=>{"id"=>"{{data_subject_request_id}}", "type"=>"access"}}]}
RESPONSES
status: OK
{"data":[{"code":"SUCCESS","details":{"message_id":"9943645bd4411e51145e0515bd77e38058ef4386573e33fc3c5a988ba3a2dead"},"message":"Your mail has been scheduled successfully.","status":"success"}]}