Actions API - Webhooks APIs - Part 2

Actions API - Webhooks APIs - Part 2


Hello all!! 
Welcome back to the follow-up Kaizen post of Kaizen #219: Actions API - Webhooks APIs - Part 1.

In the previous week, we covered how to configure a basic Webhook and how to include Headers, Body, and URL Parameters using both the POST Webhook API and the Zoho CRM UI.
In this part, we will take one of the previously discussed examples and demonstrate how to achieve the same result using the GET, PUT, and DELETE Webhook APIs.
We will also walk through how to associate a Webhook with a Workflow, how to perform real-time testing by creating a record, and how the external application receives the response sent from Zoho CRM via the Webhook.

Retrieving a Webhook using the GET - Webhook API

Request URL: {{api-domain}}/crm/v8/settings/automation/webhooks/5725767000008778002
 - Note: You can retrieve all available Webhooks using "{{api-domain}}/crm/v8/settings/automation/webhooks" request.

Request Method: GET
Sample Response:

{
    "webhooks": [
        {
            "headers": {
                "module_parameters": [
                    {
                        "name": "Lead_Email",
                        "value": "${!Leads.Email}"
                    },
                    {
                        "name": "Annual_Revenue",
                        "value": "${!Leads.Annual_Revenue}"
                    },
                    {
                        "name": "Profit_Score",
                        "value": "${!Leads.Profit_Score}"
                    }
                ],
                "custom_parameters": [
                    {
                        "name": "source",
                        "value": "zylker-crm"
                    },
                    {
                        "name": "version",
                        "value": "v1"
                    }
                ]
            },
            "created_time": "2025-11-30T07:18:50-08:00",
            "lock_status": {
                "locked": false
            },
            "editable": true,
            "module": {
                "api_name": "Leads",
                "id": "5725767000000002175"
            },
            "related_module": null,
            "url_parameters": null,
            "deletable": true,
            "description": "Send leads with Profit Score > 80 to validation system.",
            "source": "crm",
            "body": {
                "format": null,
                "type": "none"
            },
            "created_by": {
                "name": "Patricia Boyle",
                "id": "5725767000000411001"
            },
            "feature_type": "workflow",
            "http_method": "POST",
            "modified_time": "2025-11-30T07:18:50-08:00",
            "associated": false,
            "name": "Push High Score Leads",
            "modified_by": {
                "name": "Patricia Boyle",
                "id": "5725767000000411001"
            },
            "id": "5725767000008778002",
            "date_time_format": null,
            "authentication": {
                "connection_name": null,
                "type": "general"
            }
        }
    ]
}


Updating the Webhook using the PUT - Webhook API

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

Input JSON:

{
    "webhooks": [
        {
            "headers": {
                "module_parameters": [
                    {
                        "name": "Lead_Email",
                        "value": "${!Leads.Email}"
                    },
                    {
                        "name": "Profit_Score",
                        "value": "${!Leads.Profit_Score}"
                    },
                    {
                        "name": "Lead_Industry", // adding a new field
                        "value": "${!Leads.Industry}"
                    }
                ],
                "custom_parameters": [
                    {
                        "name": "source",
                        "value": "zylker-crm"
                    },
                    {
                        "name": "version",
                        "value": "v1"
                    }
                ]
            },
            "url": "https://webhook.site/abcd1234-5678-90ef-ghij-123456789axx", // changing external application's URL
            "http_method": "POST"
        }
    ]
}


Note: 
  1. You cannot update the module field. The rest of the fields can be updated using the PUT - Webhook API.
  2. Exclude a field, header section, URL parameter section, body section from the request if you want to remove its configuration from your webhook.
  3. http_method is mandatory for the Update call.
  4. To change the external URL, the http_method key is mandatory.

Deleting the Webhook using the DELETE - Webhook API

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

Sample Response:
{
    "webhooks": [
        {
            "code": "SUCCESS",
            "details": {
                "id": "5725767000008778002"
            },
            "message": "Webhook is deleted",
            "status": "success"
        }
    ]
}
Note: You cannot delete a Webhook if it is associated with any automation feature like Workflow and Blueprint.

Associating a Webhook to a Workflow Rule using the Workflow API

Create a Workflow:
You can use the Configure Workflow Rule API to create a workflow.

Associate the Field Update:
You can associate a Webhook action with the workflow by using the unique ID of the Webhook.

Retrieve the Webhook ID using the Get Webhooks API.

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

{
    "workflow_rules": [
        {
          .
          .
          .
            "execute_when": {
                "details": {
                    "trigger_module": {
                        "api_name": "Leads",
                        "id": "5725767000000002175"
                    }
                },
                "type": "create_or_edit"
            },
            "module": {
                "api_name": "Leads",
                "id": "5725767000000002175"
            },
            "name": "High Profit Leads",
            "conditions": [
                {
                    "instant_actions": {
                        "actions": [
                            {
                                "name": "Push High Score Leads",
                                "id": "5725767000008775001", //associating the created Webhooks with the Workflow
                                "type": "webhooks"
                            }
                        ]
                    },
                    "scheduled_actions": null,
                    "criteria_details": {
                       .
                         .
                        .
                        "criteria": {
                            "comparator": "greater_equal",
                            "field": {
                                "api_name": "Profit_Score",
                                "id": "5725767000008570336"
                            },
                            "type": "value",
                            "value": "80"
                        }
                    }
                 
                }
            ],
            .
            .
            .
        }
    ]
}


For more details on Workflow Rules using APIs, refer to Kaizen #213 - Workflow APIs - Part 1, Part 2, and Part 3.

Sample Webhook:


Creating a high Profit Score lead using the Create Records API

To test our webhook end-to-end, we will create a high Profit Score lead using the Create Records API. When this lead meets the workflow condition, the webhook fires, allowing us to observe the exact payload sent to the external system.

Request URL:  {{api-domain}}/crm/v8/settings/automation/workflow_rules
Request Method: POST
Input JSON
{
    "data": [
        {
            "Owner": {
                "name": "Tim",
                "id": "5725767000000411001",
                "email": "tim@zoho.com"
            },
            "Annual_Revenue": 2000000,
            "Full_Name": "Patricia Boyle",
            "Layout": {
                "name": "Standard",
                "id": "5725767000000091055"
            },
            "Company": "Info Technology",
            "Email": "infotech@mail.com",
            "Industry": "Large Enterprise",
            "First_Name": "Patricia",
            "Profit_Score": 90,
            "Profit_Category": "High Profit",
            "Last_Name": "Boyle"
        }
    ]
}
Real response in Zylker’s external validation system:

After setting up the webhook and linking it to a workflow, we added a test lead that matched our condition. The external app received the webhook instantly, just the way we configured. This shows how easily Zoho CRM can push data to any system in real time. This real-time flow ensures clean, validated, enriched leads reach the Sales team faster, improving response time and conversion rates.

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!