Bots

Bots 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

Bots are conversational assistants designed to automate repetitive tasks and manage simple user interactions. Their behavior is fully customizable through predefined Bot Handlers, which are activated by specific actions or through Webhooks that communicate with your own external server.

For more information about Bots, please refer to the Bots Help Documentation.

Bot Handlers

  • Bot Handlers are the building blocks of a bot's functionality. Each handler is associated with a specific trigger event, such as receiving a direct message, being @mentioned in a channel, or a user subscribing to the bot.
  • When the trigger event occurs, the corresponding handler executes it's script to perform actions like sending messages, making API calls, or updating data.
  • By configuring different handlers, you can create bots that respond intelligently to various user interactions and automate complex workflows within Zoho Cliq.

Types of Bot Handlers

Handler Description
Menu Handler Adds up to 5 quick-action items to the bot's chat menu. Triggered when a user interacts with the menu.
Message Handler Triggered when the bot receives a message.
Welcome Handler Defines the greeting message sent when a user subscribes to the bot.
Mention Handler Triggered when the bot is @mentioned in a chat or channel.
Incoming Webhook Handler Allows external services to post messages into the bot via outgoing webhooks.
Context Handler Manages multi-turn conversations, maintaining context across a user's interaction with the bot.

What you can do with the Bots API?

With the Bots API, you can retrieve information about a specific bot, list all bots within your organization, manage configurations specific to handlers, trigger bot calls programmatically, manage subscribers, and much more.

Each bot has an execution_type that defines how its handlers run when a trigger event occurs. The Bots API allows developers to create two types of bots:

Deluge Bots (default)
Deluge bot executes handler logic using Zoho's Deluge scripting language, hosted entirely within the Zoho Cliq Developer platform, where no external server is required.

  • If execution_type is not specified during bot creation, it defaults to deluge.
  • Handler logic is defined as a script field (Deluge source code) when creating or updating handlers.
  • Suitable for teams that want to build and manage bot logic entirely within Zoho's ecosystem.

Webhook Bots
A Webhook bot delegates all handler execution to your own external server. When a trigger event fires, Zoho Cliq sends an HTTP POST request to the execution_url you configure, and your server processes the event and returns a response.

  • To create a Webhook bot, set execution_type to webhook during bot creation and provide the execution_url where event payloads should be sent.
  • Your server must be publicly accessible and able to handle incoming POST requests from Zoho Cliq.
  • Ideal for teams seeking complete control over bot logic and possessing the resources to manage an external server. Also suitable for integrations requiring access to external databases, third-party APIs, or custom business logic that cannot be executed in Deluge.

Download Bots OpenAPI Document
End Points
Create a bot
List all bots
Update an existing bot
Retrieve details of a specific bot
Delete a specific bot
Send a bot message
Send an incoming webhook message to a bot
Trigger Bot Calls
Create a handler for a specific bot
Update a handler for a specific bot
Get details of a specific bot handler
Delete a handler from a specific bot
Associate bot to a channel
List all subscribers of a specific bot

Create a bot 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 bot in Cliq by specifying the bot's display name, description, and access level (organization or team). Upon creation, Cliq auto-assigns a unique_name as a permanent identifier for the bot - this cannot be changed even if the display name is updated later.

After creation, add handlers to define the bot's behaviour for each trigger event.
With this API, you can create both Deluge bots (which run handler logic within Zoho's platform) and Webhook bots (which delegate execution to your own server).

Threshold limit: 10 requests per min per user
Number of API calls allowed within a minute.

Lock period: 5 minutes
Wait time before consecutive API requests.


Possible Error Codes

Error Code Description
bot_creation_limit_exceeded Organization has reached the maximum number of bots.
bot_name_already_exists A bot with this name already exists.
invalid_inputs Request body validation failed.
execution_url_required execution_url is required when execution_type is set to webhook.
execution_url_not_allowed execution_url is not allowed when execution_type is set to deluge.
invalid_scope The provided scope value is invalid. Allowed values are organization, team, and personal.

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.Bots.CREATE

Arguments

execution_type
string
Defines how the created bot will execute its handlers. The execution type determines the scripting environment for the bot's logic.
Allowed values:
  • deluge: Bot handlers will be implemented using Deluge scripts, allowing for complex logic and integration with Zoho services.
  • webhook: Bot handlers will trigger external webhooks, enabling integration with third-party services and custom backend logic.
Default value: deluge
execution_url
string
Required if execution_type is set to webhook.
  • The URL that will be called when the bot's handlers are triggered.
  • This should be a publicly accessible endpoint that can receive POST requests from the Cliq platform.
name
string
(Required)
Display name of the bot. Must be unique across the platform and can be updated later.
Note: The unique_name (used to identify the bot in API calls) is auto-assigned by Cliq on creation and cannot be changed, even if the display name is updated.
Maximum Length: 20 characters.
description
string
(Required)
Description of the bot. Provides details about the bot's functionality and purpose.
Maximum Length: 300 characters.
scope
string
Access level for the bot. Determines the visibility and availability of the bot within the organization.
Allowed values:
  • organization: Bot is available to all users in the organization.
  • team: Bot is available only to specified teams within the organization.
  • personal: Bot is available only to the creator but can be shared with other users.
team_ids
array
List of team_ids that are allowed to access the bot when scope is set to team.
Maximum limit: 4 team IDs can be provided, and this is mandatory when the bot's scope is set to team.
status_messages
array
Status messages shown for the bot. These messages will be displayed in the bot's profile or when users interact with the bot.
Maximum limit: 10 messages.
image
string
Base64-encoded avatar image for the bot. This image will represent the bot in conversations and the list of bots.
channel_participation
array
Channel participation capabilities of the bot. Defines how the bot can interact in channels.
Maximum limit: 3.
Allowed values:
  • listen_message: Bot can listen to messages in channels.
  • send_message: Bot can send messages to channels.
  • auto_follow_thread: Bot will automatically follow threads it participates in.
calls
string
Enables or disables the Bot Calls feature for this bot. Bot Calls let the bot initiate voice alerts to targeted users for urgent, high-priority notifications. When set to enabled, the bot's Call Handler becomes active and triggers on call state events: ringing, answered, ended, declined, missed, offline, and busy.

Allowed values:
  • enabled: Bot can initiate voice calls to users. Bot calls override the recipient's Do Not Disturb setting, ensuring delivery of critical alerts.
  • disabled: Bot cannot initiate voice calls.
Notes:
  • Individual subscribers can toggle bot calls on or off from their own Bots and Tools settings.
  • Organization admins can override and lock this setting for all users via Resource Management in the Admin Panel.
  • When calls is enabled, you can optionally add a call_handler to the bot to handle call state events programmatically.

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/bots" 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/bots") .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/bots', 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/bots", 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/bots", "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/bots"); 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/bots"), 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/bots" 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/bots"); 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/bots \ --header 'Authorization: Bearer 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f' \ --header 'content-type: application/json' \ --data '{"field1":"value1","field2":"value2"}'

Body Parameters

Click to copy
{ "name": "Clientcare Bot", "description": "Your client care co-pilot streamlining support by providing instant customer context and easy access to critical resources.", "scope": "team", "team_ids": [ 12345678 ], "status_messages": [ "Here to help you with client support!" ], "channel_participation": [ "send_message" ], "calls": "enabled" }
{ "name": "Pipeline Alert Bot", "description": "Sends real-time CI/CD pipeline status alerts to engineering teams. Triggered by your external build server via webhook on each build, test, or deployment event.", "scope": "team", "team_ids": [ 98765432 ], "execution_type": "webhook", "execution_url": "https://ci.zylker.com/cliq-webhook/pipeline-alerts", "status_messages": [ "Monitoring your pipelines 24/7" ], "channel_participation": [ "listen_message", "send_message" ], "calls": "enabled" }

