Functions
AI Tools
Open in ChatGPT
Open in ChatGPT to ask questions about this page
Open in Claude
Open in Claude to ask questions about this page
Copy as Markdown
Copy this page as markdown to use with AI assistants
View as Markdown
Open this page as markdown in a new tab
Open in ChatGPT
Open in ChatGPT to ask questions about this page
Open in Claude
Open in Claude to ask questions about this page
Copy as Markdown
Copy this page as markdown to use with AI assistants
View as Markdown
Open this page as markdown in a new tab
Functions are reusable, UI-triggered components in Zoho Cliq that execute when a user interacts with a UI element - clicking a button in a message, submitting or changing a form, or clicking a button inside a widget. Unlike commands or message actions which are user-text-driven, functions are driven by structured UI interactions.
For more information, refer to the Functions Help Documentation.
Function Types
The function_type field determines which UI trigger activates the function:
| function_type | Trigger |
|---|---|
button |
Triggered when a user clicks a button inside a chat message. |
form |
Triggered by form interactions - view (render), field change, dynamic select, and submit events. |
widget_button |
Triggered when a user clicks a button rendered inside a Cliq widget. |
Function Handlers
Each function supports one or more handlers based on its type. Handlers define the logic executed at each stage of the UI interaction:
| Handler | Applicable function_type | Description |
|---|---|---|
button_handler |
button |
Executes when a button in a message is clicked. |
form_view_handler |
form |
Renders the form UI when a user navigates to the form's permalink URL. |
form_submit_handler |
form |
Executes when the user submits the form. |
form_change_handler |
form |
Executes when a field value changes within the form. |
form_dynamic_select_handler |
form |
Populates dynamic dropdown options within a form field. |
widget_button_handler |
widget_button |
Executes when a button inside a Cliq widget is clicked. |
What can you do with the Functions API?
With the Functions API, you can programmatically create and manage functions, configure their handlers (Deluge scripts or webhook permissions), update function configurations, and retrieve function details - all without using the Cliq Developer console.
Each function has an execution_type that defines how handlers run when a UI element is triggered. The Functions API supports two execution types:
Deluge Functions (default)
Handler logic is written in Deluge and runs entirely within Zoho's platform. No external server is required.
- If
execution_typeis not specified, it defaults todeluge. - Handler logic is defined using the
scriptfield when creating or updating handlers. - Suitable for teams building UI-driven automations entirely within the Zoho platform.
Webhook Functions
When a UI element is interacted with, Zoho Cliq sends an HTTP POST request to your execution_url. Your server processes the event and returns a response that Cliq renders back to the user.
- To create a Webhook function, set
execution_typetowebhookand provide theexecution_url. - Handler permissions (
chat,message,user) control which data attributes are included in the webhook payload. Note:locationandattachmentsare not available for function handlers. - Ideal for functions that need to integrate with external systems or require custom server-side processing.
Create a new function
AI Tools
Open in ChatGPT
Open in ChatGPT to ask questions about this page
Open in Claude
Open in Claude to ask questions about this page
Copy as Markdown
Copy this page as markdown to use with AI assistants
View as Markdown
Open this page as markdown in a new tab
Open in ChatGPT
Open in ChatGPT to ask questions about this page
Open in Claude
Open in Claude to ask questions about this page
Copy as Markdown
Copy this page as markdown to use with AI assistants
View as Markdown
Open this page as markdown in a new tab
Create a new Function in the Cliq platform. Functions are reusable UI-triggered components that execute when a user clicks a button, submits a form, or interacts with a widget button. The function_type determines the UI trigger.
Functions support two execution types:
- Deluge (default): Handler logic runs on Zoho's platform via Deluge scripts. Best for UI interactions within the Zoho ecosystem - approvals, form submissions, inline actions.
- Webhook: When a UI element is interacted with, Cliq sends a POST request to your
execution_url. Your server processes the event and returns a response that Cliq renders back to the user. Supportschat,message, anduserpermissions.
Pass execution_type: "webhook" and a valid execution_url to create a Webhook function. If execution_type is omitted, it defaults to deluge.
Threshold limit: 10 requests per min per user
Maximum API calls allowed within one minute.
Lock period: 5 minutes
Cooldown period applied after threshold exhaustion.
Possible Error Codes
| Error Code | Description |
|---|---|
function_creation_limit_exceeded |
Organization has reached the maximum number of functions. |
function_name_already_exists |
A function with this name already exists. |
invalid_inputs |
Request body validation failed. |
Error Response Format
When an error occurs, the API returns a JSON response in this format:
{"message": "A human-readable description of the error.", "code": "error_code"}
where code is the error identifier (as listed in the table above) and message is a human-readable explanation of what went wrong.
OAuth Scope : ZohoCliq.Functions.CREATE
Arguments
Maximum length: 30 characters.
Maximum length: 300 characters.
Allowed values:
- button - Triggered by button clicks in messages.
- form - Triggered by form submissions and interactions.
- widget_button - Triggered by button clicks inside widgets.
function_type cannot be changed after creation.
- deluge (default) - Handler logic is written in Deluge and executed on Zoho's platform.
- webhook - Cliq sends a POST request to your
execution_urlwhen the function is triggered. Provideexecution_urlwhen using this type.
execution_type is webhook.Maximum length: 225 characters.
parameters_data='{"field1":"value1","field2":"value2"}';
headers_data = Map();
headers_data.put("Authorization", "Bearer 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f");
response = invokeUrl
[
url: "https://cliq.zoho.com/api/v3/functions"
type: POST
headers: headers_data
content-type: application/json
parameters: parameters_data
connection: <connection_name>
];
info response;
OkHttpClient client = new OkHttpClient();
MediaType mediaType = MediaType.parse("application/json");
RequestBody body = RequestBody.create(mediaType, "{\"field1\":\"value1\",\"field2\":\"value2\"}");
Request request = new Request.Builder()
.url("https://cliq.zoho.com/api/v3/functions")
.post(body)
.addHeader("Authorization", "Bearer 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f")
.addHeader("content-type", "application/json")
.build();
Response response = client.newCall(request).execute();
const options = {
method: 'POST',
headers: {
Authorization: 'Bearer 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f',
'content-type': 'application/json'
},
body: '{"field1":"value1","field2":"value2"}'
};
fetch('https://cliq.zoho.com/api/v3/functions', options)
.then(response => response.json())
.then(response => console.log(response))
.catch(err => console.error(err));
import http.client
conn = http.client.HTTPSConnection("cliq.zoho.com")
payload = "{\"field1\":\"value1\",\"field2\":\"value2\"}"
headers = {
'Authorization': "Bearer 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f",
'content-type': "application/json"
}
conn.request("POST", "/api/v3/functions", payload, headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
const http = require("https");
const options = {
"method": "POST",
"hostname": "cliq.zoho.com",
"port": null,
"path": "/api/v3/functions",
"headers": {
"Authorization": "Bearer 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f",
"content-type": "application/json"
}
};
const req = http.request(options, function (res) {
const chunks = [];
res.on("data", function (chunk) {
chunks.push(chunk);
});
res.on("end", function () {
const body = Buffer.concat(chunks);
console.log(body.toString());
});
});
req.write(JSON.stringify({field1: 'value1', field2: 'value2'}));
req.end();
var client = new RestClient("https://cliq.zoho.com/api/v3/functions");
var request = new RestRequest(Method.POST);
request.AddHeader("Authorization", "Bearer 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f");
request.AddHeader("content-type", "application/json");
request.AddParameter("application/json", "{\"field1\":\"value1\",\"field2\":\"value2\"}", ParameterType.RequestBody);
IRestResponse response = client.Execute(request);
var client = new HttpClient();
var request = new HttpRequestMessage
{
Method = HttpMethod.Post,
RequestUri = new Uri("https://cliq.zoho.com/api/v3/functions"),
Headers =
{
{ "Authorization", "Bearer 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f" },
},
Content = new StringContent("{\"field1\":\"value1\",\"field2\":\"value2\"}")
{
Headers =
{
ContentType = new MediaTypeHeaderValue("application/json")
}
}
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
package main
import (
"fmt"
"strings"
"net/http"
"io/ioutil"
)
func main() {
url := "https://cliq.zoho.com/api/v3/functions"
payload := strings.NewReader("{\"field1\":\"value1\",\"field2\":\"value2\"}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f")
req.Header.Add("content-type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := ioutil.ReadAll(res.Body)
fmt.Println(res)
fmt.Println(string(body))
}
const data = JSON.stringify({
"field1": "value1",
"field2": "value2"
});
const xhr = new XMLHttpRequest();
xhr.withCredentials = true;
xhr.addEventListener("readystatechange", function () {
if (this.readyState === this.DONE) {
console.log(this.responseText);
}
});
xhr.open("POST", "https://cliq.zoho.com/api/v3/functions");
xhr.setRequestHeader("Authorization", "Bearer 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f");
xhr.setRequestHeader("content-type", "application/json");
xhr.send(data);
curl --request POST \
--url https://cliq.zoho.com/api/v3/functions \
--header 'Authorization: Bearer 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f' \
--header 'content-type: application/json' \
--data '{"field1":"value1","field2":"value2"}'
{
"name": "SubmitFeedback",
"description": "Processes feedback form submissions from users",
"function_type": "form"
}
{
"url": "/api/v3/functions",
"type": "function",
"data": {
"name": "SubmitFeedback",
"id": "53719000002124012",
"function_type": "form",
"handlers": [
{
"type": "form_submit_handler"
}
],
"creator": {
"name": "James",
"id": "65113112"
},
"execution_type": "deluge",
"status": "enabled",
"type": "custom",
"description": "Processes feedback form submissions from users",
"scope": "personal"
}
}
{
"message": "The request cannot be performed. Usually because of malformed parameter or missing parameter."
}
{
"message": "Request was rejected because of invalid AuthToken."
}
{
"message": "The user does not have enough permission or possibly not an user of the respective organization to access the resource."
}
{
"message": "The URL you've sent is wrong. It's possible that the resource you've requested has been moved to another URL."
}
{
"message": "The requested resource does not support the HTTP method used. For example, requesting List of all customers API with PUT as the HTTP method."
}
{
"message": "The response has been received but the requested response type is not supported by the browser."
}
{
"message": "Too many requests within a certain time frame."
}
{
"message": "Cliq server encountered an error which prevents it from fulfilling the request."
}
List all functions
AI Tools
Open in ChatGPT
Open in ChatGPT to ask questions about this page
Open in Claude
Open in Claude to ask questions about this page
Copy as Markdown
Copy this page as markdown to use with AI assistants
View as Markdown
Open this page as markdown in a new tab
Open in ChatGPT
Open in ChatGPT to ask questions about this page
Open in Claude
Open in Claude to ask questions about this page
Copy as Markdown
Copy this page as markdown to use with AI assistants
View as Markdown
Open this page as markdown in a new tab
Retrieve a paginated list of all functions defined by the authenicated user.
Threshold limit: 30 requests per min per user
Maximum API calls allowed within one minute.
Lock period: 5 minutes
Cooldown period applied after threshold exhaustion.
OAuth Scope : ZohoCliq.Functions.READ
Query Parameters
sync_token value from a previous response to retrieve only functions that were created or updated since that response was generated.Default: 20
Maximum: 50
headers_data = Map();
headers_data.put("Authorization", "Bearer 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f");
response = invokeUrl
[
url: "https://cliq.zoho.com/api/v3/functions"
type: GET
headers: headers_data
connection: <connection_name>
];
info response;
OkHttpClient client = new OkHttpClient();
Request request = new Request.Builder()
.url("https://cliq.zoho.com/api/v3/functions")
.get()
.addHeader("Authorization", "Bearer 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f")
.build();
Response response = client.newCall(request).execute();
const options = {
method: 'GET',
headers: {
Authorization: 'Bearer 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f'
}
};
fetch('https://cliq.zoho.com/api/v3/functions', options)
.then(response => response.json())
.then(response => console.log(response))
.catch(err => console.error(err));
import http.client
conn = http.client.HTTPSConnection("cliq.zoho.com")
headers = { 'Authorization': "Bearer 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f" }
conn.request("GET", "/api/v3/functions", headers=headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
const http = require("https");
const options = {
"method": "GET",
"hostname": "cliq.zoho.com",
"port": null,
"path": "/api/v3/functions",
"headers": {
"Authorization": "Bearer 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f"
}
};
const req = http.request(options, function (res) {
const chunks = [];
res.on("data", function (chunk) {
chunks.push(chunk);
});
res.on("end", function () {
const body = Buffer.concat(chunks);
console.log(body.toString());
});
});
req.end();
var client = new RestClient("https://cliq.zoho.com/api/v3/functions");
var request = new RestRequest(Method.GET);
request.AddHeader("Authorization", "Bearer 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f");
IRestResponse response = client.Execute(request);
var client = new HttpClient();
var request = new HttpRequestMessage
{
Method = HttpMethod.Get,
RequestUri = new Uri("https://cliq.zoho.com/api/v3/functions"),
Headers =
{
{ "Authorization", "Bearer 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f" },
},
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
package main
import (
"fmt"
"net/http"
"io/ioutil"
)
func main() {
url := "https://cliq.zoho.com/api/v3/functions"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "Bearer 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := ioutil.ReadAll(res.Body)
fmt.Println(res)
fmt.Println(string(body))
}
const data = null;
const xhr = new XMLHttpRequest();
xhr.withCredentials = true;
xhr.addEventListener("readystatechange", function () {
if (this.readyState === this.DONE) {
console.log(this.responseText);
}
});
xhr.open("GET", "https://cliq.zoho.com/api/v3/functions");
xhr.setRequestHeader("Authorization", "Bearer 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f");
xhr.send(data);
curl --request GET \
--url https://cliq.zoho.com/api/v3/functions \
--header 'Authorization: Bearer 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f'
{
"url": "/api/v3/functions",
"next_token": "NTB8LTF8NTM3MTkwMDAwMDAyNDUwMTE=",
"type": "function",
"sync_token": "NTB8MTc3NzQzMjg2NjI1MXw1MzcxOTAwMDAwMjEyNDAxMQ==",
"data": [
{
"name": "createTask",
"id": "53719000002124011",
"function_type": "button",
"handlers": [
{
"type": "button_handler"
}
],
"creator": {
"name": "James",
"id": "65113112"
},
"execution_type": "deluge",
"status": "enabled",
"type": "custom",
"description": "Creates a task in integrated system",
"scope": "personal"
},
{
"name": "SubmitFeedback",
"id": "53719000002124012",
"function_type": "form",
"handlers": [
{
"type": "form_submit_handler"
}
],
"creator": {
"name": "James",
"id": "65113112"
},
"execution_type": "deluge",
"status": "enabled",
"type": "custom",
"description": "Processes feedback form submissions from users",
"scope": "personal"
}
]
}
{
"message": "The request cannot be performed. Usually because of malformed parameter or missing parameter."
}
{
"message": "Request was rejected because of invalid AuthToken."
}
{
"message": "The user does not have enough permission or possibly not an user of the respective organization to access the resource."
}
{
"message": "The URL you've sent is wrong. It's possible that the resource you've requested has been moved to another URL."
}
{
"message": "The requested resource does not support the HTTP method used. For example, requesting List of all customers API with PUT as the HTTP method."
}
{
"message": "The response has been received but the requested response type is not supported by the browser."
}
{
"message": "Too many requests within a certain time frame."
}
{
"message": "Cliq server encountered an error which prevents it from fulfilling the request."
}
Update an existing function
AI Tools
Open in ChatGPT
Open in ChatGPT to ask questions about this page
Open in Claude
Open in Claude to ask questions about this page
Copy as Markdown
Copy this page as markdown to use with AI assistants
View as Markdown
Open this page as markdown in a new tab
Open in ChatGPT
Open in ChatGPT to ask questions about this page
Open in Claude
Open in Claude to ask questions about this page
Copy as Markdown
Copy this page as markdown to use with AI assistants
View as Markdown
Open this page as markdown in a new tab
Update the configuration (name and description) of an existing function.
To modify the function's handler logic, use the handler-level endpoints.
For Webhook functions, you can also update the execution_url independently at any time to redirect all handler events to a new server endpoint.
Threshold limit: 10 requests per min per user
Maximum API calls allowed within one minute.
Lock period: 5 minutes
Cooldown period applied after threshold exhaustion.
Possible Error Codes
| Error Code | Description |
|---|---|
function_not_found |
Function with the specified ID was not found. |
function_name_already_exists |
Another function with this name already exists. |
Error Response Format
When an error occurs, the API returns a JSON response in this format:
{"message": "A human-readable description of the error.", "code": "error_code"}
where code is the error identifier (as listed in the table above) and message is a human-readable explanation of what went wrong.
OAuth Scope : ZohoCliq.Functions.UPDATE
Arguments
Maximum length: 30 characters.
Maximum length: 300 characters.
execution_type is webhook.Maximum length: 225 characters.
Path Parameters
parameters_data='{"name":"createTask","description":"Creates a task in integrated system","execution_url":"string"}';
headers_data = Map();
headers_data.put("Authorization", "Bearer 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f");
response = invokeUrl
[
url: "https://cliq.zoho.com/api/v3/functions/53719000002124011"
type: PATCH
headers: headers_data
content-type: application/json
parameters: parameters_data
connection: <connection_name>
];
info response;
OkHttpClient client = new OkHttpClient();
MediaType mediaType = MediaType.parse("application/json");
RequestBody body = RequestBody.create(mediaType, "{\"name\":\"createTask\",\"description\":\"Creates a task in integrated system\",\"execution_url\":\"string\"}");
Request request = new Request.Builder()
.url("https://cliq.zoho.com/api/v3/functions/53719000002124011")
.patch(body)
.addHeader("Authorization", "Bearer 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f")
.addHeader("content-type", "application/json")
.build();
Response response = client.newCall(request).execute();
const options = {
method: 'PATCH',
headers: {
Authorization: 'Bearer 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f',
'content-type': 'application/json'
},
body: '{"name":"createTask","description":"Creates a task in integrated system","execution_url":"string"}'
};
fetch('https://cliq.zoho.com/api/v3/functions/53719000002124011', options)
.then(response => response.json())
.then(response => console.log(response))
.catch(err => console.error(err));
import http.client
conn = http.client.HTTPSConnection("cliq.zoho.com")
payload = "{\"name\":\"createTask\",\"description\":\"Creates a task in integrated system\",\"execution_url\":\"string\"}"
headers = {
'Authorization': "Bearer 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f",
'content-type': "application/json"
}
conn.request("PATCH", "/api/v3/functions/53719000002124011", payload, headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
const http = require("https");
const options = {
"method": "PATCH",
"hostname": "cliq.zoho.com",
"port": null,
"path": "/api/v3/functions/53719000002124011",
"headers": {
"Authorization": "Bearer 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f",
"content-type": "application/json"
}
};
const req = http.request(options, function (res) {
const chunks = [];
res.on("data", function (chunk) {
chunks.push(chunk);
});
res.on("end", function () {
const body = Buffer.concat(chunks);
console.log(body.toString());
});
});
req.write(JSON.stringify({
name: 'createTask',
description: 'Creates a task in integrated system',
execution_url: 'string'
}));
req.end();
var client = new RestClient("https://cliq.zoho.com/api/v3/functions/53719000002124011");
var request = new RestRequest(Method.PATCH);
request.AddHeader("Authorization", "Bearer 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f");
request.AddHeader("content-type", "application/json");
request.AddParameter("application/json", "{\"name\":\"createTask\",\"description\":\"Creates a task in integrated system\",\"execution_url\":\"string\"}", ParameterType.RequestBody);
IRestResponse response = client.Execute(request);
var client = new HttpClient();
var request = new HttpRequestMessage
{
Method = HttpMethod.Patch,
RequestUri = new Uri("https://cliq.zoho.com/api/v3/functions/53719000002124011"),
Headers =
{
{ "Authorization", "Bearer 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f" },
},
Content = new StringContent("{\"name\":\"createTask\",\"description\":\"Creates a task in integrated system\",\"execution_url\":\"string\"}")
{
Headers =
{
ContentType = new MediaTypeHeaderValue("application/json")
}
}
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
package main
import (
"fmt"
"strings"
"net/http"
"io/ioutil"
)
func main() {
url := "https://cliq.zoho.com/api/v3/functions/53719000002124011"
payload := strings.NewReader("{\"name\":\"createTask\",\"description\":\"Creates a task in integrated system\",\"execution_url\":\"string\"}")
req, _ := http.NewRequest("PATCH", url, payload)
req.Header.Add("Authorization", "Bearer 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f")
req.Header.Add("content-type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := ioutil.ReadAll(res.Body)
fmt.Println(res)
fmt.Println(string(body))
}
const data = JSON.stringify({
"name": "createTask",
"description": "Creates a task in integrated system",
"execution_url": "string"
});
const xhr = new XMLHttpRequest();
xhr.withCredentials = true;
xhr.addEventListener("readystatechange", function () {
if (this.readyState === this.DONE) {
console.log(this.responseText);
}
});
xhr.open("PATCH", "https://cliq.zoho.com/api/v3/functions/53719000002124011");
xhr.setRequestHeader("Authorization", "Bearer 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f");
xhr.setRequestHeader("content-type", "application/json");
xhr.send(data);
curl --request PATCH \
--url https://cliq.zoho.com/api/v3/functions/53719000002124011 \
--header 'Authorization: Bearer 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f' \
--header 'content-type: application/json' \
--data '{"name":"createTask","description":"Creates a task in integrated system","execution_url":"string"}'
{
"name": "createTaskUpdated",
"description": "Updated function description"
}
{
"execution_url": "https://api.yourcompany.com/cliq/functions/updated-handler"
}
{
"url": "/api/v3/functions/53719000002124011",
"type": "function",
"data": {
"name": "createTaskUpdated",
"id": "53719000002124011",
"function_type": "button",
"handlers": [
{
"type": "button_handler"
}
],
"creator": {
"name": "James",
"id": "65113112"
},
"execution_type": "deluge",
"status": "enabled",
"type": "custom",
"description": "Updated function description",
"scope": "personal"
}
}
{
"url": "/api/v3/functions/53719000002124014",
"type": "function",
"data": {
"name": "ApproveExpense",
"id": "53719000002124014",
"function_type": "button",
"handlers": [
{
"type": "button_handler"
}
],
"creator": {
"name": "James",
"id": "65113112"
},
"execution_type": "webhook",
"execution_url": "https://api.yourcompany.com/cliq/functions/updated-handler",
"status": "enabled",
"type": "custom",
"description": "Forwards approval clicks to external HR system",
"scope": "personal"
}
}
{
"message": "The request cannot be performed. Usually because of malformed parameter or missing parameter."
}
{
"message": "Request was rejected because of invalid AuthToken."
}
{
"message": "The user does not have enough permission or possibly not an user of the respective organization to access the resource."
}
{
"message": "The URL you've sent is wrong. It's possible that the resource you've requested has been moved to another URL."
}
{
"message": "The requested resource does not support the HTTP method used. For example, requesting List of all customers API with PUT as the HTTP method."
}
{
"message": "The response has been received but the requested response type is not supported by the browser."
}
{
"message": "Too many requests within a certain time frame."
}
{
"message": "Cliq server encountered an error which prevents it from fulfilling the request."
}
Get details of a specific function
AI Tools
Open in ChatGPT
Open in ChatGPT to ask questions about this page
Open in Claude
Open in Claude to ask questions about this page
Copy as Markdown
Copy this page as markdown to use with AI assistants
View as Markdown
Open this page as markdown in a new tab
Open in ChatGPT
Open in ChatGPT to ask questions about this page
Open in Claude
Open in Claude to ask questions about this page
Copy as Markdown
Copy this page as markdown to use with AI assistants
View as Markdown
Open this page as markdown in a new tab
Retrieve the full configuration of a single Function identified by its `FUNCTION_ID`. The response includes the function name, description, and a summary of the configured handlers.
Threshold limit: 30 requests per min per user
Maximum API calls allowed within one minute.
Lock period: 5 minutes
Cooldown period applied after threshold exhaustion.
Possible Error Codes
| Error Code | Description |
|---|---|
function_not_found |
Function with the specified ID was not found. |
Error Response Format
When an error occurs, the API returns a JSON response in this format:
{"message": "A human-readable description of the error.", "code": "error_code"}
where code is the error identifier (as listed in the table above) and message is a human-readable explanation of what went wrong.
OAuth Scope : ZohoCliq.Functions.READ
Path Parameters
headers_data = Map();
headers_data.put("Authorization", "Bearer 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f");
response = invokeUrl
[
url: "https://cliq.zoho.com/api/v3/functions/987000000654321"
type: GET
headers: headers_data
connection: <connection_name>
];
info response;
OkHttpClient client = new OkHttpClient();
Request request = new Request.Builder()
.url("https://cliq.zoho.com/api/v3/functions/987000000654321")
.get()
.addHeader("Authorization", "Bearer 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f")
.build();
Response response = client.newCall(request).execute();
const options = {
method: 'GET',
headers: {
Authorization: 'Bearer 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f'
}
};
fetch('https://cliq.zoho.com/api/v3/functions/987000000654321', options)
.then(response => response.json())
.then(response => console.log(response))
.catch(err => console.error(err));
import http.client
conn = http.client.HTTPSConnection("cliq.zoho.com")
headers = { 'Authorization': "Bearer 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f" }
conn.request("GET", "/api/v3/functions/987000000654321", headers=headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
const http = require("https");
const options = {
"method": "GET",
"hostname": "cliq.zoho.com",
"port": null,
"path": "/api/v3/functions/987000000654321",
"headers": {
"Authorization": "Bearer 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f"
}
};
const req = http.request(options, function (res) {
const chunks = [];
res.on("data", function (chunk) {
chunks.push(chunk);
});
res.on("end", function () {
const body = Buffer.concat(chunks);
console.log(body.toString());
});
});
req.end();
var client = new RestClient("https://cliq.zoho.com/api/v3/functions/987000000654321");
var request = new RestRequest(Method.GET);
request.AddHeader("Authorization", "Bearer 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f");
IRestResponse response = client.Execute(request);
var client = new HttpClient();
var request = new HttpRequestMessage
{
Method = HttpMethod.Get,
RequestUri = new Uri("https://cliq.zoho.com/api/v3/functions/987000000654321"),
Headers =
{
{ "Authorization", "Bearer 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f" },
},
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
package main
import (
"fmt"
"net/http"
"io/ioutil"
)
func main() {
url := "https://cliq.zoho.com/api/v3/functions/987000000654321"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "Bearer 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := ioutil.ReadAll(res.Body)
fmt.Println(res)
fmt.Println(string(body))
}
const data = null;
const xhr = new XMLHttpRequest();
xhr.withCredentials = true;
xhr.addEventListener("readystatechange", function () {
if (this.readyState === this.DONE) {
console.log(this.responseText);
}
});
xhr.open("GET", "https://cliq.zoho.com/api/v3/functions/987000000654321");
xhr.setRequestHeader("Authorization", "Bearer 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f");
xhr.send(data);
curl --request GET \
--url https://cliq.zoho.com/api/v3/functions/987000000654321 \
--header 'Authorization: Bearer 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f'
{
"url": "/api/v3/functions",
"type": "function",
"data": {
"name": "createTask",
"id": "53719000002124011",
"function_type": "button",
"handlers": [
{
"type": "button_handler"
}
],
"creator": {
"name": "James",
"id": "65113112"
},
"execution_type": "deluge",
"status": "enabled",
"type": "custom",
"description": "Creates a task in integrated system",
"scope": "personal"
}
}
{
"message": "The request cannot be performed. Usually because of malformed parameter or missing parameter."
}
{
"message": "Request was rejected because of invalid AuthToken."
}
{
"message": "The user does not have enough permission or possibly not an user of the respective organization to access the resource."
}
{
"message": "The URL you've sent is wrong. It's possible that the resource you've requested has been moved to another URL."
}
{
"message": "The requested resource does not support the HTTP method used. For example, requesting List of all customers API with PUT as the HTTP method."
}
{
"message": "The response has been received but the requested response type is not supported by the browser."
}
{
"message": "Too many requests within a certain time frame."
}
{
"message": "Cliq server encountered an error which prevents it from fulfilling the request."
}
Delete a specific function
AI Tools
Open in ChatGPT
Open in ChatGPT to ask questions about this page
Open in Claude
Open in Claude to ask questions about this page
Copy as Markdown
Copy this page as markdown to use with AI assistants
View as Markdown
Open this page as markdown in a new tab
Open in ChatGPT
Open in ChatGPT to ask questions about this page
Open in Claude
Open in Claude to ask questions about this page
Copy as Markdown
Copy this page as markdown to use with AI assistants
View as Markdown
Open this page as markdown in a new tab
Permanently delete a Function and all its associated handlers. Any platform component that calls this function will stop working once it is deleted. This action is irreversible.
Threshold limit: 10 requests per min per user
Maximum API calls allowed within one minute.
Lock period: 5 minutes
Cooldown period applied after threshold exhaustion.
Possible Error Codes
| Error Code | Description |
|---|---|
function_not_found |
Function with the specified ID was not found. |
Error Response Format
When an error occurs, the API returns a JSON response in this format:
{"message": "A human-readable description of the error.", "code": "error_code"}
where code is the error identifier (as listed in the table above) and message is a human-readable explanation of what went wrong.
OAuth Scope : ZohoCliq.Functions.DELETE
Path Parameters
headers_data = Map();
headers_data.put("Authorization", "Bearer 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f");
response = invokeUrl
[
url: "https://cliq.zoho.com/api/v3/functions/987000000654321"
type: DELETE
headers: headers_data
connection: <connection_name>
];
info response;
OkHttpClient client = new OkHttpClient();
Request request = new Request.Builder()
.url("https://cliq.zoho.com/api/v3/functions/987000000654321")
.delete(null)
.addHeader("Authorization", "Bearer 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f")
.build();
Response response = client.newCall(request).execute();
const options = {
method: 'DELETE',
headers: {
Authorization: 'Bearer 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f'
}
};
fetch('https://cliq.zoho.com/api/v3/functions/987000000654321', options)
.then(response => response.json())
.then(response => console.log(response))
.catch(err => console.error(err));
import http.client
conn = http.client.HTTPSConnection("cliq.zoho.com")
headers = { 'Authorization': "Bearer 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f" }
conn.request("DELETE", "/api/v3/functions/987000000654321", headers=headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
const http = require("https");
const options = {
"method": "DELETE",
"hostname": "cliq.zoho.com",
"port": null,
"path": "/api/v3/functions/987000000654321",
"headers": {
"Authorization": "Bearer 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f"
}
};
const req = http.request(options, function (res) {
const chunks = [];
res.on("data", function (chunk) {
chunks.push(chunk);
});
res.on("end", function () {
const body = Buffer.concat(chunks);
console.log(body.toString());
});
});
req.end();
var client = new RestClient("https://cliq.zoho.com/api/v3/functions/987000000654321");
var request = new RestRequest(Method.DELETE);
request.AddHeader("Authorization", "Bearer 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f");
IRestResponse response = client.Execute(request);
var client = new HttpClient();
var request = new HttpRequestMessage
{
Method = HttpMethod.Delete,
RequestUri = new Uri("https://cliq.zoho.com/api/v3/functions/987000000654321"),
Headers =
{
{ "Authorization", "Bearer 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f" },
},
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
package main
import (
"fmt"
"net/http"
"io/ioutil"
)
func main() {
url := "https://cliq.zoho.com/api/v3/functions/987000000654321"
req, _ := http.NewRequest("DELETE", url, nil)
req.Header.Add("Authorization", "Bearer 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := ioutil.ReadAll(res.Body)
fmt.Println(res)
fmt.Println(string(body))
}
const data = null;
const xhr = new XMLHttpRequest();
xhr.withCredentials = true;
xhr.addEventListener("readystatechange", function () {
if (this.readyState === this.DONE) {
console.log(this.responseText);
}
});
xhr.open("DELETE", "https://cliq.zoho.com/api/v3/functions/987000000654321");
xhr.setRequestHeader("Authorization", "Bearer 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f");
xhr.send(data);
curl --request DELETE \
--url https://cliq.zoho.com/api/v3/functions/987000000654321 \
--header 'Authorization: Bearer 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f'
{
"message": "The request cannot be performed. Usually because of malformed parameter or missing parameter."
}
{
"message": "Request was rejected because of invalid AuthToken."
}
{
"message": "The user does not have enough permission or possibly not an user of the respective organization to access the resource."
}
{
"message": "The URL you've sent is wrong. It's possible that the resource you've requested has been moved to another URL."
}
{
"message": "The requested resource does not support the HTTP method used. For example, requesting List of all customers API with PUT as the HTTP method."
}
{
"message": "The response has been received but the requested response type is not supported by the browser."
}
{
"message": "Too many requests within a certain time frame."
}
{
"message": "Cliq server encountered an error which prevents it from fulfilling the request."
}
Create a handler for a specific function
AI Tools
Open in ChatGPT
Open in ChatGPT to ask questions about this page
Open in Claude
Open in Claude to ask questions about this page
Copy as Markdown
Copy this page as markdown to use with AI assistants
View as Markdown
Open this page as markdown in a new tab
Open in ChatGPT
Open in ChatGPT to ask questions about this page
Open in Claude
Open in Claude to ask questions about this page
Copy as Markdown
Copy this page as markdown to use with AI assistants
View as Markdown
Open this page as markdown in a new tab
Create a handler for a function. Handlers define the logic that executes when a user triggers the UI element (button click, form submit, widget interaction, etc.).
The field you provide depends on the function's execution type:
- Deluge function: Provide the
scriptfield with the Deluge source code to execute when the handler fires. - Webhook function: Provide the
permissionsfield - an array of data attributes your server needs to receive in the webhook payload. Do not passscriptfor Webhook functions.
Permissions availability by handler type
| Handler | chat |
message |
user |
|---|---|---|---|
button_handler |
✓ | ✓ | ✓ |
form_submit_handler |
✓ | ✓ | ✓ |
form_change_handler |
✓ | - | ✓ |
form_dynamic_select_handler |
✓ | - | ✓ |
form_view_handler |
- | - | ✓ |
widget_button_handler |
- | - | ✓ |
Note: attachments and location are not available for any function handler type. Only chat, message, and user are applicable.
Threshold limit: 10 requests per min per user
Maximum API calls allowed within one minute.
Lock period: 5 minutes
Cooldown period applied after threshold exhaustion.
Possible Error Codes
| Error Code | Description |
|---|---|
execution_handler_create_failed |
Failed to create the handler. |
execution_handler_data_required |
Required field missing (e.g., name for menu_handler). |
execution_handler_data_invalid |
Handler data is invalid. |
invalid_inputs |
Invalid handler type or bad request body. |
Error Response Format
When an error occurs, the API returns a JSON response in this format:
{"message": "A human-readable description of the error.", "code": "error_code"}
where code is the error identifier (as listed in the table above) and message is a human-readable explanation of what went wrong.
OAuth Scope : ZohoCliq.Functions.UPDATE
Arguments
Allowed values:
- button_handler - Triggered by button clicks in messages.
- form_submit_handler - Triggered by form submissions.
- form_change_handler - Triggered by changes in form fields.
- form_dynamic_select_handler - Triggered to populate dynamic field options in forms.
- form_view_handler - Renders the form UI when a user navigates to the form's permalink URL.
- widget_button_handler - Triggered by button clicks inside widgets.
Available values:
chat, message, user.
Path Parameters
parameters_data='{"field1":"value1","field2":"value2"}';
headers_data = Map();
headers_data.put("Authorization", "Bearer 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f");
response = invokeUrl
[
url: "https://cliq.zoho.com/api/v3/functions/987000000654321/handlers"
type: POST
headers: headers_data
content-type: application/json
parameters: parameters_data
connection: <connection_name>
];
info response;
OkHttpClient client = new OkHttpClient();
MediaType mediaType = MediaType.parse("application/json");
RequestBody body = RequestBody.create(mediaType, "{\"field1\":\"value1\",\"field2\":\"value2\"}");
Request request = new Request.Builder()
.url("https://cliq.zoho.com/api/v3/functions/987000000654321/handlers")
.post(body)
.addHeader("Authorization", "Bearer 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f")
.addHeader("content-type", "application/json")
.build();
Response response = client.newCall(request).execute();
const options = {
method: 'POST',
headers: {
Authorization: 'Bearer 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f',
'content-type': 'application/json'
},
body: '{"field1":"value1","field2":"value2"}'
};
fetch('https://cliq.zoho.com/api/v3/functions/987000000654321/handlers', options)
.then(response => response.json())
.then(response => console.log(response))
.catch(err => console.error(err));
import http.client
conn = http.client.HTTPSConnection("cliq.zoho.com")
payload = "{\"field1\":\"value1\",\"field2\":\"value2\"}"
headers = {
'Authorization': "Bearer 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f",
'content-type': "application/json"
}
conn.request("POST", "/api/v3/functions/987000000654321/handlers", payload, headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
const http = require("https");
const options = {
"method": "POST",
"hostname": "cliq.zoho.com",
"port": null,
"path": "/api/v3/functions/987000000654321/handlers",
"headers": {
"Authorization": "Bearer 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f",
"content-type": "application/json"
}
};
const req = http.request(options, function (res) {
const chunks = [];
res.on("data", function (chunk) {
chunks.push(chunk);
});
res.on("end", function () {
const body = Buffer.concat(chunks);
console.log(body.toString());
});
});
req.write(JSON.stringify({field1: 'value1', field2: 'value2'}));
req.end();
var client = new RestClient("https://cliq.zoho.com/api/v3/functions/987000000654321/handlers");
var request = new RestRequest(Method.POST);
request.AddHeader("Authorization", "Bearer 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f");
request.AddHeader("content-type", "application/json");
request.AddParameter("application/json", "{\"field1\":\"value1\",\"field2\":\"value2\"}", ParameterType.RequestBody);
IRestResponse response = client.Execute(request);
var client = new HttpClient();
var request = new HttpRequestMessage
{
Method = HttpMethod.Post,
RequestUri = new Uri("https://cliq.zoho.com/api/v3/functions/987000000654321/handlers"),
Headers =
{
{ "Authorization", "Bearer 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f" },
},
Content = new StringContent("{\"field1\":\"value1\",\"field2\":\"value2\"}")
{
Headers =
{
ContentType = new MediaTypeHeaderValue("application/json")
}
}
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
package main
import (
"fmt"
"strings"
"net/http"
"io/ioutil"
)
func main() {
url := "https://cliq.zoho.com/api/v3/functions/987000000654321/handlers"
payload := strings.NewReader("{\"field1\":\"value1\",\"field2\":\"value2\"}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f")
req.Header.Add("content-type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := ioutil.ReadAll(res.Body)
fmt.Println(res)
fmt.Println(string(body))
}
const data = JSON.stringify({
"field1": "value1",
"field2": "value2"
});
const xhr = new XMLHttpRequest();
xhr.withCredentials = true;
xhr.addEventListener("readystatechange", function () {
if (this.readyState === this.DONE) {
console.log(this.responseText);
}
});
xhr.open("POST", "https://cliq.zoho.com/api/v3/functions/987000000654321/handlers");
xhr.setRequestHeader("Authorization", "Bearer 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f");
xhr.setRequestHeader("content-type", "application/json");
xhr.send(data);
curl --request POST \
--url https://cliq.zoho.com/api/v3/functions/987000000654321/handlers \
--header 'Authorization: Bearer 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f' \
--header 'content-type: application/json' \
--data '{"field1":"value1","field2":"value2"}'
{
"type": "form_submit_handler",
"script": "values = form.values;\ninfo values;\nreturn {\"type\": \"banner\", \"text\": \"Form submitted!\", \"status\": \"success\"};"
}
{
"type": "form_submit_handler",
"permissions": [
"chat",
"user"
]
}
{
"type": "form_view_handler",
"script": "form = Map();\nform.put(\"title\", \"Feedback Form\");\nactions = Map();\nsubmit = Map();\nsubmit.put(\"type\", \"invoke.function\");\nactions.put(\"submit\", submit);\nform.put(\"actions\", actions);\nreturn form;"
}
{
"url": "/api/v3/functions",
"type": "function",
"data": {
"name": "SubmitFeedback",
"id": "53719000002124012",
"function_type": "form",
"handlers": [
{
"type": "form_submit_handler"
}
],
"creator": {
"name": "James",
"id": "65113112"
},
"execution_type": "deluge",
"status": "enabled",
"type": "custom",
"description": "Processes feedback form submissions from users",
"scope": "personal"
}
}
{
"message": "The request cannot be performed. Usually because of malformed parameter or missing parameter."
}
{
"message": "Request was rejected because of invalid AuthToken."
}
{
"message": "The user does not have enough permission or possibly not an user of the respective organization to access the resource."
}
{
"message": "The URL you've sent is wrong. It's possible that the resource you've requested has been moved to another URL."
}
{
"message": "The requested resource does not support the HTTP method used. For example, requesting List of all customers API with PUT as the HTTP method."
}
{
"message": "The response has been received but the requested response type is not supported by the browser."
}
{
"message": "Too many requests within a certain time frame."
}
{
"message": "Cliq server encountered an error which prevents it from fulfilling the request."
}
Update a handler for a specific function
AI Tools
Open in ChatGPT
Open in ChatGPT to ask questions about this page
Open in Claude
Open in Claude to ask questions about this page
Copy as Markdown
Copy this page as markdown to use with AI assistants
View as Markdown
Open this page as markdown in a new tab
Open in ChatGPT
Open in ChatGPT to ask questions about this page
Open in Claude
Open in Claude to ask questions about this page
Copy as Markdown
Copy this page as markdown to use with AI assistants
View as Markdown
Open this page as markdown in a new tab
Update a handler for a specific function. What you provide depends on the function's execution type:
- Deluge function: Update the
scriptattribute with the revised Deluge source code to execute when the handler fires. - Webhook function: Update the
permissionsarray to change which data attributes (chat,message,user) are forwarded to your server. Note:attachmentsandlocationare not available for function handlers.
Threshold limit: 10 requests per min per user
Maximum API calls allowed within one minute.
Lock period: 5 minutes
Cooldown period applied after threshold exhaustion.
Possible Error Codes
| Error Code | Description |
|---|---|
execution_handler_update_failed |
Failed to update the handler. |
execution_handler_not_found |
Handler not found for this component. |
Error Response Format
When an error occurs, the API returns a JSON response in this format:
{"message": "A human-readable description of the error.", "code": "error_code"}
where code is the error identifier (as listed in the table above) and message is a human-readable explanation of what went wrong.
OAuth Scope : ZohoCliq.Functions.UPDATE
Arguments
Available values:
chat, message, user.
Path Parameters
button_handler- for button functionsform_submit_handler- for form functions, triggered on form submissionform_change_handler- for form functions, triggered on form field value changeform_view_handler- for form functions, triggered when the form is renderedform_dynamic_select_handler- for form functions, triggered when a dynamic select field is loadedwidget_button_handler- for widget functions, triggered on widget button click
parameters_data='{"script":"string","permissions":["chat"]}';
headers_data = Map();
headers_data.put("Authorization", "Bearer 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f");
response = invokeUrl
[
url: "https://cliq.zoho.com/api/v3/functions/%7BFUNCTION_ID%7D/handlers/%7BFUNCTION_HANDLER_TYPE%7D"
type: PATCH
headers: headers_data
content-type: application/json
parameters: parameters_data
connection: <connection_name>
];
info response;
OkHttpClient client = new OkHttpClient();
MediaType mediaType = MediaType.parse("application/json");
RequestBody body = RequestBody.create(mediaType, "{\"script\":\"string\",\"permissions\":[\"chat\"]}");
Request request = new Request.Builder()
.url("https://cliq.zoho.com/api/v3/functions/%7BFUNCTION_ID%7D/handlers/%7BFUNCTION_HANDLER_TYPE%7D")
.patch(body)
.addHeader("Authorization", "Bearer 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f")
.addHeader("content-type", "application/json")
.build();
Response response = client.newCall(request).execute();
const options = {
method: 'PATCH',
headers: {
Authorization: 'Bearer 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f',
'content-type': 'application/json'
},
body: '{"script":"string","permissions":["chat"]}'
};
fetch('https://cliq.zoho.com/api/v3/functions/%7BFUNCTION_ID%7D/handlers/%7BFUNCTION_HANDLER_TYPE%7D', options)
.then(response => response.json())
.then(response => console.log(response))
.catch(err => console.error(err));
import http.client
conn = http.client.HTTPSConnection("cliq.zoho.com")
payload = "{\"script\":\"string\",\"permissions\":[\"chat\"]}"
headers = {
'Authorization': "Bearer 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f",
'content-type': "application/json"
}
conn.request("PATCH", "/api/v3/functions/%7BFUNCTION_ID%7D/handlers/%7BFUNCTION_HANDLER_TYPE%7D", payload, headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
const http = require("https");
const options = {
"method": "PATCH",
"hostname": "cliq.zoho.com",
"port": null,
"path": "/api/v3/functions/%7BFUNCTION_ID%7D/handlers/%7BFUNCTION_HANDLER_TYPE%7D",
"headers": {
"Authorization": "Bearer 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f",
"content-type": "application/json"
}
};
const req = http.request(options, function (res) {
const chunks = [];
res.on("data", function (chunk) {
chunks.push(chunk);
});
res.on("end", function () {
const body = Buffer.concat(chunks);
console.log(body.toString());
});
});
req.write(JSON.stringify({script: 'string', permissions: ['chat']}));
req.end();
var client = new RestClient("https://cliq.zoho.com/api/v3/functions/%7BFUNCTION_ID%7D/handlers/%7BFUNCTION_HANDLER_TYPE%7D");
var request = new RestRequest(Method.PATCH);
request.AddHeader("Authorization", "Bearer 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f");
request.AddHeader("content-type", "application/json");
request.AddParameter("application/json", "{\"script\":\"string\",\"permissions\":[\"chat\"]}", ParameterType.RequestBody);
IRestResponse response = client.Execute(request);
var client = new HttpClient();
var request = new HttpRequestMessage
{
Method = HttpMethod.Patch,
RequestUri = new Uri("https://cliq.zoho.com/api/v3/functions/%7BFUNCTION_ID%7D/handlers/%7BFUNCTION_HANDLER_TYPE%7D"),
Headers =
{
{ "Authorization", "Bearer 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f" },
},
Content = new StringContent("{\"script\":\"string\",\"permissions\":[\"chat\"]}")
{
Headers =
{
ContentType = new MediaTypeHeaderValue("application/json")
}
}
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
package main
import (
"fmt"
"strings"
"net/http"
"io/ioutil"
)
func main() {
url := "https://cliq.zoho.com/api/v3/functions/%7BFUNCTION_ID%7D/handlers/%7BFUNCTION_HANDLER_TYPE%7D"
payload := strings.NewReader("{\"script\":\"string\",\"permissions\":[\"chat\"]}")
req, _ := http.NewRequest("PATCH", url, payload)
req.Header.Add("Authorization", "Bearer 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f")
req.Header.Add("content-type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := ioutil.ReadAll(res.Body)
fmt.Println(res)
fmt.Println(string(body))
}
const data = JSON.stringify({
"script": "string",
"permissions": [
"chat"
]
});
const xhr = new XMLHttpRequest();
xhr.withCredentials = true;
xhr.addEventListener("readystatechange", function () {
if (this.readyState === this.DONE) {
console.log(this.responseText);
}
});
xhr.open("PATCH", "https://cliq.zoho.com/api/v3/functions/%7BFUNCTION_ID%7D/handlers/%7BFUNCTION_HANDLER_TYPE%7D");
xhr.setRequestHeader("Authorization", "Bearer 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f");
xhr.setRequestHeader("content-type", "application/json");
xhr.send(data);
curl --request PATCH \
--url https://cliq.zoho.com/api/v3/functions/%7BFUNCTION_ID%7D/handlers/%7BFUNCTION_HANDLER_TYPE%7D \
--header 'Authorization: Bearer 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f' \
--header 'content-type: application/json' \
--data '{"script":"string","permissions":["chat"]}'
{
"script": "values = form.get(\"values\");\ntask_name = values.get(\"task_name\");\nresponse = Map();\nresponse.put(\"type\", \"banner\");\nresponse.put(\"text\", \"Task '\" + task_name + \"' created.\");\nresponse.put(\"status\", \"success\");\nreturn response;"
}
{
"script": "changed_field = form.get(\"changed_field\");\nform_response = Map();\nif(changed_field == \"priority\") {\n priority_val = form.get(\"values\").get(\"priority\");\n options = List();\n if(priority_val == \"high\") {\n options.add(\"Escalate\");\n options.add(\"Notify Manager\");\n } else {\n options.add(\"Standard Process\");\n }\n form_response.put(\"action_field\", Map());\n}\nreturn form_response;"
}
{
"script": "form = Map();\nform.put(\"title\", \"Create Task\");\nfields = List();\ntask_field = Map();\ntask_field.put(\"name\", \"task_name\");\ntask_field.put(\"label\", \"Task Name\");\ntask_field.put(\"type\", \"text\");\ntask_field.put(\"mandatory\", true);\nfields.add(task_field);\ndue_field = Map();\ndue_field.put(\"name\", \"due_date\");\ndue_field.put(\"label\", \"Due Date\");\ndue_field.put(\"type\", \"date\");\nfields.add(due_field);\nform.put(\"fields\", fields);\nactions = Map();\nsubmit = Map();\nsubmit.put(\"type\", \"invoke.function\");\nactions.put(\"submit\", submit);\nform.put(\"actions\", actions);\nreturn form;"
}
{
"url": "/api/v3/functions/53719000002124011/handlers/button_handler",
"type": "execution_handler",
"data": {
"name": "button_handler",
"script": "response = Map();\nresponse.put(\"text\", \"Task approved successfully!\");\nreturn response;",
"function_id": "53719000002124011"
}
}
{
"url": "/api/v3/functions/53719000002124012/handlers/form_submit_handler",
"type": "execution_handler",
"data": {
"name": "form_submit_handler",
"script": "values = form.get(\"values\");\ntask_name = values.get(\"task_name\");\ndue_date = values.get(\"due_date\");\nresponse = Map();\nresponse.put(\"type\", \"banner\");\nresponse.put(\"text\", \"Task '\" + task_name + \"' created with due date: \" + due_date);\nresponse.put(\"status\", \"success\");\nreturn response;",
"function_id": "53719000002124012"
}
}
{
"url": "/api/v3/functions/53719000002124012/handlers/form_change_handler",
"type": "execution_handler",
"data": {
"name": "form_change_handler",
"script": "changed_field = form.get(\"changed_field\");\nform_response = Map();\nif(changed_field == \"priority\") {\n priority_val = form.get(\"values\").get(\"priority\");\n options = List();\n if(priority_val == \"high\") {\n options.add(\"Escalate\");\n options.add(\"Notify Manager\");\n } else {\n options.add(\"Standard Process\");\n }\n form_response.put(\"action_field\", Map());\n}\nreturn form_response;",
"function_id": "53719000002124012"
}
}
{
"url": "/api/v3/functions/53719000002124012/handlers/form_view_handler",
"type": "execution_handler",
"data": {
"name": "form_view_handler",
"script": "form = Map();\nform.put(\"title\", \"Create Task\");\nfields = List();\ntask_field = Map();\ntask_field.put(\"name\", \"task_name\");\ntask_field.put(\"label\", \"Task Name\");\ntask_field.put(\"type\", \"text\");\ntask_field.put(\"mandatory\", true);\nfields.add(task_field);\ndue_field = Map();\ndue_field.put(\"name\", \"due_date\");\ndue_field.put(\"label\", \"Due Date\");\ndue_field.put(\"type\", \"date\");\nfields.add(due_field);\nform.put(\"fields\", fields);\nactions = Map();\nsubmit = Map();\nsubmit.put(\"type\", \"invoke.function\");\nactions.put(\"submit\", submit);\nform.put(\"actions\", actions);\nreturn form;",
"function_id": "53719000002124012"
}
}
{
"message": "The request cannot be performed. Usually because of malformed parameter or missing parameter."
}
{
"message": "Request was rejected because of invalid AuthToken."
}
{
"message": "The user does not have enough permission or possibly not an user of the respective organization to access the resource."
}
{
"message": "The URL you've sent is wrong. It's possible that the resource you've requested has been moved to another URL."
}
{
"message": "The requested resource does not support the HTTP method used. For example, requesting List of all customers API with PUT as the HTTP method."
}
{
"message": "The response has been received but the requested response type is not supported by the browser."
}
{
"message": "Too many requests within a certain time frame."
}
{
"message": "Cliq server encountered an error which prevents it from fulfilling the request."
}
Get details of a specific function handler
AI Tools
Open in ChatGPT
Open in ChatGPT to ask questions about this page
Open in Claude
Open in Claude to ask questions about this page
Copy as Markdown
Copy this page as markdown to use with AI assistants
View as Markdown
Open this page as markdown in a new tab
Open in ChatGPT
Open in ChatGPT to ask questions about this page
Open in Claude
Open in Claude to ask questions about this page
Copy as Markdown
Copy this page as markdown to use with AI assistants
View as Markdown
Open this page as markdown in a new tab
Retrieve the configuration and deluge source code of a function handler.
Threshold limit: 10 requests per min per user
Maximum API calls allowed within one minute.
Lock period: 5 minutes
Cooldown period applied after threshold exhaustion.
Possible Error Codes
| Error Code | Description |
|---|---|
execution_handler_get_failed |
Failed to fetch the execution handler. |
execution_handler_not_found |
Specified handler was not found for this function. |
Error Response Format
When an error occurs, the API returns a JSON response in this format:
{"message": "A human-readable description of the error.", "code": "error_code"}
where code is the error identifier (as listed in the table above) and message is a human-readable explanation of what went wrong.
OAuth Scope : ZohoCliq.Functions.READ
Path Parameters
Allowed values:
button_handler: Handler for button click events.form_submit_handler: Handler for form submission events.form_view_handler: Handler for rendering form views.form_change_handler: Handler for form field change events.form_dynamic_select_handler: Handler for dynamic select field load events.widget_button_handler: Handler for widget button click events.
headers_data = Map();
headers_data.put("Authorization", "Bearer 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f");
response = invokeUrl
[
url: "https://cliq.zoho.com/api/v3/functions/987000000654321/handlers/987000000654321"
type: GET
headers: headers_data
connection: <connection_name>
];
info response;
OkHttpClient client = new OkHttpClient();
Request request = new Request.Builder()
.url("https://cliq.zoho.com/api/v3/functions/987000000654321/handlers/987000000654321")
.get()
.addHeader("Authorization", "Bearer 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f")
.build();
Response response = client.newCall(request).execute();
const options = {
method: 'GET',
headers: {
Authorization: 'Bearer 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f'
}
};
fetch('https://cliq.zoho.com/api/v3/functions/987000000654321/handlers/987000000654321', options)
.then(response => response.json())
.then(response => console.log(response))
.catch(err => console.error(err));
import http.client
conn = http.client.HTTPSConnection("cliq.zoho.com")
headers = { 'Authorization': "Bearer 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f" }
conn.request("GET", "/api/v3/functions/987000000654321/handlers/987000000654321", headers=headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
const http = require("https");
const options = {
"method": "GET",
"hostname": "cliq.zoho.com",
"port": null,
"path": "/api/v3/functions/987000000654321/handlers/987000000654321",
"headers": {
"Authorization": "Bearer 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f"
}
};
const req = http.request(options, function (res) {
const chunks = [];
res.on("data", function (chunk) {
chunks.push(chunk);
});
res.on("end", function () {
const body = Buffer.concat(chunks);
console.log(body.toString());
});
});
req.end();
var client = new RestClient("https://cliq.zoho.com/api/v3/functions/987000000654321/handlers/987000000654321");
var request = new RestRequest(Method.GET);
request.AddHeader("Authorization", "Bearer 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f");
IRestResponse response = client.Execute(request);
var client = new HttpClient();
var request = new HttpRequestMessage
{
Method = HttpMethod.Get,
RequestUri = new Uri("https://cliq.zoho.com/api/v3/functions/987000000654321/handlers/987000000654321"),
Headers =
{
{ "Authorization", "Bearer 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f" },
},
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
package main
import (
"fmt"
"net/http"
"io/ioutil"
)
func main() {
url := "https://cliq.zoho.com/api/v3/functions/987000000654321/handlers/987000000654321"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "Bearer 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := ioutil.ReadAll(res.Body)
fmt.Println(res)
fmt.Println(string(body))
}
const data = null;
const xhr = new XMLHttpRequest();
xhr.withCredentials = true;
xhr.addEventListener("readystatechange", function () {
if (this.readyState === this.DONE) {
console.log(this.responseText);
}
});
xhr.open("GET", "https://cliq.zoho.com/api/v3/functions/987000000654321/handlers/987000000654321");
xhr.setRequestHeader("Authorization", "Bearer 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f");
xhr.send(data);
curl --request GET \
--url https://cliq.zoho.com/api/v3/functions/987000000654321/handlers/987000000654321 \
--header 'Authorization: Bearer 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f'
{
"url": "/api/v3/functions/53719000002124011/handlers/button_handler",
"type": "button_handler",
"data": {
"script": "// Triggered when a user clicks the \"Approve Task\" instant button\n// [Approve Task](invoke.function|ApproveTask)\nresponse = Map();\ntask_name = arguments.get(\"task_name\");\nassignee = arguments.get(\"assignee\");\nresponse.put(\"text\", \"✅ Task '\" + task_name + \"' has been approved and assigned to \" + assignee + \". They'll be notified shortly.\");\nreturn response;",
"return_type": "MAP",
"params": [
{
"param_name": "access",
"param_type": "MAP"
},
{
"param_name": "environment",
"param_type": "MAP"
},
{
"param_name": "chat",
"param_type": "MAP"
},
{
"param_name": "user",
"param_type": "MAP"
},
{
"param_name": "message",
"param_type": "MAP"
},
{
"param_name": "target",
"param_type": "MAP"
},
{
"param_name": "arguments",
"param_type": "MAP"
},
{
"param_name": "event",
"param_type": "STRING"
},
{
"param_name": "location",
"param_type": "MAP"
}
]
}
}
{
"message": "The request cannot be performed. Usually because of malformed parameter or missing parameter."
}
{
"message": "Request was rejected because of invalid AuthToken."
}
{
"message": "The user does not have enough permission or possibly not an user of the respective organization to access the resource."
}
{
"message": "The URL you've sent is wrong. It's possible that the resource you've requested has been moved to another URL."
}
{
"message": "The requested resource does not support the HTTP method used. For example, requesting List of all customers API with PUT as the HTTP method."
}
{
"message": "The response has been received but the requested response type is not supported by the browser."
}
{
"message": "Too many requests within a certain time frame."
}
{
"message": "Cliq server encountered an error which prevents it from fulfilling the request."
}
Delete a handler from a specific function
AI Tools
Open in ChatGPT
Open in ChatGPT to ask questions about this page
Open in Claude
Open in Claude to ask questions about this page
Copy as Markdown
Copy this page as markdown to use with AI assistants
View as Markdown
Open this page as markdown in a new tab
Open in ChatGPT
Open in ChatGPT to ask questions about this page
Open in Claude
Open in Claude to ask questions about this page
Copy as Markdown
Copy this page as markdown to use with AI assistants
View as Markdown
Open this page as markdown in a new tab
Permanently remove a named execution handler from a Function. Once deleted, the handler's Deluge code is lost and the function will no longer be executable until a new handler is added.
Threshold limit: 10 requests per min per user
Maximum API calls allowed within one minute.
Lock period: 5 minutes
Cooldown period applied after threshold exhaustion.
Possible Error Codes
| Error Code | Description |
|---|---|
execution_handler_delete_failed |
Failed to delete the execution handler. |
default_handler_delete_not_allowed |
Default handlers cannot be deleted. |
execution_handler_not_found |
Specified handler was not found for this function. |
Error Response Format
When an error occurs, the API returns a JSON response in this format:
{"message": "A human-readable description of the error.", "code": "error_code"}
where code is the error identifier (as listed in the table above) and message is a human-readable explanation of what went wrong.
OAuth Scope : ZohoCliq.Functions.UPDATE
Path Parameters
Allowed values:
button_handler: Handler for button click events.form_submit_handler: Handler for form submission events.form_view_handler: Handler for rendering form views.form_change_handler: Handler for form field change events.form_dynamic_select_handler: Handler for dynamic select field load events.widget_button_handler: Handler for widget button click events.
headers_data = Map();
headers_data.put("Authorization", "Bearer 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f");
response = invokeUrl
[
url: "https://cliq.zoho.com/api/v3/functions/987000000654321/handlers/button_handler"
type: DELETE
headers: headers_data
connection: <connection_name>
];
info response;
OkHttpClient client = new OkHttpClient();
Request request = new Request.Builder()
.url("https://cliq.zoho.com/api/v3/functions/987000000654321/handlers/button_handler")
.delete(null)
.addHeader("Authorization", "Bearer 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f")
.build();
Response response = client.newCall(request).execute();
const options = {
method: 'DELETE',
headers: {
Authorization: 'Bearer 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f'
}
};
fetch('https://cliq.zoho.com/api/v3/functions/987000000654321/handlers/button_handler', options)
.then(response => response.json())
.then(response => console.log(response))
.catch(err => console.error(err));
import http.client
conn = http.client.HTTPSConnection("cliq.zoho.com")
headers = { 'Authorization': "Bearer 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f" }
conn.request("DELETE", "/api/v3/functions/987000000654321/handlers/button_handler", headers=headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
const http = require("https");
const options = {
"method": "DELETE",
"hostname": "cliq.zoho.com",
"port": null,
"path": "/api/v3/functions/987000000654321/handlers/button_handler",
"headers": {
"Authorization": "Bearer 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f"
}
};
const req = http.request(options, function (res) {
const chunks = [];
res.on("data", function (chunk) {
chunks.push(chunk);
});
res.on("end", function () {
const body = Buffer.concat(chunks);
console.log(body.toString());
});
});
req.end();
var client = new RestClient("https://cliq.zoho.com/api/v3/functions/987000000654321/handlers/button_handler");
var request = new RestRequest(Method.DELETE);
request.AddHeader("Authorization", "Bearer 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f");
IRestResponse response = client.Execute(request);
var client = new HttpClient();
var request = new HttpRequestMessage
{
Method = HttpMethod.Delete,
RequestUri = new Uri("https://cliq.zoho.com/api/v3/functions/987000000654321/handlers/button_handler"),
Headers =
{
{ "Authorization", "Bearer 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f" },
},
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
package main
import (
"fmt"
"net/http"
"io/ioutil"
)
func main() {
url := "https://cliq.zoho.com/api/v3/functions/987000000654321/handlers/button_handler"
req, _ := http.NewRequest("DELETE", url, nil)
req.Header.Add("Authorization", "Bearer 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := ioutil.ReadAll(res.Body)
fmt.Println(res)
fmt.Println(string(body))
}
const data = null;
const xhr = new XMLHttpRequest();
xhr.withCredentials = true;
xhr.addEventListener("readystatechange", function () {
if (this.readyState === this.DONE) {
console.log(this.responseText);
}
});
xhr.open("DELETE", "https://cliq.zoho.com/api/v3/functions/987000000654321/handlers/button_handler");
xhr.setRequestHeader("Authorization", "Bearer 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f");
xhr.send(data);
curl --request DELETE \
--url https://cliq.zoho.com/api/v3/functions/987000000654321/handlers/button_handler \
--header 'Authorization: Bearer 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f'
{
"Response Code": "204 No response"
}
{
"message": "The request cannot be performed. Usually because of malformed parameter or missing parameter."
}
{
"message": "Request was rejected because of invalid AuthToken."
}
{
"message": "The user does not have enough permission or possibly not an user of the respective organization to access the resource."
}
{
"message": "The URL you've sent is wrong. It's possible that the resource you've requested has been moved to another URL."
}
{
"message": "The requested resource does not support the HTTP method used. For example, requesting List of all customers API with PUT as the HTTP method."
}
{
"message": "The response has been received but the requested response type is not supported by the browser."
}
{
"message": "Too many requests within a certain time frame."
}
{
"message": "Cliq server encountered an error which prevents it from fulfilling the request."
}