Actions API - Webhooks APIs - Part 1

Actions API - Webhooks APIs - Part 1



Hello all!!
Welcome back to a fresh Kaizen week.
In the previous weeks, we covered Workflow Rules APIs, Actions APIs - Email Notification APIs, Tasks Update API, and Field Update API.

This week, we will continue with another Actions API - Webhooks API in Zoho CRM.

Webhooks in Zoho CRM

A webhook allows Zoho CRM to send real-time information to another application the moment something important happens. Webhooks let CRM push data instantly to an external URL whenever the workflow condition is met.
Webhooks do not notify on every record event by default. They trigger only when specific automations, such as a Workflow Rule you configure, are executed. This helps for specific real-time automation needs, such as sending high-value leads to an external validation service.

Use case

Zylker, an IT solutions provider, uses Zoho CRM to manage all incoming leads. But not every new lead is ready for the Sales team right away. Not all leads need immediate follow-ups. For leads with a high Profit Score (80+), it usually means strong buying intent, but they may contain fake information.

Why does Zylker use Zoho CRM and send these leads to an external validation application?

Before Sales reaches out, Zylker wants to make sure these high-value leads have valid information. While CRM keeps the lead data organized, a specialized third-party validation systems check any fraudulent activities and confirm whether the email, phone number, or other details are real.

To do this quickly, Zylker uses Webhooks in Zoho CRM. The moment a lead crosses the 80+ score, Zoho CRM automatically sends the lead’s data to Zylker’s external validation system. This lets Zylker verify the lead in real time and send back a clean, accurate, sales-ready profile for the Sales team to follow up on.

From here, we will explain every part of Webhooks by showing how it looks in the Zoho CRM UI and how to do the same using the API. Each step will be shown side-by-side, so you can clearly see how the UI setup translates into the API request.

Configuring Webhooks for Zylker’s Use Case - UI Method

  1. Go to Setup 
  2. Navigate to Automation
  3. Choose Actions -> Webhooks
  4. Click Configure Webhook
You will see the window shown below.
Webhook - UI view

The following sections explain what each field means in three parts:
  1. Basic fields to configure Webhook.
  2. Configuring Headers 
  3. Configuring Body

Filling the basic Webhook details via UI



Filling the basic Webhook details via Create Webhook API

Request URL: {{api-domain}}/crm/v8/settings/automation/webhooks
Request Method: POST
Input JSON

{
    "webhooks": [
        {
            "name": "Push High Score Leads",
            "description": "Send leads with Profit Score > 80 to validation system.",
            "module": {
                "api_name": "Leads",
                "id": "5725767000000002175"
            },
            "authentication": {
                "type": "general"
            },
            "http_method": "POST"
        }
    ]
}


Keys explanation

  1. name (mandatory): Name of your webhook.
  2. description: Add a short note about what this webhook does.
  3. module (mandatory): Select the module from where the external application listens the changes. In our case, select Leads module to push high-score leads.
  4. url (mandatory):  Specify the external endpoint where CRM will send the data. This lets the external application see what CRM sends.
    1. Note: In this post, we have used an endpoint from Webhook.site
  5. authentication (mandatory): Specify authentication type for the webhook endpoint. 
  6. Possible types:
    1. general: The receiving system does not require OAuth. You can pass OAuth tokens manually in headers.
    2. connections:
      1. OAuth-based integrations: Systems that use Zoho’s Connections.
      2. For our Zylker use case, we select General.
            Note: In Zoho CRM API V8, Webhooks currently support only General authentication. Connection-based authentication will be available in a future update.
  1. http_method (mandatory): Select a HTTP method that allows you to send structured data. 
            Possible values: POST, GET, PUT, DELETE

In our case, we use POST to create a new record in the external app with the necessary lead details, allowing the external system to run its validation checks.

HTTP methods and their supported parameters - Headers, Body, URL Parameters

  HTTP Method

  Headers

  Body

  URL Parameters

POST

  • Module parameters

  • Custom parameters

Type: form-data

Module parameters
Custom parameters
User-defined parameters

Formats: null

Type: raw

Formats: Text, JSON, HTML, XML

      Not Supported

PUT

  • Module parameters

  • Custom parameters

Type: form-data

Module parameters
Custom parameters
User-defined parameters

Formats: null

Type: raw

Formats: Text, JSON, HTML, XML

      Not Supported

GET

     Not Supported

           Not Supported

  1. Module parameters
  2. Custom parameters
  3. User-defined parameters   
  

DELETE

   Not Supported

          Not Supported

  • Module parameters

  • Custom parameters

  • User-defined parameters