Response Example

{ "url": "/api/v3/bots", "type": "bot", "data": { "unique_name": "clientcarebot", "name": "Clientcare Bot", "id": "53719000002124012", "description": "Your client care co-pilot streamlining support by providing instant customer context and easy access to critical resources.", "scope": "team", "team_ids": [ 12345678 ], "status_messages": [ "Here to help you with client support!" ], "channel_participation": [ "send_message" ], "calls": "enabled", "handlers": [], "creator": { "name": "James", "id": "65113112" }, "execution_type": "deluge", "status": "enabled", "type": "custom", "default": false, "subscriber_count": 1 } }
{ "url": "/api/v3/bots", "type": "bot", "data": { "unique_name": "pipelinealertbot", "name": "Pipeline Alert Bot", "id": "53719000002198034", "description": "Sends real-time CI/CD pipeline status alerts to engineering teams. Triggered by your external build server via webhook on each build, test, or deployment event.", "scope": "team", "team_ids": [ 98765432 ], "status_messages": [ "Monitoring your pipelines 24/7" ], "channel_participation": [ "listen_message", "send_message" ], "calls": "enabled", "handlers": [], "creator": { "name": "James", "id": "65113112" }, "execution_type": "webhook", "execution_url": "https://ci.zylker.com/cliq-webhook/pipeline-alerts", "status": "enabled", "type": "custom", "default": false, "subscriber_count": 1 } }
{ "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 bots 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

Retrieves a paginated list of all Bots available to the user.

Use limit and next_token for cursor-based pagination, sync_token for incremental sync, and search and scope to filter results when browsing the Marketplace catalogue.

Threshold limit: 30 requests per min per user
Number of API calls allowed within a minute.

Lock period: 5 minutes
Wait time before consecutive API requests.


OAuth Scope : ZohoCliq.Bots.READ

Query Parameters

limit
integer
Size of the set to be fetched.
Default value is 20 and maximum allowed value is 50.
sync_token
string
To fetch the bots which recently got added or updated after the previous request was made.
next_token
string
Pagination token to fetch the next set of bots.

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/bots" 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/bots") .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/bots', 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/bots", 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/bots", "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/bots"); 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/bots"), 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/bots" 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/bots"); xhr.setRequestHeader("Authorization", "Bearer 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f"); xhr.send(data);
curl --request GET \ --url https://cliq.zoho.com/api/v3/bots \ --header 'Authorization: Bearer 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f'

Response Example

