How to Send Email to Contact and relate it to Case via Salesforce REST API?

How to Send Email to Contact and relate it to Case via Salesforce REST API?

Enable “Email-To-Case”.

Path:
/services/data/v53.0/sobjects/Case/quickActions/SendEmail
 
HTTP Method:
POST
Body:
{    
    “contextId”: “5008c00001Ejue0AAB”
    “record”: {
        “HtmlBody”: “<div+style=”font-family:+Arial;+font-size:+14px;”>Test</div>”,
        “Subject”: “InfallibleTechie”,
        “ToIds”: [“0038c00002bkSPZAA2”]
    }
}
 
Example:
 

Output:
 

 

Leave a Reply