Each HTTP method supports different parameter types. The above table shows which methods support Headers, Request Body, and URL Parameters. Detailed explanations of these parameter types are provided in the following section.

Creating a Webhook with Headers, Body, and URL Parameters

When a webhook is triggered in Zoho CRM, the data is sent to the external application as part of the HTTP request.
The data can be sent in three places:
  1. Headers
  2. Body (Form-Data or Raw)
  3. URL Parameters 
Each part serves a different purpose.

Configuring Headers 

UI - Configuration

Headers allow you to send extra information along with your webhook request. These help when the external app needs extra data like auth tokens or CRM field values.

Zoho CRM supports two types of headers:
  1. Module Parameters - Dynamic values from CRM fields
  2. Custom Parameters  - Static values you define

Module Parameters - dynamic CRM data

Module parameters allow you to send values from CRM fields inside the header. These values change depending on the record that triggered the webhook.

A module parameter consists of:
  1. Parameter Name - A unique header key that you define. It does not have to match the CRM field API name.
  2. Parameter Type - Defines the source of the data you are mapping. It can come from the selected CRM module such as Leads and Contacts, lookup fields, User fields such as Lead Owner, or Organization fields.
  3. Parameter Value - The merge field value. Example, ${!Leads.Created_By.id}
Note: If you decide to use Headers, then you must add at least one module_parameter. Otherwise CRM will show an error. 

Example:

Parameter Name

Parameter Type

Parameter Value

Lead_Email

Leads

Email

Annual_Revenue

Leads

Annual Revenue

Profit_Score

Leads

Profit Score

Created_By

Created  By

User Id


Custom Parameters - static values

Custom parameters are key-value pairs that never change.

These are useful for:
  1. API version
  2. Tags like “zylker-crm”

Name

Value

source

zylker-crm

version

v1

 

  

Configuring Headers via Create Webhook API

Request URL: {{api-domain}}/crm/v8/settings/automation/webhooks
Request Method: POST

Input JSON

{
    "webhooks": [
        { 
            .
            .
            .
            "http_method": "POST",
            "headers": {
                "module_parameters": [
                    {
                        "name": "Lead_Email",
                        "value": "${!Leads.Email}"
                    },
                    {
                        "name": "Annual_Revenue",
                        "value": "${!Leads.Annual_Revenue}"
                    },
                    {
                        "name": "Profit_Score",
                        "value": "${!Leads.Profit_Score}"
                    },
                    {
                        "name": "Created_By",
                        "value": "${!Leads.Created_By.id}"
                 }
                ],
                "custom_parameters": [
                    {
                        "name": "source",
                        "value": "zylker-crm"
                    },
                    {
                        "name": "version",
                        "value": "v1"
                    }
                ]
            }
        }
    ]
}


When should Zylker use Headers?
For the 80+ Profit Score validation use case, Zylker can include module parameters such as Lead Email, Profit Score, and Lead ID, which are helpful for fraud-detection tools.
Similarly, Zylker can include custom parameters like source=zylker-crm and api_version=v1 to help the external system identify where the webhook originated.

Configuring the Body of a Webhook - form-data & raw formats

After setting up the basic details and Headers, the next step is to configure the Body.
The Body is where the main CRM record data is sent, which is different from the Header section that only carries metadata like auth tokens or quick identifiers.

Depending on your needs, the Body can be either Form-Data or Raw. The list below shows the supported options for each format.
  1. Form-Data:
    1. Module parameter
    2. Custom parameter
    3. User-defined format.
  2. Raw:
    1. Text - plain messages
    2. JSON -  structured API payload
    3. HTML - formatted messages
    4. XML - traditional enterprise systems


Form-Data Body: key-value 

UI - Configuration


Zoho CRM lets you build Form-Data using three types of parameters:
  1. Module Parameters
  2. Custom Parameters
  3. User Defined Parameters
Use Form-Data when the external app expects key-value pairs - similar to how HTML forms submit data.

Note:
  1. Headers are for sending supporting information that helps the external system understand the request - this can include auth details, source identifiers, or key CRM fields like email or score that help with quick categorization or filtering. 
Why do Module and Custom parameters appear again in Form-Data?

The same Module Parameters and Custom Parameters are available in the Body because:
  1. Headers - Provide supporting details such as identifiers or quick-check values. For example, Lead ID, or source tags that help the external system check and route the request.
  2. Body - Contains the complete lead information that the external validation system needs to process.
Although the parameter names look the same (Module, Custom), their purpose changes:

Where parameters are used

Purpose

Example

Headers

Metadata - OAuth,tags, and context

source: zylker-crm

Form-Data (Body)

