Functions

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

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_type is not specified, it defaults to deluge.
  • Handler logic is defined using the script field 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_type to webhook and provide the execution_url.
  • Handler permissions (chat, message, user) control which data attributes are included in the webhook payload. Note: location and attachments are not available for function handlers.
  • Ideal for functions that need to integrate with external systems or require custom server-side processing.

Download Functions OpenAPI Document
End Points
Create a new function
List all functions
Update an existing function
Get details of a specific function
Delete a specific function
Create a handler for a specific function
Update a handler for a specific function
Get details of a specific function handler
Delete a handler from a specific function

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

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. Supports chat, message, and user permissions.

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

name
string
(Required)
Unique name for the function.
Maximum length: 30 characters.
description
string
(Required)
Description for the function.
Maximum length: 300 characters.
function_type
string
(Required)
Type of the function which determines where it can be invoked from.
Allowed values:
  • button - Triggered by button clicks in messages.
  • form - Triggered by form submissions and interactions.
  • widget_button - Triggered by button clicks inside widgets.
Note: function_type cannot be changed after creation.
execution_type
string
Execution type of the function.
  • deluge (default) - Handler logic is written in Deluge and executed on Zoho's platform.
  • webhook - Cliq sends a POST request to your execution_url when the function is triggered. Provide execution_url when using this type.
execution_url
string
The URL that Cliq sends a POST request to when the function is triggered. Required when execution_type is webhook.
Maximum length: 225 characters.

Request Example

Click to copy
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"}'

Body Parameters

Click to copy
{ "name": "ApproveRequest", "description": "Handles approval button clicks in messages", "function_type": "button", "execution_type": "deluge" }
{ "name": "ApproveExpense", "description": "Forwards approval clicks to external HR system", "function_type": "button", "execution_type": "webhook", "execution_url": "https://api.yourcompany.com/cliq/functions/handler" }
{ "name": "SubmitFeedback", "description": "Processes feedback form submissions from users", "function_type": "form" }
{ "name": "RefreshWidget", "description": "Handles button clicks inside widgets", "function_type": "widget_button" }

Response Example