{ "url": "/api/v3/bots", "type": "bot", "next_token": "NTB8MTc1NjM2MjA5MzQ5OHw1MzcxOTAwMDAwMTYyMDAwMw==", "sync_token": "NTB8MTc3NzM0MjEyNzQ3OHw1MzcxOTAwMDAwMTg3ODAxMQ==", "deleted": [ "string" ], "data": [ { "unique_name": "supportbot", "name": "Support Bot", "id": "53719000001878011", "description": "Handles support workflows", "scope": "organization", "channel_participation": [ "listen_message", "send_message", "auto_follow_thread" ], "handlers": [ { "type": "menu_handler", "id": "53719000001878017", "name": "Action", "icon": "wand/627282", "position": 1, "sub_actions": [ { "name": "Sub Action", "icon": "wand/627282" } ] } ], "creator": { "name": "James", "id": "65113112" }, "execution_type": "deluge", "status": "enabled", "type": "custom", "default": false, "subscriber_count": 1, "calls": "disabled" } ] }
{ "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 bot 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 details and configuration of an existing bot. You can change the bot's display name, description, access level (organization-wide, team, or personal), and logo.

Note:

  • The bot's unique_name is auto-assigned by Cliq upon creation and serves as a permanent identifier. It cannot be changed even if the display name is updated.
  • For Webhook bots, the execution_url can be updated independently - you can point the bot to a new server endpoint without changing any other configuration.

Threshold limit: 10 requests per min per user
Number of API calls allowed within a minute.

Lock period: 5 minutes
Wait time before consecutive API requests.


Possible Error Codes

Error Code Description
bot_not_found Bot with the specified ID does not exist.
bot_name_already_exists Another bot with this name already exists.
bot_permission_denied Insufficient permissions to edit this bot.

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.Bots.UPDATE

Arguments

name
string
Updated display name of the bot. Must be unique across the platform.
Note: Updating the display name does not affect the unique_name, which is permanently assigned by Cliq and cannot be changed.
Maximum length: 20 characters.
description
string
Updated bot description.
Maximum length: 300 characters.
scope
string
Updated access level.
Allowed values:
  • organization: Bot is available to all users in the organization.
  • team: Bot is available only to specified teams within the organization.
  • personal: Bot is available only to the creator but can be shared with other users.
team_ids
array
List of team_ids that are allowed to access the bot when scope is set to team.
Maximum limit: 4 team IDs can be provided, and this is mandatory when the bot's scope is set to team.
status_messages
array
Status messages shown for the bot. These messages will be displayed in the bot's profile or when users interact with the bot.
Maximum limit: 10 messages. Maximum length: Each message can be up to 50 characters long.
image
string
Updated Base64-encoded avatar image.
channel_participation
array
Updated channel participation capabilities of the bot. Defines how the bot can interact in channels.
Maximum limit: 3.
Allowed values:
  • listen_message: Bot can listen to messages in channels.
  • send_message: Bot can send messages to channels.
  • auto_follow_thread: Bot will automatically follow threads it participates in.
execution_url
uri
The server URL where the bot's webhook events are sent. Applicable only for Webhook bots.
This field can be updated independently to redirect the bot to a new endpoint without modifying any other configuration.
calls
string
Enables or disables the Bot Calls feature for this bot. When set to enable, the bot can initiate voice alerts to users and its Call Handler becomes active, firing on call state events: ringing, answered, ended, declined, missed, offline, and busy.

Allowed values:
  • enabled: Bot can initiate voice calls. Calls override the recipient's Do Not Disturb setting.
  • disabled: Bot cannot initiate voice calls.
Notes:
  • Individual subscribers can toggle bot calls on or off from their Bots and Tools settings.
  • Org admins can override and lock this setting for all users via the Admin Panel.

Path Parameters

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

Request Example

Click to copy
parameters_data='{"name":"CRM Bot","description":"Your CRM co-pilot providing instant access to customer data and insights within Cliq.","scope":"organization","status_messages":["Here to help you with CRM support!"],"image":"https://www.zoho.com/cliq/help/restapi/images/poll_icon.png","channel_participation":["listen_message"],"calls":"enabled"}'; headers_data = Map(); headers_data.put("Authorization", "Bearer 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f"); response = invokeUrl [ url: "https://cliq.zoho.com/api/v3/bots/b-1901318000009075007" 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\":\"CRM Bot\",\"description\":\"Your CRM co-pilot providing instant access to customer data and insights within Cliq.\",\"scope\":\"organization\",\"status_messages\":[\"Here to help you with CRM support!\"],\"image\":\"https://www.zoho.com/cliq/help/restapi/images/poll_icon.png\",\"channel_participation\":[\"listen_message\"],\"calls\":\"enabled\"}"); Request request = new Request.Builder() .url("https://cliq.zoho.com/api/v3/bots/b-1901318000009075007") .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":"CRM Bot","description":"Your CRM co-pilot providing instant access to customer data and insights within Cliq.","scope":"organization","status_messages":["Here to help you with CRM support!"],"image":"https://www.zoho.com/cliq/help/restapi/images/poll_icon.png","channel_participation":["listen_message"],"calls":"enabled"}' }; fetch('https://cliq.zoho.com/api/v3/bots/b-1901318000009075007', 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\":\"CRM Bot\",\"description\":\"Your CRM co-pilot providing instant access to customer data and insights within Cliq.\",\"scope\":\"organization\",\"status_messages\":[\"Here to help you with CRM support!\"],\"image\":\"https://www.zoho.com/cliq/help/restapi/images/poll_icon.png\",\"channel_participation\":[\"listen_message\"],\"calls\":\"enabled\"}" headers = { 'Authorization': "Bearer 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f", 'content-type': "application/json" } conn.request("PATCH", "/api/v3/bots/b-1901318000009075007", 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/bots/b-1901318000009075007", "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: 'CRM Bot', description: 'Your CRM co-pilot providing instant access to customer data and insights within Cliq.', scope: 'organization', status_messages: ['Here to help you with CRM support!'], image: 'https://www.zoho.com/cliq/help/restapi/images/poll_icon.png', channel_participation: ['listen_message'], calls: 'enabled' })); req.end();
var client = new RestClient("https://cliq.zoho.com/api/v3/bots/b-1901318000009075007"); var request = new RestRequest(Method.PATCH); request.AddHeader("Authorization", "Bearer 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f"); request.AddHeader("content-type", "application/json"); request.AddParameter("application/json", "{\"name\":\"CRM Bot\",\"description\":\"Your CRM co-pilot providing instant access to customer data and insights within Cliq.\",\"scope\":\"organization\",\"status_messages\":[\"Here to help you with CRM support!\"],\"image\":\"https://www.zoho.com/cliq/help/restapi/images/poll_icon.png\",\"channel_participation\":[\"listen_message\"],\"calls\":\"enabled\"}", 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/bots/b-1901318000009075007"), Headers = { { "Authorization", "Bearer 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f" }, }, Content = new StringContent("{\"name\":\"CRM Bot\",\"description\":\"Your CRM co-pilot providing instant access to customer data and insights within Cliq.\",\"scope\":\"organization\",\"status_messages\":[\"Here to help you with CRM support!\"],\"image\":\"https://www.zoho.com/cliq/help/restapi/images/poll_icon.png\",\"channel_participation\":[\"listen_message\"],\"calls\":\"enabled\"}") { 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/bots/b-1901318000009075007" payload := strings.NewReader("{\"name\":\"CRM Bot\",\"description\":\"Your CRM co-pilot providing instant access to customer data and insights within Cliq.\",\"scope\":\"organization\",\"status_messages\":[\"Here to help you with CRM support!\"],\"image\":\"https://www.zoho.com/cliq/help/restapi/images/poll_icon.png\",\"channel_participation\":[\"listen_message\"],\"calls\":\"enabled\"}") 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": "CRM Bot", "description": "Your CRM co-pilot providing instant access to customer data and insights within Cliq.", "scope": "organization", "status_messages": [ "Here to help you with CRM support!" ], "image": "https://www.zoho.com/cliq/help/restapi/images/poll_icon.png", "channel_participation": [ "listen_message" ], "calls": "enabled" }); 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/bots/b-1901318000009075007"); 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/bots/b-1901318000009075007 \ --header 'Authorization: Bearer 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f' \ --header 'content-type: application/json' \ --data '{"name":"CRM Bot","description":"Your CRM co-pilot providing instant access to customer data and insights within Cliq.","scope":"organization","status_messages":["Here to help you with CRM support!"],"image":"https://www.zoho.com/cliq/help/restapi/images/poll_icon.png","channel_participation":["listen_message"],"calls":"enabled"}'

Body Parameters

Click to copy
{ "name": "CRM Bot", "description": "Your CRM co-pilot providing instant access to customer data and insights within Cliq.", "scope": "organization", "status_messages": [ "Here to help you with CRM support!" ], "channel_participation": [ "listen_message" ], "calls": "enabled" }
{ "execution_url": "https://example.com/new-webhook" }

Response Example

{ "url": "/api/v3/bots/b-53719000002124012", "type": "bot", "data": { "unique_name": "crmbot", "name": "CRM Bot", "id": "53719000002124012", "description": "Your CRM co-pilot providing instant access to customer data and insights within Cliq.", "scope": "organization", "status_messages": [ "Here to help you with CRM support!" ], "channel_participation": [ "listen_message" ], "calls": "enabled", "handlers": [ { "type": "welcome_handler" } ], "creator": { "name": "James", "id": "65113112" }, "execution_type": "deluge", "status": "enabled", "type": "custom", "default": false, "subscriber_count": 1 } }
{ "url": "/api/v3/bots/b-73829000004567890", "type": "bot", "data": { "unique_name": "cicdbot", "name": "CI/CD Alert Bot", "id": "73829000004567890", "description": "Sends real-time CI/CD pipeline alerts and deployment notifications to your team channels.", "scope": "organization", "execution_url": "https://example.com/new-webhook", "execution_type": "webhook", "status": "enabled", "type": "custom", "default": false, "subscriber_count": 5 } }
{ "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." }

Retrieve details of a specific bot 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

Retrieves the full configuration and details of a specific bot, including its name, description, unique name, access level, and handler summary.
Use the fields query parameter to fetch additional details such as subscriber count or handler code.

Threshold limit: 30 requests per min per user
Number of API calls allowed within a minute.

Lock period: 5 minutes
Wait time before consecutive API requests.


Possible Error Codes

Error Code Description
bot_not_found Bot with the specified ID does not exist.

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.Bots.READ

Path Parameters

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

Query Parameters

fields
string
Additonal field to be fetched in the response. By default, the API returns basic details of the bot along with a summary of its handlers (type and count).
Allowed value
  • subscription_details - Returns the list of subscribers along with their details like name, email, etc.

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/bots/b-1901318000009075007" 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/bots/b-1901318000009075007") .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/bots/b-1901318000009075007', 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/bots/b-1901318000009075007", 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/bots/b-1901318000009075007", "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/bots/b-1901318000009075007"); 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/bots/b-1901318000009075007"), 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/bots/b-1901318000009075007" 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/bots/b-1901318000009075007"); xhr.setRequestHeader("Authorization", "Bearer 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f"); xhr.send(data);
curl --request GET \ --url https://cliq.zoho.com/api/v3/bots/b-1901318000009075007 \ --header 'Authorization: Bearer 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f'

Response Example

{ "url": "/api/v3/bots/b-53719000001878011", "type": "bot", "data": { "unique_name": "supportbot", "name": "Support Bot", "id": "53719000001878011", "description": "Handles support workflows", "scope": "organization", "channel_participation": [ "listen_message", "send_message", "auto_follow_thread" ], "handlers": [ { "type": "menu_handler", "id": "53719000001878017", "name": "Action", "icon": "wand/627282", "position": 1, "sub_actions": [ { "name": "Sub Action", "icon": "wand/627282" } ] } ], "creator": { "name": "James", "id": "65113112" }, "execution_type": "deluge", "status": "enabled", "type": "custom", "default": false, "subscriber_count": 1, "calls": "disabled" } }
{ "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 bot 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 bot and all its associated handlers and configuration. All subscribers will lose access to the bot and any channel associations will be removed. This action is irreversible.

Threshold limit: 10 requests per min per user
Number of API calls allowed within a minute.

Lock period: 5 minutes
Wait time before consecutive API requests.


Possible Error Codes

Error Code Description
bot_not_found Bot with the specified ID does not exist.
bot_permission_denied Insufficient permissions to delete this bot.

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.Bots.DELETE

Path Parameters

BOT_ID
string
(Required)
Unique numeric identifier of the bot. How to retrieve BOT_ID?
To learn how to retrieve this ID, see BOT_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/bots/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/bots/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/bots/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/bots/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/bots/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/bots/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/bots/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/bots/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/bots/987000000654321"); xhr.setRequestHeader("Authorization", "Bearer 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f"); xhr.send(data);
curl --request DELETE \ --url https://cliq.zoho.com/api/v3/bots/987000000654321 \ --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." }

Send a bot message 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

Send a message from the bot to specific users, a channel, or all subscribers.

Threshold limit: 50 requests per min per user
Number of API calls allowed within a minute.

Lock period: 10 minutes
Wait time before consecutive API requests.


Possible Error Codes

Error Code Description
botmessage_sending_failed Bot message sending failed.
botmessage_no_valid_users No valid users found for the bot message.
bot_unauthorized_message_access Bot does not have permission to message these users.
bot_message_forbidden Bot message access is forbidden.

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.Webhooks.CREATE

Arguments

text
string
Plain-text or rich-text message content.
Maximum length: 5000 characters.
buttons
array
Array of action buttons attached to the message. Each button executes an action when clicked.
Maximum: 5 buttons.
For the full button object structure and supported action types, refer to the Buttons documentation.
slides
array
Array of structured content blocks (slides) rendered below the card inside the message. Sits at the top level alongside text and card - not nested inside card. Most commonly paired with the modern-inline card theme. Maximum 20 slides. Maximum total size: 10,000 characters.

Supported slide types:
  • table - Renders a data table. Requires data.headers (array of strings) and data.rows (array of objects).
  • list - Renders a bulleted list. data is an array of strings.
  • label - Renders labelled key-value pairs. data is an array of objects with label and value.
  • images - Renders images inline. data is an array of image URL strings.
card
object
Message card object. Use to render a structured interactive card - poll, modern-inline, or prompt. For the full card object structure, available themes, and field definitions, refer to the Message Cards documentation.
bot
object
Custom sender details to override the bot's default display name and avatar for this message.
Show Sub-Attributes arrow
name
string
Display name shown as the message sender instead of the bot's default name.
image
string
Publicly accessible HTTPS URL of the avatar image to use for this message.
styles
object
Style settings for the message. Controls visual rendering such as background highlight colour and markdown processing.
Show Sub-Attributes arrow
background
string
Background highlight colour for the message bubble.
Allowed values: red | yellow | green | blue | grey
markdown
boolean
Set to true to enable Markdown parsing in the text field.
user_ids
string
Comma-separated list of user ZUIDs or emails to send the message to specific recipients.
Maximum 100 user IDs can be provided.
reply_to
string
Message ID to reply to. The new message will be posted as a reply to the specified message.
Maximum length: 100 characters.
notify_edit
boolean
Set to true to send a notification to recipients if the message is edited after being sent.
message_topic
string
Topic string used as the thread title when a thread is created from this message. Maximum length: 255 characters.
mark_as_read
boolean
Set to true to automatically mark this message as read for the recipient.
sync_message
boolean
Set to true to send the message synchronously. The response will include chat_id and message_id.
thread_chat_id
string
Chat ID of an existing thread to post the message into. Maximum length: 100 characters.
thread_message_id
string
Message UID from which a thread has been originated. Used to associate the message with a specific thread.
post_in_parent
boolean
Set to true to also post the message in the parent chat or channel when sending to a thread.
thread_title
string
Custom title for a newly created thread.
Maximum length: 100 characters.

Path Parameters

BOT_UNIQUE_NAME
string
(Required)
Unique name of the bot to send the message from.
To learn how to retrieve this ID, see BOT_UNIQUE_NAME in the Glossary page.

Query Parameters

EXTENSION_KEY
string
Encrypted application key for authentication.
CHANNEL_UNIQUE_NAME
string
Channel unique name to deliver the bot message.
To find the unique name of a channel, refer to CHANNEL_UNIQUE_NAME in the Glossary page.
user_ids
string
Comma-separated user IDs to send the message to.

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/bots/987000000654321/message" 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/bots/987000000654321/message") .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/bots/987000000654321/message', 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/bots/987000000654321/message", 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/bots/987000000654321/message", "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/bots/987000000654321/message"); 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/bots/987000000654321/message"), 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/bots/987000000654321/message" 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/bots/987000000654321/message"); 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/bots/987000000654321/message \ --header 'Authorization: Bearer 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f' \ --header 'content-type: application/json' \ --data '{"field1":"value1","field2":"value2"}'

Body Parameters

Click to copy
{ "text": "A critical support ticket has been escalated and requires immediate attention.", "card": { "theme": "modern-inline", "title": "Ticket Escalated - Payment Gateway Timeout" }, "slides": [ { "type": "table", "title": "Ticket Details", "data": { "headers": [ "Field", "Value" ], "rows": [ { "Field": "Ticket ID", "Value": "#TKT-00892" }, { "Field": "Priority", "Value": "Critical" }, { "Field": "Reported By", "Value": "olivia.palmer@zylker.com" }, { "Field": "Open Since", "Value": "2026-04-16 09:14 AM" } ] } } ], "buttons": [ { "label": "Assign to Me", "action": { "type": "invoke.function", "data": { "name": "assign_ticket" } } }, { "label": "View Ticket", "action": { "type": "open.url", "data": { "web": "https://desk.zoho.com/tickets/TKT-00892" } } } ], "user_ids": "55743307,55622727", "notify_edit": false }
{ "text": "The deployment pipeline for v3.6.1 completed successfully. All health checks passed.", "thread_chat_id": "CT_1207124526552602256_60002085329-T-1291567019566818579", "post_in_parent": false, "user_ids": "55743307", "sync_message": true }

Response Example

{ "Response Code": "204 No response" }

Send an incoming webhook message to a bot 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

Post a message to a bot using its incoming webhook URL. This endpoint allows external systems to push notifications into Cliq through a bot.

Note: Up to 50 additional custom parameters can be passed as query parameters (max 10,000 characters each).

Threshold limit: 50 requests per min per user
Number of API calls allowed within a minute.

Lock period: 10 minutes
Wait time before consecutive API requests.


Possible Error Codes

Error Code Description
botmessage_sending_failed Incoming webhook message delivery failed.
botmessage_no_valid_users No valid users found for delivery.
bot_unauthorized_message_access Bot does not have permission to message these users.
bot_message_forbidden Bot message access is forbidden.

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.Webhooks.CREATE,ZohoCliq.BotMessages.CREATE

Arguments

custom_parameters
object
Pass additional key-value pairs in the request body to provide context to the bot's handler. These parameters are user-defined and can carry any metadata relevant to your integration.

Rules for Custom Parameters
  • Up to 50 custom parameters are supported per request.
  • Each parameter value can be up to 10,000 characters.
  • All values must be of type string.
  • Parameter keys should be unique to avoid overwriting values in the bot handler.
Common Use Cases
  • Webhook Verification: Some platforms send a challenge_key during webhook registration to confirm that the endpoint is reachable. Your bot handler should echo it back in the response to complete the handshake.
  • CI/CD & Monitoring: Pass parameters like alert_type, build_status, or environment to notify teams about pipeline failures or infrastructure incidents in real time.
  • CRM & E-commerce: Send deal updates, order status changes, and customer activity metadata to keep sales and support teams informed without manual intervention.

Path Parameters

BOT_UNIQUE_NAME
string
(Required)
Unique name of the bot. To learn how to retrieve this, see BOT_UNIQUE_NAME in the Glossary page.

Query Parameters

user_ids
string
Comma-separated user IDs to send the message to.
Maxium 100 user IDs allowed.
Refer to USER_ID in the Glossary page for more details.
EXTENSION_KEY
string
Encrypted application key for the bot, used as an authentication alternative to OAuth.
Refer to EXTENSION_KEY 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/bots/987000000654321/incoming" 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/bots/987000000654321/incoming") .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/bots/987000000654321/incoming', 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/bots/987000000654321/incoming", 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/bots/987000000654321/incoming", "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/bots/987000000654321/incoming"); 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/bots/987000000654321/incoming"), 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/bots/987000000654321/incoming" 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/bots/987000000654321/incoming"); 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/bots/987000000654321/incoming \ --header 'Authorization: Bearer 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f' \ --header 'content-type: application/json' \ --data '{"field1":"value1","field2":"value2"}'

Body Parameters

Click to copy
{ "alert_type": "deployment", "environment": "production", "service_name": "payment-gateway", "severity": "critical", "triggered_by": "CI/CD pipeline" }

Response Example

{ "user_ids": [ "55743307", "55622727" ] }
{ "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." }

Trigger Bot Calls 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

Utilize this API to send a voice alert to specific users via the bot.

Threshold limit: 10 requests per 5 min per user
Number of API calls allowed within a minute.

Lock period: 30 minutes
Wait time before consecutive API requests.


Possible Error Codes

Error Code Description
bot_alert_not_enabled Voice call or alert is not enabled for this bot.

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.Webhooks.CREATE

Arguments

text
string
(Required)
The message to be dictated during the call.
Limit: 500 characters.
user_ids
array
List of user ZUIDs or emails.
Limit: 10 entries.
retry
integer
Number of retries if the user misses the call. System will retry after 2 minutes.
Maximum Attempts: 3
loop
integer
Number of times the message will be dictated.
Maximum: 3
actions
array
List of actions to be displayed as buttons during the call.
Each action includes a label, icon, and a specific action with its associated data.
Limit: 5
Show Sub-Attributes arrow
label
string
(Required)
Text displayed on the button.
Maximum Length: 20 characters.
icon
string
Icon identifier for the button. Can be an image URL or a supported icon keyword (e.g., tick, preview, url). View supported icons
hint
string
Tooltip or additional message (optional).
Maximum Length: 100 characters.
key
string
Optional key reference. This can be used to identify the button in the bot handler when the action is triggered. Maximum Length: 100 characters.
action
object
(Required)
An object containing the type of action the button should perform.
Show Sub-Attributes arrow
type
string
(Required)
The action type for a button.
Refer to Message Card Buttons for allowed action types and their corresponding data requirements.
data
object
(Required)
An object with properties for each action type. The required properties depend on the action type specified.
Refer to Message Card Buttons for details on the expected data structure for each action type.

Path Parameters

BOT_UNIQUE_NAME
string
(Required)
Unique identifier of the bot from which bot call needs to be triggered. To learn how to retrieve this ID, see BOT_UNIQUE_NAME 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/bots/987000000654321/calls" 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/bots/987000000654321/calls") .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/bots/987000000654321/calls', 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/bots/987000000654321/calls", 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/bots/987000000654321/calls", "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/bots/987000000654321/calls"); 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/bots/987000000654321/calls"), 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/bots/987000000654321/calls" 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/bots/987000000654321/calls"); 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/bots/987000000654321/calls \ --header 'Authorization: Bearer 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f' \ --header 'content-type: application/json' \ --data '{"field1":"value1","field2":"value2"}'