Main record data - actual lead details sent to the app.

 

lead_email=patricia@zylker.com

So Zoho CRM gives you the same structure, but used differently depending on where the data is placed.

User-Defined Parameters
User-Defined parameters let you build custom, human-readable messages or templates. This parameter is available only in the Body, not in Headers. 

Parameter Name

Parameter Value

custom_message

New high-score lead: ${Leads.First Name}${Leads.Last Name} (Score: ${Leads.Profit Score})


This is very helpful if your external app expects a text message, notes, or a description field.

Configuring the Body of a Webhook - form-data via Create Webhook API

Request URL: {{api-domain}}/crm/v8/settings/automation/webhooks
Request Method: POST

Input JSON

{
    "webhooks": [
        {
             .
             .
             .
            "body": {
                "form_data_content": {
                    "module_parameters": [
                        {
                            "name": "Lead_Email",
                            "value": "${!Leads.Email}"
                        },
                        {
                            "name": "Annual_Revenue",
                            "value": "${!Leads.Annual_Revenue}"
                        },
                        {
                            "name": "Profit_Score",
                            "value": "${!Leads.Profit_Score}"
                        },
                        {
                            "name": "Created_By",
                            "value": "${!Leads.Created_By.id}"
                        }
                    ],
                    "custom_parameters": [
                        {
                            "name": "source",
                            "value": "zylker-crm"
                        },
                        {
                            "name": "version",
                            "value": "v1"
                        }
                    ],
                    "user_defined_parameters": {
                        "name": "custom_message",
                        "value": "New high-score lead: ${!Leads.First_Name}${!Leads.Last_Name} (Score: ${!Leads.Profit_Score})"
                    }
                },
                "type": "form_data"
            },
            .
            .
            .
        }
    ]
}


Raw Body - JSON / XML / HTML / Text

Zoho CRM’s Webhook Body section allows you to send data to an external application in a Raw format. This is useful when the receiving system expects structured data in the following structure.

You can choose:
  1. Raw + Text
  2. Raw + JSON
  3. Raw + HTML
  4. Raw + XML

Raw + Text:

Text format is the simplest. You can type any text and insert merge fields.

UI - Configuration



When to use Text?
  1. When sending a simple message. 
  2. When the external app only expects plain text.

Configuring the Body of a Webhook - Raw - "Text" via Create Webhook API

Request URL: {{api-domain}}/crm/v8/settings/automation/webhooks
Request Method: POST

Input JSON

{
    "webhooks": [
        {
           .
           .
           .
            "body": {
                "raw_data_content": "New high score lead: ${!Leads.First_Name} ${!Leads.Last_Name}, ${!Leads.Email}, ${!Leads.Annual_Revenue}, ${!Leads.Phone}, ${!Leads.Industry}, ${!Leads.Owner}",
                "format": "Text",
                "type": "raw"
            },
            .
            .
            .
        }
    ]
}


Raw + JSON:

This is the most common format for APIs. Use this when the receiving system expects structured JSON data.

UI - Configuration



Configuring the Body of a Webhook - Raw - "JSON" via Create Webhook API

Request URL: {{api-domain}}/crm/v8/settings/automation/webhooks
Request Method: POST

Input JSON

{
    "webhooks": [
        {
          .
          .
          .
            "body": {
                "raw_data_content": "{\n    \"id\": \"${!Leads.id}\",\n    \"full_name\": \"${!Leads.Last_Name}\",\n    \"email\": \"${!Leads.Email}\",\n    \"company\": \"${!Leads.Company}\",\n    \"profit_score\": \"${!Leads.Profit_Score}\",\n    \"owner\": \"${!Leads.Owner}\"\n}",
                "format": "JSON",
                "type": "raw"
            },
           .
           .
           .
        }
    ]
}


When to use JSON?
  1. When the external system expects structured data
  2. Easier validation

Raw + HTML:

HTML format is useful for sending stylized messages or formatted content.

UI - Configuration

Configuring the Body of a Webhook - Raw - "HTML" via Create Webhook API

Request URL: {{api-domain}}/crm/v8/settings/automation/webhooks
Request Method: POST

Input JSON

{
    "webhooks": [
        {
            .
            .
            .
            "body": {
                "raw_data_content": "<p><strong>New Lead Alert</strong></p>\n<p>Name: ${!Leads.Last_Name}</p>\n<p>Email: ${!Leads.Email}</p>\n<p>Company: ${!Leads.Company}</p>\n<p>Profit Score: ${!Leads.Profit_Score}</p>\n<p>Owner: ${!Leads.Owner}</p>",
                "format": "HTML",
                "type": "raw"
            },
            .
            .
            .
        }
    ]
}


