Quick answer
Zoho CRM sends SMS through OnlineSMSService with one HTTPS call to https://whitelabled.securesmsc.com/api/v2/sms/send. Use a webhook (Standard edition and above) for simple messages, or a Deluge function (Enterprise and Ultimate) when you need to clean phone numbers, fill template variables and save the result on the lead. Before the first call, create a separate API key for Zoho and add Zoho's outgoing IP addresses to it. Otherwise the key locks to the first Zoho server that uses it, and calls from Zoho's other servers fail with 403.
What you can automate
Any Zoho CRM workflow rule can send an SMS. Common examples:
New lead or enquiry
Thank the person and tell them when you will call. Trigger: a lead is created with a mobile number.
Deal or order updates
Confirm an order, a booking or a quote when the deal stage changes.
Reminders
Use a workflow rule's scheduled actions to remind people of an appointment or a due date.
Internal alerts
Text the lead owner when a high-value lead arrives.
Each message must match a DLT template that is approved in the right category. Service and transactional templates can go out at any time. Promotional messages go out only between 9 AM and 9 PM. See what the -P, -S, -T and -G header suffixes mean.
Prerequisites
- A Zoho CRM edition that has the action you want. Webhooks are in Standard, Professional, Enterprise and Ultimate. Zoho caps them per day by edition (up to 25,000 calls a day on Standard). Functions as workflow actions are in Enterprise and Ultimate only. This is from Zoho's edition comparison, checked on 7 November 2026. You also need the "Manage workflow" permission.
- An OnlineSMSService account and an API key for Zoho only. Sign up, then create a key under API & Integrations → API Management. Don't reuse the key your website or server uses.
- An approved DLT header (sender ID, for example
ACMEIN) mapped to your account, and an approved DLT template for every message. We file DLT registration for you: a new registration costs ₹5,900 (₹5,000 + 18% GST) and is valid for one year and renewed every year. Renewal is separate, and we remind you before it lapses. Linking an entity you already have is free. Approval usually takes 2–7 business days. - Zoho's outgoing IP addresses added to the key. This is the next section, and it matters most.
Get a free API key + 100 test SMS. Create your account and API key now. Verified businesses also get 100 free test SMS once KYC and DLT mapping are done.
Allow Zoho's IP addresses before the first call
This is the most common reason CRM integrations fail. Each API key has its own list of allowed IP addresses. If the list is empty, the first IP that calls with the correct key is added to it automatically. After that, every other IP gets 403 "IP address not allowed. Please whitelist your IP address to access the API." Zoho sends webhooks and function calls from a pool of servers, so the first SMS works and later ones fail.
- Create a separate API key for Zoho CRMOne key per integration means a change for Zoho never breaks your website or app.
- Add Zoho's IP addresses before the first callOpen API & Integrations → API Management → IP Whitelisting for that key. Add single IPs or IPv4 ranges in CIDR form, such as
203.0.113.0/24. Once the list has at least one entry, nothing is added automatically. - Already locked to one IP?Add the full list first, then remove the wrong IP. If you remove it first, the list is empty for a moment and locks again to the next caller. You can also ask our support team to reset the key's list.
Where to get Zoho's IPs. We could not find a published list of outgoing IP addresses for Zoho CRM webhooks and functions. Zoho publishes one for Zoho Creator only (checked 7 November 2026). Ask Zoho support for the outgoing IPs of your data centre (for example IN, if you log in at zoho.in). If a call is still refused, our support team can see the refused IP in the key's log so you can add it.
Still blocked? If the requests keep arriving from addresses outside the published ranges, contact our support with the 403 response and the time of the request, and we will help you set up the allow-list for that key.
Method 1: Zoho CRM webhook (no code)
A webhook sends a fixed request when a workflow rule fires. It suits short messages where your CRM data is already clean.
- Create the webhookGo to Setup → Automation → Actions → Webhooks → Configure Webhook. Name it "Send SMS – new lead", choose method POST, set the URL to
https://whitelabled.securesmsc.com/api/v2/sms/sendand the module to Leads. - Add the API keyIf you have created the
onlinesmsconnection from Method 2, choose Authorization → Connection and pick it, so the key is not visible in the webhook. Otherwise choose General and add a custom headerX-API-Keywith your key. - Add two more headers
Content-Type: application/jsonandAccept: application/json. Zoho's help page does not say which Content-Type it sends with a raw JSON body. Without the JSON one, our API can't read the body and replies422. - Write the bodyChoose Body → Raw → JSON and paste the JSON below. Change the sender ID and the text to your approved header and template.
- Attach it to a ruleGo to Setup → Automation → Workflow Rules → Create Rule. Choose module Leads, run it when a record is created, add the condition "Mobile is not empty", then under Instant Actions choose Webhooks, select your webhook and click Associate. Save the rule.
Webhook body (Raw JSON)
{
"sender_id": "ACMEIN",
"recipient": "${Leads.Mobile}",
"message": "Hi ${Leads.First Name}, thanks for your enquiry with Acme. Our team will call you within 24 hours. -ACME"
}
When the merge fields are filled in, the request matches the one shown in our API docs. A successful call returns:
{"success":true,"message":"SMS queued successfully","data":{"message_id":123,"queue_id":123,"status":"queued","estimated_delivery":"2026-11-07T10:02:00.000000Z"}}
Know the webhook's limits. Zoho waits 10 seconds for a reply. If the call fails, it tries once more after 15 minutes and then stops. A webhook can use up to 10 headers and a raw body of up to 15,000 characters, and it only calls ports 80 and 443 (our API uses 443). The reply is not saved on the record. The webhook also cannot clean data. A mobile number stored as +91 98765 43210 fails with 422, because the API accepts only 9876543210 or +919876543210. If your numbers have spaces, or a merge field may be empty, use Method 2.
Method 2: Deluge function (Enterprise and Ultimate)
A function can clean the number, skip leads with no mobile, fill your template and write the result back to the lead. It takes three steps.
- Store the API key in a connectionIn Setup → Developer Hub → Connections, create a custom service named OnlineSMSService with authentication type API Key, param type Header and parameter name
X-API-Key. Create a connection from it with the link nameonlinesmsand paste your key when asked. Don't put the key in the script. Zoho'szoho.crm.getOrgVariableonly works in Zoho vertical solutions, so a connection is the right place. - Add a field for the resultAdd a single-line field "SMS Status" to Leads. Its API name will be
SMS_Status. - Create the functionIn your workflow rule, under Instant Actions, choose Function and write a new one in Deluge. Name it
send_lead_sms, add one argumentleadIdand map it to the lead's ID (${Leads.Lead Id}). Paste the script below and save.
Deluge: send_lead_sms
void automation.send_lead_sms(string leadId)
{
lead = zoho.crm.getRecordById("Leads",leadId.toLong());
// Clean the number: "+91 98765-43210" -> "9876543210"
mobile = "";
if(lead.get("Mobile") != null)
{
mobile = lead.get("Mobile").toString().replaceAll("[^0-9]","");
}
if(mobile.length() > 10)
{
mobile = mobile.right(10);
}
firstName = "Customer";
if(lead.get("First_Name") != null)
{
firstName = lead.get("First_Name");
}
if(mobile.length() != 10)
{
status = "Not sent: no valid 10-digit mobile number";
}
else
{
// DLT template: "Hi {#alphanumeric#}, thanks for your enquiry with Acme. Our team will call you within 24 hours. -ACME"
payload = Map();
payload.put("sender_id","ACMEIN");
payload.put("recipient",mobile);
payload.put("message","Hi " + firstName + ", thanks for your enquiry with Acme. Our team will call you within 24 hours. -ACME");
// Optional, always as text: payload.put("dlt_template_id","1107xxxxxxxxxxxxxxx");
resp = invokeurl
[
url :"https://whitelabled.securesmsc.com/api/v2/sms/send"
type :POST
parameters:payload.toString()
headers:{"Content-Type":"application/json","Accept":"application/json"}
connection:"onlinesms"
detailed:true
];
code = resp.get("responseCode");
text = resp.get("responseText").toString();
if(code == 200)
{
status = "Queued, message ID " + text.toMap().get("data").get("message_id");
}
else
{
status = "Failed " + code + ": " + text;
}
}
if(status.length() > 250)
{
status = status.subString(0,250);
}
zoho.crm.updateRecord("Leads",leadId.toLong(),{"SMS_Status":status});
}
What the script does:
- It reads the lead and turns
+91 98765-43210into9876543210. If no valid number is left, it skips the lead and says why. - It builds the message from your approved template. Only the first name changes.
- It posts JSON with
invokeurl. Theonlinesmsconnection adds theX-API-Keyheader, anddetailed:truereturns the HTTP status code as well as the body. Zoho stops waiting after 40 seconds. Each call counts against your Zoho plan's limit on external calls. - It writes "Queued, message ID 123" or "Failed 403: …" to SMS Status, so you can see every result on the lead.
The ID is passed as text and converted with toLong(), because zoho.crm.updateRecord expects a number. Updating the record this way does not fire your workflow rules again, so the function can't loop.
Field mapping
| API field | Zoho CRM value | Rules |
|---|---|---|
sender_id | Fixed text, e.g. ACMEIN | Required. An approved DLT header on your account, up to 11 characters (headers are 6). |
recipient | ${Leads.Mobile} or ${Contacts.Mobile} | Required. 9876543210 or +919876543210. No spaces, dashes or brackets. |
message | Fixed text plus merge fields | Required. Up to 1,600 characters, and it must match an approved template. |
dlt_template_id | Fixed text | Optional. Send it as text in quotes. A number in JSON fails with 422. |
route | "transactional" or "promotional" | Optional. Default is transactional. Leave it out rather than sending it empty. |
Match the message to your DLT template exactly
Operators compare every SMS with your approved templates. The fixed words must be identical. Only the variable parts may change. Say this template is approved:
Hi {#alphanumeric#}, thanks for your enquiry with Acme. Our team will call you within 24 hours. -ACME
Then "Hi Priya, thanks for your enquiry with Acme. Our team will call you within 24 hours. -ACME" passes. The same text with "Thanks" or "24 hrs" does not. Check these points:
- Copy the fixed text from your DLT portal into Zoho. Don't retype it. Spaces, commas and full stops count.
- No empty variables. An empty merge field leaves "Hi , thanks…", which doesn't match. Add a workflow condition such as "First Name is not empty", or use a default in the function.
- Values must fit the variable type. An alphanumeric variable holds up to 40 characters, and a numeric one holds digits only. See DLT template variable tags.
- Watch for Unicode. A curly quote or ₹ sign makes the whole SMS Unicode. Each SMS then holds 70 characters, not 160. Check long messages with the SMS character counter.
- Test new wording first with the DLT template checker.
If you leave dlt_template_id out, our platform matches the text against your approved templates and rejects a mismatch at once with TEMPLATE_MISMATCH. If you send it, the platform may skip its own check, and the operator's DLT check becomes the only one. So leave it out while you test.
Test before you switch it on
- Set up the key firstUse the Zoho-only key, with Zoho's IPs already in its list.
- Don't try the Zoho key from your laptopIf its list is still empty, that call locks the key to your laptop's IP. If the list is set, your laptop gets
403. Use a different key for manual tests in the API playground. - Use a test lead with your own mobile numberCreate the lead, or run the function from the editor with that lead's ID. This sends a real SMS.
- Check the resultWith the function, read SMS Status on the lead. With the webhook, check the SMS log in your OnlineSMSService dashboard.
- Then switch the rule on for everyoneIf many calls fail at once from the same IP, our security system can block that IP until our support team lifts the block, so fix any
401or403errors first.
Troubleshooting
| Response | Cause | Fix |
|---|---|---|
403 "IP address not allowed. Please whitelist your IP address to access the API." | The key is locked to another IP, or this Zoho server's IP is not in the key's list. | Add Zoho's IPs under IP Whitelisting, or ask support to reset the list. See above. |
403 "Your IP address has been blocked due to suspicious activity…" | Too many failed key checks came from that IP in a few minutes. | Fix the key or IP problem, then contact support to unblock the IP. |
401 "API key is required" | No key reached us. The connection is not attached, or the header name is wrong. | Check the connection name, or the X-API-Key header in the webhook. |
401 "Invalid API key", "API key is disabled", "API key has expired" or "Account is not active" | The key is wrong, switched off or expired, or the account is not active. | Paste the key again, or create a new one in the dashboard. |
400 "Invalid sender ID" | sender_id is not an approved header on your account. | Use the exact header shown in your dashboard. |
422 "Validation failed", errors on recipient | The number has spaces or dashes, or the field is empty. | Clean the number (Method 2 does this) or store numbers without spaces. |
422 "sender id field is required" although the body has it | The request was not sent as JSON. | Add the Content-Type: application/json header. |
422 TEMPLATE_MISMATCH | The text differs from every approved template. | Compare it word for word with the template. Look for empty merge fields. |
400 "SMS dispatch failed" with "Insufficient credits…" | Your balance is too low. | Top up. There is no minimum top-up. |
429 "Rate limit exceeded" | More than the key's limit (60 requests a minute and 10,000 a day by default). | Spread the sends out, or ask us to raise the limit. |
| No SMS and no error in Zoho | Webhook replies are not stored, and Zoho retries only once. | Check the dashboard log, or switch to Method 2 to see each result. |
Other CRMs
Salesforce
An Apex service class, an async trigger, a Flow action and a test class, using a named credential.
HubSpot
A "Send a webhook" action, or a Node.js 24 custom code action in workflows.
Any other CRM
Any tool that can send an HTTPS POST with a JSON body and a custom header can use the same call. See the API docs.