Body Parameters

Click to copy
{ "text": "We've detected an issue with Zylker Servers. Our team is working to resolve it at the earliest.", "user_ids": [ "55743327", "55642727" ], "retry": 3, "loop": 2, "actions": [ { "label": "View details", "icon": "url", "action": { "type": "open.url", "data": { "web": "https://cliq.zoho.com" } } }, { "label": "Acknowledge", "icon": "tick", "hint": "", "action": { "type": "invoke.function", "data": { "name": "test" } }, "key": "" }, { "label": "Delegate", "icon": "preview", "hint": "", "action": { "type": "system.api", "data": { "api": "audiocall/1234" } } } ] }

Response Example

{ "user_ids": [ "55622727", "55743307" ], "id": "dfb91610-296f-4f7a-b2b2-3b4436f2f5f0" }
{ "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 bot 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 specific bot by providing the handler type and the execution logic for that event.
Handlers define the bot's behavior for different trigger events. Refer introduction to bot handlers in the documentation for more details on each handler type and when it is triggered.

The way you define a handler depends on the bot's execution type:

  • Deluge bot: Provide the script attribute containing the Deluge source code to execute when the handler fires.
  • Webhook bot: Provide the permissions attribute - an array of data attributes that your external server needs to receive in the webhook payload when the handler is triggered. These define what contextual information Zoho Cliq includes in the POST request sent to your execution_url.

Webhook Bots - Using permissions

For Webhook bots, the permissions array controls what contextual data Zoho Cliq appends to the POST request sent to your server when a handler fires. Only include permissions that are relevant to your server's logic.
Maximum: 5 permissions per handler.

Allowed values for permissions

Permission Data provided to your webhook
chat Chat context (chat ID, type, participants)
message Message content and metadata
user Sender's user profile details
location Sender's location data
attachments Attachment metadata and download info

Permissions availability per handler type
Not all permissions are applicable to every handler. Passing a permission marked - will result in a validation error.

Handler attachments chat location message user
welcome_handler - - - - ✓
message_handler ✓ ✓ ✓ ✓ ✓
mention_handler - ✓ ✓ ✓ ✓
context_handler ✓ ✓ - - ✓
incoming_webhook_handler - - - - ✓
participation_handler - ✓ - - ✓
menu_handler - ✓ ✓ - ✓
alert_handler - - - -

Bot Menu Actions (menu_handler)

Both Deluge and Webhook bots support menu handlers, which add quick-action items to the bot's chat menu. When creating a menu_handler, two additional fields apply regardless of execution type:

  • name (required): Label shown in the menu. Max 15 characters.
  • icon (optional): Icon in {icon-name}/{HEX_COLOR} format. Example: wand/FF5733.

Threshold limit: 10 requests per min per user
Number of API calls allowed within a minute.

Lock period: 5 minutes
Wait time before consecutive API requests.


Possible Error Codes

Error Code Description
execution_handler_create_failed Failed to create the execution handler.
execution_handler_data_required Required handler data is missing.
execution_handler_data_invalid Provided handler data is invalid.
invalid_inputs Invalid handler type or malformed 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.Bots.UPDATE

Arguments

type
string
(Required)
Handler type to create.
Allowed values:
  • welcome_handler: Executes when a user subscribes to the bot, providing a personalized greeting or onboarding message.
  • message_handler: Triggers on incoming messages to the bot, enabling dynamic responses based on message content.
  • mention_handler: Fires when the bot is mentioned in a conversation, allowing it to respond contextually.
  • context_handler: Executes based on specific contextual triggers defined by the bot's logic.
  • participation_handler: Activates when users interact with the bot in channels, such as joining or leaving.
  • incoming_webhook_handler: Handles events from external systems via incoming webhooks.
  • menu_handler: Defines custom menu actions for the bot, providing interactive options to users.
  • call_handler: Responds to bot call events, such as ringing, answered, ended, etc.
script
string
Deluge script source code to execute for the handler.
Maximum size is 250KB.
Note: Applicable only for Deluge bots. Do not pass script for Webhook bots - use permissions instead.
permissions
array
List of data attributes to forward to your server in the webhook payload when the handler fires.
Note: Applicable only for Webhook bots. Do not pass permissions for Deluge bots - use script instead.
Maximum: 5 permissions per handler.
Allowed values:
  • chat: Chat context (chat ID, type, participants).
  • message: Message content and metadata.
  • user: Sender's user profile details.
  • location: Sender's location data.
  • attachments: Attachment metadata and download info.
Not all permissions are valid for every handler type. Refer to the permissions availability table in the Create a handler endpoint description.
name
string
Display name for the menu action, where this name will be shown as the menu action label.
Maximum length: 15 characters.
Note: Applicable only for menu_handler type.
icon
string
  • Custom icon reference for bot menu actions. This icon will be displayed alongside the menu action in the UI.
  • Refer to icons for supported menu action icons that can be used to enhance the UI of the handler's menu action.
Note: Applicable only for menu_handler type.
sub_actions
array
List of sub-actions for menu handlers.
  • Sub-actions allow you to create nested menu options under a main menu action, providing a structured and organized way to present multiple related actions to users.
  • Maximum limit: 5 sub-actions can be defined for a menu handler.
  • Each sub-action includes a name, optional icon, and its own action definition, allowing for complex interaction flows within the bot's menu system.
Note: Applicable only for menu_handler type.
Show Sub-Attributes arrow
name
string
(Required)
Sub-action name.
Maximum length: 15 characters.
icon
string
Custom icon reference for the sub-action.
Refer to icons for supported icons that can be used to enhance the UI of the sub-action.

Path Parameters

BOT_ID
string
(Required)
Unique numeric identifier of the bot. To learn how to retrieve this ID, see BOT_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/bots/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/bots/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/bots/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/bots/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/bots/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/bots/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/bots/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/bots/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/bots/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/bots/987000000654321/handlers \ --header 'Authorization: Bearer 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f' \ --header 'content-type: application/json' \ --data '{"field1":"value1","field2":"value2"}'

Body Parameters

Click to copy
{ "type": "message_handler", "permissions": [ "chat", "user" ] }
{ "type": "message_handler", "script": "response = Map();\nuserMessage = message.get(\"text\").toLowerCase();\nif(userMessage.contains(\"ticket\")) {\n response.put(\"text\", \"Sure! Please provide a brief description of your issue and I'll raise a ticket right away.\");\n} else if(userMessage.contains(\"status\")) {\n response.put(\"text\", \"Current system status:\\n\\u2705 API: Operational\\n\\u2705 Database: Operational\\n\\u26a0\\ufe0f Notifications: Degraded\");\n} else {\n response.put(\"text\", \"I didn't catch that. You can ask me about *status* or type *ticket* to raise a support request.\");\n}\nreturn response;" }

Response Example

{ "url": "/api/v3/bots/b-53719000001878011/handlers/message_handler", "type": "execution_handler", "data": { "type": "message_handler", "id": "53719000001878022", "permissions": [ "chat", "user" ] } }
{ "url": "/api/v3/bots/b-53719000001878011/handlers/message_handler", "type": "execution_handler", "data": { "type": "message_handler", "id": "53719000001878022" } }
{ "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 bot 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 bot by providing the handler type and the revised execution logic or configuration to apply for that event.
Handlers define the bot's behavior for different trigger events. Refer introduction to bot handlers in the documentation for more details on each handler type and when it is triggered.

What you can update depends on the bot's execution type:

  • Deluge bot: Update the script attribute with the revised Deluge source code to execute when the handler fires.
  • Webhook bot: Update the permissions attribute - the array of data attributes your external server needs to receive in the webhook payload. This replaces the existing permissions for the handler.
  • Menu handler (both types): Update the name and/or icon display properties. Use the optional handler_id query parameter to target a specific variant of a multi-variant menu handler.

Threshold limit: 10 requests per min per user
Number of API calls allowed within a minute.

Lock period: 5 minutes
Wait time before consecutive API requests.


Possible Error Codes

Error Code Description
execution_handler_update_failed Failed to update the execution handler.
execution_handler_not_found Specified handler was not found for this bot.

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.Bots.UPDATE

Arguments

script
string
Updated Deluge script source code for the handler.
Maximum size is 250KB.
Note: Applicable only for Deluge bots.
permissions
array
Updated list of data attributes to forward to your server in the webhook payload.
Note: Applicable only for Webhook bots.
Maximum: 5 permissions per handler.
Allowed values:
  • chat: Chat context (chat ID, type, participants).
  • message: Message content and metadata.
  • user: Sender's user profile details.
  • location: Sender's location data.
  • attachments: Attachment metadata and download info.
Not all permissions are valid for every handler type. Refer to the permissions availability table in the Create a handler endpoint description.
name
string
Updated display name for the menu action.
Maximum length: 15 characters.
Note: Applicable only for menu_handler type.
icon
string
Updated custom icon reference for menu handler variants.
Note: Applicable only for menu_handler type.
sub_actions
array
Updated list of sub-actions for menu handlers.
  • Sub-actions allow you to create nested menu options under a main menu action, providing a structured and organized way to present multiple related actions to users.
  • Maximum limit: 5 sub-actions can be defined for a menu handler.
  • Each sub-action includes a name, optional icon, and its own action definition, allowing for complex interaction flows within the bot's menu system.
Note: Applicable only for menu_handler type.
Show Sub-Attributes arrow
name
string
(Required)
Sub-action name.
Maximum length: 15 characters.
icon
string
Custom icon reference for the sub-action.
Refer to icons for supported icons that can be used to enhance the UI of the sub-action.

Path Parameters

BOT_ID
string
(Required)
Unique numeric identifier of the bot. To learn how to retrieve this ID, see BOT_ID in the Glossary page.
HANDLER_TYPE
string
(Required)
Type of the handler to be updated. Determines the event or trigger that will use the revised handler script or configuration.
Allowed values:
  • welcome_handler: Executes when a user subscribes to the bot.
  • message_handler: Executes when the bot receives a message.
  • mention_handler: Executes when the bot is mentioned in a message.
  • context_handler: Executes based on specific contextual triggers defined by the bot.
  • participation_handler: Executes when the bot is added to or removed from a channel.
  • incoming_webhook_handler: Executes when a message is received via an incoming webhook.
  • menu_handler: Executes when a user interacts with a menu action associated with the bot.
  • call_handler: Executes on bot call state events (e.g., ringing, answered, ended).

Query Parameters

handler_id
integer
ID of the handler. Used for menu handler alone, to target a specific variant of a multi-variant menu handler.

Request Example

Click to copy
parameters_data='{"script":"response = Map();\nresponse.put(\"text\", \"👋 Welcome to the IT Help Desk! Select an option to get started.\");\nreturn response;","name":"IT Help Desk","icon":"wand/627282","sub_actions":[{"name":"Raise Ticket","icon":"wand/627290"},{"name":"Track Status","icon":"wand/627291"},{"name":"Request Access","icon":"wand/627292"}]}'; headers_data = Map(); headers_data.put("Authorization", "Bearer 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f"); response = invokeUrl [ url: "https://cliq.zoho.com/api/v3/bots/53719000001878011/handlers/menu_handler" 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\":\"response = Map();\\nresponse.put(\\\"text\\\", \\\"👋 Welcome to the IT Help Desk! Select an option to get started.\\\");\\nreturn response;\",\"name\":\"IT Help Desk\",\"icon\":\"wand/627282\",\"sub_actions\":[{\"name\":\"Raise Ticket\",\"icon\":\"wand/627290\"},{\"name\":\"Track Status\",\"icon\":\"wand/627291\"},{\"name\":\"Request Access\",\"icon\":\"wand/627292\"}]}"); Request request = new Request.Builder() .url("https://cliq.zoho.com/api/v3/bots/53719000001878011/handlers/menu_handler") .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":"response = Map();\nresponse.put(\"text\", \"👋 Welcome to the IT Help Desk! Select an option to get started.\");\nreturn response;","name":"IT Help Desk","icon":"wand/627282","sub_actions":[{"name":"Raise Ticket","icon":"wand/627290"},{"name":"Track Status","icon":"wand/627291"},{"name":"Request Access","icon":"wand/627292"}]}' }; fetch('https://cliq.zoho.com/api/v3/bots/53719000001878011/handlers/menu_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") payload = "{\"script\":\"response = Map();\\nresponse.put(\\\"text\\\", \\\"👋 Welcome to the IT Help Desk! Select an option to get started.\\\");\\nreturn response;\",\"name\":\"IT Help Desk\",\"icon\":\"wand/627282\",\"sub_actions\":[{\"name\":\"Raise Ticket\",\"icon\":\"wand/627290\"},{\"name\":\"Track Status\",\"icon\":\"wand/627291\"},{\"name\":\"Request Access\",\"icon\":\"wand/627292\"}]}" headers = { 'Authorization': "Bearer 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f", 'content-type': "application/json" } conn.request("PATCH", "/api/v3/bots/53719000001878011/handlers/menu_handler", 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/bots/53719000001878011/handlers/menu_handler", "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: 'response = Map();\nresponse.put("text", "👋 Welcome to the IT Help Desk! Select an option to get started.");\nreturn response;', name: 'IT Help Desk', icon: 'wand/627282', sub_actions: [ {name: 'Raise Ticket', icon: 'wand/627290'}, {name: 'Track Status', icon: 'wand/627291'}, {name: 'Request Access', icon: 'wand/627292'} ] })); req.end();
var client = new RestClient("https://cliq.zoho.com/api/v3/bots/53719000001878011/handlers/menu_handler"); var request = new RestRequest(Method.PATCH); request.AddHeader("Authorization", "Bearer 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f"); request.AddHeader("content-type", "application/json"); request.AddParameter("application/json", "{\"script\":\"response = Map();\\nresponse.put(\\\"text\\\", \\\"👋 Welcome to the IT Help Desk! Select an option to get started.\\\");\\nreturn response;\",\"name\":\"IT Help Desk\",\"icon\":\"wand/627282\",\"sub_actions\":[{\"name\":\"Raise Ticket\",\"icon\":\"wand/627290\"},{\"name\":\"Track Status\",\"icon\":\"wand/627291\"},{\"name\":\"Request Access\",\"icon\":\"wand/627292\"}]}", 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/bots/53719000001878011/handlers/menu_handler"), Headers = { { "Authorization", "Bearer 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f" }, }, Content = new StringContent("{\"script\":\"response = Map();\\nresponse.put(\\\"text\\\", \\\"👋 Welcome to the IT Help Desk! Select an option to get started.\\\");\\nreturn response;\",\"name\":\"IT Help Desk\",\"icon\":\"wand/627282\",\"sub_actions\":[{\"name\":\"Raise Ticket\",\"icon\":\"wand/627290\"},{\"name\":\"Track Status\",\"icon\":\"wand/627291\"},{\"name\":\"Request Access\",\"icon\":\"wand/627292\"}]}") { 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/bots/53719000001878011/handlers/menu_handler" payload := strings.NewReader("{\"script\":\"response = Map();\\nresponse.put(\\\"text\\\", \\\"👋 Welcome to the IT Help Desk! Select an option to get started.\\\");\\nreturn response;\",\"name\":\"IT Help Desk\",\"icon\":\"wand/627282\",\"sub_actions\":[{\"name\":\"Raise Ticket\",\"icon\":\"wand/627290\"},{\"name\":\"Track Status\",\"icon\":\"wand/627291\"},{\"name\":\"Request Access\",\"icon\":\"wand/627292\"}]}") 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": "response = Map();\nresponse.put(\"text\", \"👋 Welcome to the IT Help Desk! Select an option to get started.\");\nreturn response;", "name": "IT Help Desk", "icon": "wand/627282", "sub_actions": [ { "name": "Raise Ticket", "icon": "wand/627290" }, { "name": "Track Status", "icon": "wand/627291" }, { "name": "Request Access", "icon": "wand/627292" } ] }); 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/bots/53719000001878011/handlers/menu_handler"); 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/bots/53719000001878011/handlers/menu_handler \ --header 'Authorization: Bearer 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f' \ --header 'content-type: application/json' \ --data '{"script":"response = Map();\nresponse.put(\"text\", \"👋 Welcome to the IT Help Desk! Select an option to get started.\");\nreturn response;","name":"IT Help Desk","icon":"wand/627282","sub_actions":[{"name":"Raise Ticket","icon":"wand/627290"},{"name":"Track Status","icon":"wand/627291"},{"name":"Request Access","icon":"wand/627292"}]}'

Body Parameters

Click to copy
{ "script": "response = Map();\nresponse.put(\"text\", \"Updated\");\nreturn response;" }
{ "permissions": [ "chat", "user", "message" ] }
{ "name": "Updated Menu", "icon": "emoji-name/FF5733" }

Response Example

{ "url": "/api/v3/bots/b-53719000001878011/handlers/message_handler", "type": "execution_handler", "data": { "type": "message_handler", "id": "53719000001878022" } }
{ "url": "/api/v3/bots/b-53719000001878011/handlers/message_handler", "type": "execution_handler", "data": { "type": "message_handler", "id": "53719000001878022", "permissions": [ "chat", "user", "message" ] } }
{ "url": "/api/v3/bots/b-53719000001878011/handlers/menu_handler", "type": "execution_handler", "data": { "type": "menu_handler", "id": "53719000001878027", "display_props": { "name": "Updated Menu", "icon": "emoji-name/FF5733", "position": 1 } } }
{ "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 bot 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 details and configuration of a specific handler for a bot, including the Deluge source code and any associated menu action configuration.

Threshold limit: 10 requests per min per user
Number of API calls allowed within a minute.

Lock period: 5 minutes
Wait time before consecutive API requests.


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 bot.

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.Bots.READ

Path Parameters

BOT_ID
string
(Required)
Unique numeric identifier of the bot. To learn how to retrieve this ID, see BOT_ID in the Glossary page.
HANDLER_TYPE
string
(Required)
Type of the handler to fetch details for. Determines the event or trigger associated with the handler script.
Allowed values:
  • welcome_handler: Executes when a user subscribes to the bot.
  • message_handler: Executes when the bot receives a message.
  • mention_handler: Executes when the bot is mentioned in a message.
  • context_handler: Executes based on specific contextual triggers defined by the bot.
  • participation_handler: Executes when the bot is added to or removed from a channel.
  • incoming_webhook_handler: Executes when a message is received via an incoming webhook.
  • menu_handler: Executes when a user interacts with a menu action associated with the bot.
  • call_handler: Executes on bot call state events (e.g., ringing, answered, ended).

Query Parameters

handler_id
integer
ID of the handler. Used for menu handler alone, to target a specific variant of a multi-variant menu handler.

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/bots/987000000654321/handlers/message_handler" 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/bots/987000000654321/handlers/message_handler") .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/bots/987000000654321/handlers/message_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("GET", "/api/v3/bots/987000000654321/handlers/message_handler", 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/bots/987000000654321/handlers/message_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/bots/987000000654321/handlers/message_handler"); 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/bots/987000000654321/handlers/message_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/bots/987000000654321/handlers/message_handler" 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/bots/987000000654321/handlers/message_handler"); xhr.setRequestHeader("Authorization", "Bearer 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f"); xhr.send(data);
curl --request GET \ --url https://cliq.zoho.com/api/v3/bots/987000000654321/handlers/message_handler \ --header 'Authorization: Bearer 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f'

Response Example

{ "url": "/api/v3/bots/b-53719000001887001/handlers/menu_handler", "type": "execution_handler", "data": { "script": "response = Map();\nresponse.put(\"text\", \"👋 Hi! Choose an option below to get started with the IT Help Desk bot.\");\nreturn response;", "handler_id": "53719000002155003", "name": "IT Help Desk", "type": "menu_handler", "icon": "wand/627282", "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": "location", "param_type": "MAP" }, { "param_name": "sub_action", "param_type": "STRING" } ] } }
{ "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 bot 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 handler from a bot. Once deleted, the associated Deluge code and configuration are lost and the handler will no longer respond to its trigger event.

Threshold limit: 10 requests per min per user
Number of API calls allowed within a minute.

Lock period: 5 minutes
Wait time before consecutive API requests.


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 bot.

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.Bots.UPDATE

Path Parameters

BOT_ID
string
(Required)
Unique numeric identifier of the bot. To learn how to retrieve this ID, see BOT_ID in the Glossary page.
HANDLER_TYPE
string
(Required)
Type of the handler to be deleted. Determines the event or trigger associated with the handler script.
Allowed values:
  • welcome_handler: Executes when a user subscribes to the bot.
  • message_handler: Executes when the bot receives a message.
  • mention_handler: Executes when the bot is mentioned in a message.
  • context_handler: Executes based on specific contextual triggers defined by the bot.
  • participation_handler: Executes when the bot is added to or removed from a channel.
  • incoming_webhook_handler: Executes when a message is received via an incoming webhook.
  • menu_handler: Executes when a user interacts with a menu action associated with the bot.
  • call_handler: Executes on bot call state events (e.g., ringing, answered, ended).

Query Parameters

handler_id
integer
ID of the handler. Used for menu handler alone, to target a specific variant of a multi-variant menu handler.

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/bots/987000000654321/handlers/message_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/bots/987000000654321/handlers/message_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/bots/987000000654321/handlers/message_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/bots/987000000654321/handlers/message_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/bots/987000000654321/handlers/message_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/bots/987000000654321/handlers/message_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/bots/987000000654321/handlers/message_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/bots/987000000654321/handlers/message_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/bots/987000000654321/handlers/message_handler"); xhr.setRequestHeader("Authorization", "Bearer 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f"); xhr.send(data);
curl --request DELETE \ --url https://cliq.zoho.com/api/v3/bots/987000000654321/handlers/message_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." }

Associate bot to a channel 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

Add a bot to a specific channel by providing the bot's unique name and the target channel ID. Once associated, the bot can interact with users in that channel based on its configured handlers and permissions.

Threshold limit: 5 requests per min per user
Number of API calls allowed within a minute.

Lock period: 5 minutes
Wait time before consecutive API requests.


Possible Error Codes

Error Code Description
bot_not_found Bot with the specified ID or unique name does not exist.
bot_already_member Bot is already a member of the target channel.

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.Channels.UPDATE

Arguments

channel_unique_name
string
Unique name of the channel to associate with the bot. This is the identifier used in API calls to specify the channel for bot association.
To retrieve the unique name of a channel, refer to CHANNEL_UNIQUE_NAME in the Glossary.

Path Parameters

BOT_UNIQUE_NAME
string
(Required)
Unique name of the bot. To learn how to retrieve this, see BOT_UNIQUE_NAME in the Glossary page.

Query Parameters

EXTENSION_KEY
string
Encrypted application key for authentication. Required if the bot belongs to an extension. For bots created within the organization, this parameter is not needed.
To learn how to retrieve this ID, see EXTENSION_KEY 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/bots/supportbot/associate" 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/bots/supportbot/associate") .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/bots/supportbot/associate', 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/bots/supportbot/associate", 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/bots/supportbot/associate", "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/bots/supportbot/associate"); 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/bots/supportbot/associate"), 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/bots/supportbot/associate" 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/bots/supportbot/associate"); 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/bots/supportbot/associate \ --header 'Authorization: Bearer 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f' \ --header 'content-type: application/json' \ --data '{"field1":"value1","field2":"value2"}'

Body Parameters

Click to copy
{ "channel_unique_name": "announcements" }

Response Example

{ "Response Code": "204 No response" }

List all subscribers of a specific bot 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 users who have subscribed to a specific bot, identified by its bot ID or unique bot name. Access to bot subscribers is limited to the bot creator or the administrator of the organization.

Use limit and next_token for cursor-based pagination. Use sync_token for incremental sync to receive only changes since the last request.

Threshold limit: 100 requests per min per user
Number of API calls allowed within a minute.

Lock period: 5 minutes
Wait time before consecutive API requests.


OAuth Scope : ZohoCliq.Bots.READ

Path Parameters

BOT_ID_OR_UNIQUE_NAME
string
(Required)
Either the numeric bot ID (e.g. b-1901318000009075007) or the bot's unique name (e.g. supportbot).
To learn more, see BOT_ID or BOT_UNIQUE_NAME in the Glossary page.

Query Parameters

limit
integer
Maximum number of subscribers to return.
next_token
string
Pagination token to fetch the next set of subscribers.
sync_token
string
Token to fetch only the subscribers who were added or updated after the previous request was made.
EXTENSION_KEY
string
Encrypted application key for authentication. Required if the bot belongs to an extension. For bots created within the organization, this parameter is not needed.
To learn how to retrieve this ID, see EXTENSION_KEY 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/bots/987000000654321/subscribers" 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/bots/987000000654321/subscribers") .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/bots/987000000654321/subscribers', 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/bots/987000000654321/subscribers", 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/bots/987000000654321/subscribers", "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/bots/987000000654321/subscribers"); 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/bots/987000000654321/subscribers"), 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/bots/987000000654321/subscribers" 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/bots/987000000654321/subscribers"); xhr.setRequestHeader("Authorization", "Bearer 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f"); xhr.send(data);
curl --request GET \ --url https://cliq.zoho.com/api/v3/bots/987000000654321/subscribers \ --header 'Authorization: Bearer 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f'

Response Example

{ "url": "/api/v3/bots/{BOT_UNIQUE_NAME}/subscribers", "type": "bot_subscriber", "sync_token": "NTB8MTcyMjcwMDXwxNzIyNzA5MzQ0NDM5", "data": [ { "email_id": "scott.fisher@zylker.com", "user_id": "19183988", "name": "Scott Fisher" } ] }
{ "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." }