When to use HTML?
  1. If the external system displays formatted output

Raw + XML:
Some legacy systems or enterprise applications prefer XML.

UI - Configuration

Configuring the Body of a Webhook - Raw - "XML" via Create Webhook API

Request URL: {{api-domain}}/crm/v8/settings/automation/webhooks
Request Method: POST

Input JSON

{
    "webhooks": [
        {
          .
          .
          .
                "raw_data_content": "<Lead>\n    <Id>${!Leads.id}</Id>\n    <Name>${!Leads.Last_Name}</Name>\n    <Email>${!Leads.Email}</Email>\n    <Company>${!Leads.Company}</Company>\n    <ProfitScore>${!Leads.Profit_Score}</ProfitScore>\n<LeadOwner>${!Leads.Owner}</LeadOwner>\n</Lead>",
            "format": "XML",
            "type": "raw"
        },
            .
            .
            .
    }
]
}



When to use XML?
  1. With older systems
  2. When the receiving system only supports XML

Note:
  1. When you switch the webhook method in the UI, Zoho CRM changes the options you can configure:
            GET Method
    1. Only URL Parameters are available
    2. Headers are hidden
    3. Body is hidden
    4.  Because GET requests always send data through the URL and cannot carry a body.
            DELETE Method
    1. Headers are available
    2. URL Parameters are available
    3. Body is still not supported
    4. DELETE requests can include headers, but Zoho CRM does not allow sending a body for DELETE webhooks.

  1. Date-time format:
            Zoho CRM will format any Date or DateTime fields in your webhook according to the format you select.
            
            UI - Configuration

            

           API - Configuration

 
  {
    "webhooks": [
        {
            "module": {
                "api_name": "Leads",
                "id": "5725767000000002175"
            },
            "url_parameters": {
                "module_parameters": [
                    {
                        "name": "Created_Time",
                        "value": "${!Leads.Created_Time}"
                    }
                ]
            },
            "description": "Send leads with Profit Score > 80 to validation system.",
            "http_method": "GET",
            "name": "Push High Score Leads",
            "date_time_format": {
                "datetime_format": "mm-dd-yyyy HH:MM:SS",
                "date_format": "yyyy-mm-dd",
                "time_zone": "America/Los_Angeles"
            },
            "authentication": {
                "connection_name": null,
                "type": "general"
            }
        }
    ]
}


With this, we have covered what a Webhook is in Zoho CRM, how to configure a basic Webhook, how to configure a Webhook with Headers, Body, and URL Parameters, how each component works, how to configure them using the UI, and how the same setup can be created through the POST Webhooks API.

In Part 2, we will explain 
  1. How to manage Webhooks using the GET, PUT, and DELETE Webhook APIs
  2. How to associate a Webhook with a Workflow
  3. How to perform real-time testing by creating records
  4. How an external application receives data from Zoho CRM via Webhook.

We hope this post helps you understand how to use Webhooks through the Zoho CRM Actions API - Webhooks API.

Try it out, and let us know your experience in the comments section or reach out to us at support@zohocrm.com.
Stay tuned for more insights in our upcoming Kaizen posts!

Cheers!



      • Sticky Posts

      • Kaizen #217 - Actions APIs : Tasks

        Welcome to another week of Kaizen! In last week's post we discussed Email Notifications APIs which act as the link between your Workflow automations and you. We have discussed how Zylker Cloud Services uses Email Notifications API in their custom dashboard.
      • Kaizen #216 - Actions APIs : Email Notifications

        Welcome to another week of Kaizen! For the last three weeks, we have been discussing Zylker's workflows. We successfully updated a dormant workflow, built a new one from the ground up and more. But our work is not finished—these automated processes are
      • Kaizen #152 - Client Script Support for the new Canvas Record Forms

        Hello everyone! Have you ever wanted to trigger actions on click of a canvas button, icon, or text mandatory forms in Create/Edit and Clone Pages? Have you ever wanted to control how elements behave on the new Canvas Record Forms? This can be achieved
      • Kaizen #142: How to Navigate to Another Page in Zoho CRM using Client Script

        Hello everyone! Welcome back to another exciting Kaizen post. In this post, let us see how you can you navigate to different Pages using Client Script. In this Kaizen post, Need to Navigate to different Pages Client Script ZDKs related to navigation A.
      • Kaizen #210 - Answering your Questions | Event Management System using ZDK CLI

        Hello Everyone, Welcome back to yet another post in the Kaizen Series! As you already may know, for the Kaizen #200 milestone, we asked for your feedback and many of you suggested topics for us to discuss. We have been writing on these topics over the