The Email Contact API acts as a bridge between your custom application and the contact's inbox. Instead of using a third-party SMTP service, you can leverage Zoho Books' established mailing infrastructure to send personalized messages to your customers and vendors.
At Kalki LLP, we use this endpoint to trigger "Account Health" updates, such as notifying a customer when their account details have been successfully synced with our master database.
To send a custom email, you perform a POST request to the /email sub-resource.
Endpoint: POST /contacts/{contact_id}/email?organization_id={organization_id}
Method: POST
Authentication: Valid OAuth token with ZohoBooks.contacts.CREATE or UPDATE scope.
Payload: Requires a JSON body containing the recipients, subject, and message content.
You can include multiple recipients and custom message bodies. You can also specify an attachment_urls array if you need to include files from an external source.
{
"to_mail_ids": ["contact@kalkillp.com", "billing@kalkillp.com"],
"subject": "Update regarding your account status",
"body": "Dear Valued Partner, We have successfully updated your tax registration details in our records. Please reach out if you have questions.",
"send_customer_statement_report_as_pdf": false
}
Kalki LLP Pro-Tip: The to_mail_ids field is an array. Always validate that the emails provided are properly formatted strings; an invalid email address here will cause the API to reject the request.
This script is ideal for workflows where you want to notify a contact after a specific event, such as a successful credit limit increase or a change in payment terms.
// Target Contact ID
contactID = "460000000026049";
orgID = "123456789";
// Build the request body
mailBody = Map();
mailBody.put("to_mail_ids", {"client@example.com"});
mailBody.put("subject", "Account Status Update");
mailBody.put("body", "Hello, your account has been verified.");
// Execute the POST request
response = invokeurl
[
url :"https://www.zohoapis.in/books/v3/contacts/" + contactID + "/email?organization_id=" + orgID
type :POST
parameters :mailBody.toString()
connection :"kalki_books_connection"
];
if(response.get("code") == 0)
{
info "Kalki Success: Custom email dispatched to contact.";
}
else
{
info "Email failed: " + response.get("message");
}
| Error Code | Meaning | Fix for Kalki LLP Developers |
| 2 | Invalid ID | The contact_id in the URL does not exist. |
| 57 | Unauthorized | Your OAuth token lacks the necessary scopes. |
| 1005 | Missing Emails | The to_mail_ids field is empty. |
| 1038 | JSON Syntax Error | Ensure your payload is strictly valid JSON format. |
For kalkillp.com clients, we utilize this API to:
Centralize Communication: Keep a record of all emails sent to a contact within their Zoho Books "Comments & History" section, rather than keeping them hidden in personal mailboxes.
Uniform Branding: Use Zoho’s email engine to ensure all correspondence carries your company's signature and branding.
Developer Efficiency: Eliminate the need to manage separate SMTP credentials or mail services within your custom application.
Communication is the key to strong business relationships. Kalki LLP specializes in building sophisticated automation flows that ensure your customers receive clear, timely, and professional correspondence every time your system updates their account status.