{ "url": "/api/v3/functions", "type": "function", "data": { "name": "ApproveRequest", "id": "53719000002124011", "function_type": "button", "handlers": [ { "type": "button_handler" } ], "creator": { "name": "James", "id": "65113112" }, "execution_type": "deluge", "status": "enabled", "type": "custom", "description": "Handles approval button clicks in messages", "scope": "personal" } }
{ "url": "/api/v3/functions", "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/handler", "status": "enabled", "type": "custom", "description": "Forwards approval clicks to external HR system", "scope": "personal" } }
{ "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

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

next_token
string
Token for fetching the next page of results. Omit this parameter to retrieve the first page.
sync_token
string
Token for incremental synchronization. Provide the sync_token value from a previous response to retrieve only functions that were created or updated since that response was generated.
limit
integer
Maximum number of functions to return per page.
Default: 20
Maximum: 50

Request Example

Click to copy
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'

Response Example

{ "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

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

name
string
Updated function name.
Maximum length: 30 characters.
description
string
Updated function description.
Maximum length: 300 characters.
execution_url
string
Updated webhook execution URL for the function. Only applicable when the function's execution_type is webhook.
Maximum length: 225 characters.

Path Parameters

FUNCTION_ID
string
(Required)
Unique numeric identifier of the function. To learn how to retrieve this ID, see FUNCTION_ID in the Glossary page.

Request Example

Click to copy
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"}'

Body Parameters

Click to copy
{ "name": "createTaskUpdated", "description": "Updated function description" }
{ "execution_url": "https://api.yourcompany.com/cliq/functions/updated-handler" }

Response Example

{ "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

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

FUNCTION_ID
string
(Required)
Unique numeric identifier of the function. To learn how to retrieve this ID, see FUNCTION_ID in the Glossary page.

Request Example

Click to copy
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'

Response Example

{ "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

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

FUNCTION_ID
string
(Required)
Unique numeric identifier of the function. To learn how to retrieve this ID, see FUNCTION_ID in the Glossary page.

Request Example

Click to copy
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'

Response Example

{ "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

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 script field with the Deluge source code to execute when the handler fires.
  • Webhook function: Provide the permissions field - an array of data attributes your server needs to receive in the webhook payload. Do not pass script for 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

type
string
(Required)
Type of the function handler which determines the trigger for execution.
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.
script
string
Deluge script source code for the handler. Maximum size is 250KB. Only applicable for Deluge functions.
permissions
array
List of data attributes to include in the webhook payload when the handler fires. Only applicable for Webhook functions. Not all permissions are valid for every handler type - refer to the Create a handler table for availability.
Available values: chat, message, user.

Path Parameters

FUNCTION_ID
string
(Required)
Unique numeric identifier of the function. To learn how to retrieve this ID, see FUNCTION_ID in the Glossary page.

Request Example

Click to copy
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"}'

Body Parameters

Click to copy
{ "type": "button_handler", "script": "response = Map();\nresponse.put(\"text\", \"Button clicked!\");\nreturn response;" }
{ "type": "button_handler", "permissions": [ "chat", "message", "user" ] }
{ "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;" }

Response Example

{ "url": "/api/v3/functions", "type": "function", "data": { "name": "ApproveRequest", "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" } }
{ "url": "/api/v3/functions", "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/handler", "status": "enabled", "type": "custom", "description": "Forwards approval clicks to external HR system", "scope": "personal" } }
{ "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

Update a handler for a specific function. What you provide depends on the function's execution type:

  • Deluge function: Update the script attribute with the revised Deluge source code to execute when the handler fires.
  • Webhook function: Update the permissions array to change which data attributes (chat, message, user) are forwarded to your server. Note: attachments and location are 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

script
string
Updated Deluge script source code for the handler. Maximum size is 250KB. Only applicable for Deluge functions.
permissions
array
List of data attributes to include in the webhook payload. Only applicable for Webhook functions. Not all permissions are valid for every handler type - refer to the Create a handler table for availability.
Available values: chat, message, user.

Path Parameters

FUNCTION_HANDLER_TYPE
string
(Required)
Type of the function handler to update. Supported handler types are:
  • button_handler - for button functions
  • form_submit_handler - for form functions, triggered on form submission
  • form_change_handler - for form functions, triggered on form field value change
  • form_view_handler - for form functions, triggered when the form is rendered
  • form_dynamic_select_handler - for form functions, triggered when a dynamic select field is loaded
  • widget_button_handler - for widget functions, triggered on widget button click
FUNCTION_ID
string
(Required)
Unique numeric identifier of the function. To learn how to retrieve this ID, see FUNCTION_ID in the Glossary page.

Request Example

Click to copy
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"]}'

Body Parameters

Click to copy
{ "script": "response = Map();\nresponse.put(\"text\", \"Task approved successfully!\");\nreturn response;" }
{ "permissions": [ "chat", "message", "user" ] }
{ "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;" }
{ "permissions": [ "chat", "user" ] }
{ "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;" }
{ "script": "button_name = action.get(\"name\");\nwidget = Map();\nwidget.put(\"type\", \"zhtml\");\nwidget.put(\"body\", \"<p>Button '\" + button_name + \"' clicked. Widget refreshed at \" + zoho.currenttime + \"</p>\");\nreturn widget;" }

Response Example

{ "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/53719000002124014/handlers/button_handler", "type": "execution_handler", "data": { "name": "button_handler", "permissions": [ "chat", "message", "user" ], "function_id": "53719000002124014" } }
{ "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" } }
{ "url": "/api/v3/functions/53719000002124013/handlers/widget_button_handler", "type": "execution_handler", "data": { "name": "widget_button_handler", "script": "button_name = action.get(\"name\");\nwidget = Map();\nwidget.put(\"type\", \"zhtml\");\nwidget.put(\"body\", \"<p>Button '\" + button_name + \"' clicked. Widget refreshed at \" + zoho.currenttime + \"</p>\");\nreturn widget;", "function_id": "53719000002124013" } }
{ "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

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

FUNCTION_HANDLER_TYPE
string
(Required)
Name of the function execution handler. For functions with multiple handlers, this parameter is required to specify which handler's details to retrieve.
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.
FUNCTION_ID
string
(Required)
Unique numeric identifier of the function. To learn how to retrieve this ID, see FUNCTION_ID in the Glossary page.

Request Example

Click to copy
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'

Response Example

{ "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

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

FUNCTION_HANDLER_TYPE
string
(Required)
Name of the function execution handler. For functions with multiple handlers, this parameter is required to specify which handler to delete.
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.
FUNCTION_ID
string
(Required)
Unique numeric identifier of the function. To learn how to retrieve this ID, see FUNCTION_ID in the Glossary page.

Request Example

Click to copy
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 Example

{ "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." }