The Enable Portal Access API allows you to programmatically invite your customers to the Zoho Books Client Portal. This action sends an automated invitation email to the primary contact person associated with the contact, providing them with a secure login to manage their transactions.
At Kalki LLP, we integrate this endpoint into the signup flow of our clients' websites, ensuring that as soon as a customer registers, their access to the financial portal is ready.
To enable the portal, you must perform a POST request to the specialized /portal/enable sub-resource.
Endpoint: POST /contacts/{contact_id}/portal/enable?organization_id={organization_id}
Method: POST
URL: Requires the unique contact_id.
Body: This request requires a JSON body containing the contact_persons you wish to enable.
You must specify the contact_person_id (the individual) you are granting access to. You can also specify the portal language.
{
"contact_persons": [
{
"contact_person_id": "460000000026051"
}
]
}
Kalki LLP Pro-Tip: A "Contact" is the company, but only a "Contact Person" (the human) can log in. Ensure you have the correct contact_person_id before calling this API.
This script is perfect for a "New Customer" workflow. Once the contact is created, this function invites them to the portal automatically.
// IDs for the Contact and Contact Person
contactID = "460000000026049";
personID = "460000000026051";
orgID = "123456789";
// Construct the Payload
payload = Map();
personList = List();
personDetails = Map();
personDetails.put("contact_person_id", personID);
personList.add(personDetails);
payload.put("contact_persons", personList);
// Execute the POST request
response = invokeurl
[
url :"https://www.zohoapis.in/books/v3/contacts/" + contactID + "/portal/enable?organization_id=" + orgID
type :POST
parameters :payload.toString()
connection :"kalki_books_connection"
];
if(response.get("code") == 0)
{
info "Kalki Success: Portal invitation sent to " + personID;
}
else
{
info "Portal Enablement failed: " + response.get("message");
}
| Error Code | Meaning | Fix for Kalki LLP Developers |
| 2 | Invalid ID | The contact_id or contact_person_id is incorrect. |
| 57 | Unauthorized | Your OAuth token lacks the ZohoBooks.contacts.UPDATE scope. |
| 3035 | Already Enabled | The portal access is already active for this contact person. |
| 1005 | Missing Email | The contact person does not have a valid email address associated with their record. |
For kalkillp.com clients, automating the portal invitation offers several strategic advantages:
Reduced Support Overhead: Customers can download their own tax invoices and payment receipts without calling your accounts team.
Faster Payments: By providing portal access immediately, customers are more likely to use the integrated payment gateways (like Razorpay, Stripe, or PayPal) to settle invoices.
Professionalism: A seamless, automated welcome email with portal credentials creates a high-end "Enterprise" feel for your brand.
Managing thousands of portal invites manually is impossible. Kalki LLP can help you build an automated onboarding engine that syncs your customer data and manages portal permissions across all your Zoho applications.