Message Actions

Message Actions 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

Message Actions are custom contextual actions that appear in the right-click (or long-press on mobile) context menu of individual chat messages. When a user selects an action, the configured handler executes with the selected message as its input - enabling workflows like ticket creation, message translation, content archiving, and more, directly from within a conversation.

For more information, refer to the Message Actions Help Documentation.

Key Concepts

  • Trigger: A message action fires when a user right-clicks (or long-presses) a message and selects the action from the context menu.
  • message_types: Controls which message types the action is available for - text, link, or attachment.
  • multi_selectable: When true, allows the action to be applied to multiple selected messages at once.

Action Scope

Scope Visibility
organization Available to all users in the organization.
team Restricted to members of the specified teams.
personal Visible only to the creator.

What can you do with the Message Actions API?

With the Message Actions API, you can programmatically create and manage message actions, configure their execution handlers, control scope and message type filters, and retrieve action details - all without using the Cliq Developer console.

Each message action has an execution_type that determines how its handler runs when triggered. The Message Actions API supports two execution types:

Deluge Message Actions (default)
Handler logic is written in Deluge and runs entirely within Zoho's platform. The script receives full message context as input.

  • If execution_type is not specified, it defaults to deluge.
  • Handler logic is defined using the script field when creating or updating the execution_handler.
  • Suitable for actions that perform operations within the Zoho ecosystem.

Webhook Message Actions
When a user triggers the action, Zoho Cliq sends an HTTP POST request to your execution_url containing the event payload. Your server processes it and returns a response that Cliq acts upon.

  • To create a Webhook message action, set execution_type to webhook and provide the execution_url.
  • Handler permissions (attachments, chat, location, message, user) control which data attributes are included in the webhook payload sent to your server.
  • Ideal for actions that need to integrate with external ticketing systems, translators, databases, or custom services.

Download Message Actions OpenAPI Document
End Points
Create a new message action
List all message actions
Update an existing message action
Get details of a specific message action
Delete a specific message action
Update a handler for a specific message action
Get details of a specific message action handler

Create a new message action 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 Message Action. Message actions appear in the right-click / long-press context menu for individual chat messages. When a user selects the action, the configured handler executes with the selected message as input.

Message Actions support two execution types:

  • Deluge (default): Handler logic runs on Zoho's platform via Deluge scripts. The script receives full message context including content, sender, and chat details.
  • Webhook: When the action is triggered, Cliq sends a POST request to your execution_url with the event payload. Your server processes it and returns the response. Supports all 5 permissions (attachments, chat, location, message, user).

Pass execution_type: "webhook" and a valid execution_url to create a Webhook message action. If execution_type is omitted, it defaults to deluge.


Threshold limit: 30 requests per min per user
Maximum API calls allowed within one minute.

Lock period: 5 minutes
Cooldown period applied after threshold exhaustion.


Possible Error Codes

Error Code Description
msgaction_creation_limit_exceeded Organization has reached the maximum number of message actions.
msgaction_name_already_exists A message action with this name already exists.
invalid_inputs Request body validation failed.

Error Response Format

When an error occurs, the API returns a JSON response in this format:

{"message": "A human-readable description of the error.", "code": "error_code"}

where code is the error identifier (as listed in the table above) and message is a human-readable explanation of what went wrong.


OAuth Scope : ZohoCliq.messageactions.CREATE

Arguments

execution_type
string
Defines how the message action executes its handler.
  • deluge: Handler logic runs on Zoho's platform via Deluge scripts. Default when omitted.
  • webhook: When the action is triggered, Cliq sends a POST request to your execution_url.
execution_url
string
The URL that Zoho Cliq will POST handler events to when the message action is triggered.
Required when execution_type is webhook.
Maximum length: 225 characters.
name
string
(Required)
Name of the message action. This is the text shown to users in the message action menu.
Maximum length: 30 characters.
hint
string
(Required)
Hint text displayed below the message action name in the menu to provide additional context to users.
Maximum length: 128 characters.
scope
string
Access level for the message action, determining its visibility and availability to users.
Allowed values are:
  • organization: Visible and accessible to all users within the organization.
  • team: Visible and accessible only to members of specified teams. Requires team_ids field.
  • personal: Visible and accessible only to the creator, but can be shared with other users by adding them as collaborators.
team_ids
array
List of team_ids that have access to the message action when scope is set to team. Each ID corresponds to a team within the organization.
Maximum items: 4 team IDs can be specified when scope is team.
multi_selectable
boolean
Determines whether the message action can be applied to multiple messages at once. If set to true, users can select multiple messages and invoke the action on all selected messages simultaneously. If false, the action can only be applied to one message at a time.
image
string
Base64-encoded string representing a custom icon image for the message action. This icon is displayed in the message action menu alongside the action name.
message_types
array
List of message types that the message action supports. This determines which types of messages the action can be applied to. Allowed values are:
  • text: The action can be applied to text messages.
  • link: The action can be applied to messages containing links.
  • attachment: The action can be applied to messages with attachments.
Minimum items: At least 1 message type must be specified.

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

Body Parameters

Click to copy
{ "name": "Create Ticket", "hint": "Convert this message into a support ticket", "scope": "organization", "message_types": [ "text", "attachment" ], "execution_type": "deluge" }
{ "name": "Log to Jira", "hint": "Send this message to Jira as an issue", "scope": "organization", "message_types": [ "text", "link", "attachment" ], "execution_type": "webhook", "execution_url": "https://api.yourcompany.com/cliq/messageactions/handler" }
{ "name": "Bulk Archive", "hint": "Archive selected messages", "scope": "team", "team_ids": [ 100001, 100002 ], "multi_selectable": true, "message_types": [ "text" ] }
{ "name": "Translate", "hint": "Translate selected message to English", "scope": "personal", "message_types": [ "text" ] }

Response Example

{ "url": "/api/v3/messageactions", "type": "messageaction", "data": { "name": "Create Ticket", "id": "53719000002124010", "hint": "Convert this message into a support ticket", "scope": "organization", "multi_selectable": false, "message_types": [ "text", "attachment" ], "handlers": [ { "type": "execution_handler" } ], "creator": { "name": "James", "id": "65113112" }, "execution_type": "deluge", "status": "enabled", "type": "custom" } }
{ "url": "/api/v3/messageactions", "type": "messageaction", "data": { "name": "Log to Jira", "id": "53719000002124011", "hint": "Send this message to Jira as an issue", "scope": "organization", "multi_selectable": false, "message_types": [ "text", "link", "attachment" ], "handlers": [ { "type": "execution_handler" } ], "creator": { "name": "James", "id": "65113112" }, "execution_type": "webhook", "execution_url": "https://api.yourcompany.com/cliq/messageactions/handler", "status": "enabled", "type": "custom" } }
{ "url": "/api/v3/messageactions", "type": "messageaction", "data": { "name": "Bulk Archive", "id": "53719000002124012", "hint": "Archive selected messages", "scope": "team", "team_ids": [ 100001, 100002 ], "multi_selectable": true, "message_types": [ "text" ], "handlers": [ { "type": "execution_handler" } ], "creator": { "name": "James", "id": "65113112" }, "execution_type": "deluge", "status": "enabled", "type": "custom" } }
{ "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 message actions AI Tools

Open in ChatGPT

Open in ChatGPT to ask questions about this page

Open in Claude

Open in Claude to ask questions about this page

Copy as Markdown

Copy this page as markdown to use with AI assistants

View as Markdown

Open this page as markdown in a new tab

Retrieve a paginated list of all message Actions available to the user.

Threshold limit: 30 requests per min per user
Maximum API calls allowed within one minute.

Lock period: 5 minutes
Cooldown period applied after threshold exhaustion.


OAuth Scope : ZohoCliq.messageactions.READ

Query Parameters

sync_token
string
Sync token for incremental synchronization. To fetch only message actions created or updated since the last request, provide the sync_token value from the previous response. For the initial request, omit this parameter or set it to null to retrieve all message actions.
limit
integer
Maximum number of message actions to return per page.
Default: 20
Maximum limit: 100
next_token
string
Token for fetching the next page of results. If the response includes a next_token, use its value in this parameter to retrieve the next page. Omit this parameter or set it to null if there are no more pages to fetch.

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

Response Example

{ "url": "/api/v3/messageactions", "type": "messageaction", "sync_token": "NTB8MTc3NzQzMjI3NjY1OHw1MzcxOTAwMDAwMjEyNDAxMA==", "data": [ { "multi_selectable": true, "name": "Create Ticket", "id": "53719000002124010", "handlers": [ { "type": "execution_handler" } ], "creator": { "name": "James", "id": "65113112" }, "execution_type": "deluge", "hint": "Create a helpdesk ticket", "status": "enabled", "type": "custom", "message_types": [ "text", "link" ], "scope": "organization" }, { "multi_selectable": false, "name": "Translate", "id": "53719000002124013", "handlers": [ { "type": "execution_handler" } ], "creator": { "name": "James", "id": "65113112" }, "execution_type": "deluge", "hint": "Translate selected message to English", "status": "enabled", "type": "custom", "message_types": [ "text" ], "scope": "personal" } ] }
{ "message": "The request cannot be performed. Usually because of malformed parameter or missing parameter." }
{ "message": "Request was rejected because of invalid AuthToken." }
{ "message": "The user does not have enough permission or possibly not an user of the respective organization to access the resource." }
{ "message": "The URL you've sent is wrong. It's possible that the resource you've requested has been moved to another URL." }
{ "message": "The requested resource does not support the HTTP method used. For example, requesting List of all customers API with PUT as the HTTP method." }
{ "message": "The response has been received but the requested response type is not supported by the browser." }
{ "message": "Too many requests within a certain time frame." }
{ "message": "Cliq server encountered an error which prevents it from fulfilling the request." }

Update an existing message action AI Tools

Open in ChatGPT

Open in ChatGPT to ask questions about this page

Open in Claude

Open in Claude to ask questions about this page

Copy as Markdown

Copy this page as markdown to use with AI assistants

View as Markdown

Open this page as markdown in a new tab

Update the configuration of an existing message action.

All fields are optional. Only the fields you provide will be updated; omitted fields remain unchanged.

For Webhook message actions, you can update the execution_url independently at any time to redirect the action to a new server endpoint.


Threshold limit: 10 requests per min per user
Maximum API calls allowed within one minute.

Lock period: 5 minutes
Cooldown period applied after threshold exhaustion.


Possible Error Codes

Error Code Description
msgaction_not_found Message action with the specified ID was not found.
msgaction_name_already_exists Another message action with this name already exists.

Error Response Format

When an error occurs, the API returns a JSON response in this format:

{"message": "A human-readable description of the error.", "code": "error_code"}

where code is the error identifier (as listed in the table above) and message is a human-readable explanation of what went wrong.


OAuth Scope : ZohoCliq.messageactions.UPDATE

Arguments

execution_url
string
Updated server URL where Cliq will forward handler events. Applicable only for Webhook message actions.
This field can be updated independently to redirect the action to a new endpoint.
Maximum length: 225 characters.
name
string
Updated name of the message action shown to users in the message action menu.
Maximum length: 30 characters.
hint
string
Updated hint text displayed below the message action name in the menu to provide additional context to users.
Maximum length: 128 characters.
scope
string
Updated access level for the message action, determining its visibility and availability to users.
Allowed values are:
  • organization: Visible and accessible to all users within the organization.
  • team: Visible and accessible only to members of specified teams. Requires team_ids field.
  • personal: Visible and accessible only to the creator, but can be shared with other users by adding them as collaborators.
team_ids
array
Updated list of team_ids that have access to the message action when scope is set to team. Each ID corresponds to a team within the organization.
Maximum items: 4 team IDs can be specified when scope is team.
multi_selectable
boolean
Updated multi-selection behavior. If set to true, users can select multiple messages and invoke the action on all selected messages simultaneously. If false, the action can only be applied to one message at a time.
image
string
Updated Base64-encoded string representing a custom icon image for the message action. This icon is displayed in the message action menu alongside the action name.
message_types
array
Updated list of message types that the message action supports. Allowed values are:
  • text: The action can be applied to text messages.
  • link: The action can be applied to messages containing links.
  • attachment: The action can be applied to messages with attachments.
Minimum items: At least 1 message type must be specified.

Path Parameters

MESSAGE_ACTION_ID
string
(Required)
Unique numeric identifier of the message action.
To learn how to retrieve this ID, see MESSAGE_ACTION_ID in the Glossary page.'

Request Example

Click to copy
parameters_data='{"name":"Create Ticket","hint":"Convert this message into a support ticket","scope":"organization","multi_selectable":false,"message_types":["text","link","attachment"]}'; headers_data = Map(); headers_data.put("Authorization", "Bearer 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f"); response = invokeUrl [ url: "https://cliq.zoho.com/api/v3/messageactions/%7BMESSAGE_ACTION_ID%7D" type: PATCH headers: headers_data content-type: application/json parameters: parameters_data connection: <connection_name> ]; info response;
OkHttpClient client = new OkHttpClient(); MediaType mediaType = MediaType.parse("application/json"); RequestBody body = RequestBody.create(mediaType, "{\"name\":\"Create Ticket\",\"hint\":\"Convert this message into a support ticket\",\"scope\":\"organization\",\"multi_selectable\":false,\"message_types\":[\"text\",\"link\",\"attachment\"]}"); Request request = new Request.Builder() .url("https://cliq.zoho.com/api/v3/messageactions/%7BMESSAGE_ACTION_ID%7D") .patch(body) .addHeader("Authorization", "Bearer 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f") .addHeader("content-type", "application/json") .build(); Response response = client.newCall(request).execute();
const options = { method: 'PATCH', headers: { Authorization: 'Bearer 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f', 'content-type': 'application/json' }, body: '{"name":"Create Ticket","hint":"Convert this message into a support ticket","scope":"organization","multi_selectable":false,"message_types":["text","link","attachment"]}' }; fetch('https://cliq.zoho.com/api/v3/messageactions/%7BMESSAGE_ACTION_ID%7D', options) .then(response => response.json()) .then(response => console.log(response)) .catch(err => console.error(err));
import http.client conn = http.client.HTTPSConnection("cliq.zoho.com") payload = "{\"name\":\"Create Ticket\",\"hint\":\"Convert this message into a support ticket\",\"scope\":\"organization\",\"multi_selectable\":false,\"message_types\":[\"text\",\"link\",\"attachment\"]}" headers = { 'Authorization': "Bearer 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f", 'content-type': "application/json" } conn.request("PATCH", "/api/v3/messageactions/%7BMESSAGE_ACTION_ID%7D", payload, headers) res = conn.getresponse() data = res.read() print(data.decode("utf-8"))
const http = require("https"); const options = { "method": "PATCH", "hostname": "cliq.zoho.com", "port": null, "path": "/api/v3/messageactions/%7BMESSAGE_ACTION_ID%7D", "headers": { "Authorization": "Bearer 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f", "content-type": "application/json" } }; const req = http.request(options, function (res) { const chunks = []; res.on("data", function (chunk) { chunks.push(chunk); }); res.on("end", function () { const body = Buffer.concat(chunks); console.log(body.toString()); }); }); req.write(JSON.stringify({ name: 'Create Ticket', hint: 'Convert this message into a support ticket', scope: 'organization', multi_selectable: false, message_types: ['text', 'link', 'attachment'] })); req.end();
var client = new RestClient("https://cliq.zoho.com/api/v3/messageactions/%7BMESSAGE_ACTION_ID%7D"); var request = new RestRequest(Method.PATCH); request.AddHeader("Authorization", "Bearer 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f"); request.AddHeader("content-type", "application/json"); request.AddParameter("application/json", "{\"name\":\"Create Ticket\",\"hint\":\"Convert this message into a support ticket\",\"scope\":\"organization\",\"multi_selectable\":false,\"message_types\":[\"text\",\"link\",\"attachment\"]}", 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/messageactions/%7BMESSAGE_ACTION_ID%7D"), Headers = { { "Authorization", "Bearer 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f" }, }, Content = new StringContent("{\"name\":\"Create Ticket\",\"hint\":\"Convert this message into a support ticket\",\"scope\":\"organization\",\"multi_selectable\":false,\"message_types\":[\"text\",\"link\",\"attachment\"]}") { 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/messageactions/%7BMESSAGE_ACTION_ID%7D" payload := strings.NewReader("{\"name\":\"Create Ticket\",\"hint\":\"Convert this message into a support ticket\",\"scope\":\"organization\",\"multi_selectable\":false,\"message_types\":[\"text\",\"link\",\"attachment\"]}") 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": "Create Ticket", "hint": "Convert this message into a support ticket", "scope": "organization", "multi_selectable": false, "message_types": [ "text", "link", "attachment" ] }); 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/messageactions/%7BMESSAGE_ACTION_ID%7D"); xhr.setRequestHeader("Authorization", "Bearer 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f"); xhr.setRequestHeader("content-type", "application/json"); xhr.send(data);
curl --request PATCH \ --url https://cliq.zoho.com/api/v3/messageactions/%7BMESSAGE_ACTION_ID%7D \ --header 'Authorization: Bearer 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f' \ --header 'content-type: application/json' \ --data '{"name":"Create Ticket","hint":"Convert this message into a support ticket","scope":"organization","multi_selectable":false,"message_types":["text","link","attachment"]}'

Body Parameters

Click to copy
{ "name": "Create Ticket", "hint": "Convert this message into a support ticket - updated", "scope": "organization", "multi_selectable": false, "message_types": [ "text", "link", "attachment" ] }
{ "execution_url": "https://api.yourcompany.com/cliq/messageactions/updated-handler" }
{ "scope": "team", "team_ids": [ 100001, 100002 ], "multi_selectable": true, "message_types": [ "text" ] }

Response Example

{ "url": "/api/v3/messageactions/53719000002124010", "type": "messageaction", "data": { "name": "Create Ticket", "id": "53719000002124010", "hint": "Convert this message into a support ticket", "scope": "organization", "multi_selectable": false, "message_types": [ "text", "link", "attachment" ], "handlers": [ { "type": "execution_handler" } ], "creator": { "name": "James", "id": "65113112" }, "execution_type": "deluge", "status": "enabled", "type": "custom" } }
{ "url": "/api/v3/messageactions/53719000002124011", "type": "messageaction", "data": { "name": "Flag Message", "id": "53719000002124011", "hint": "Flag this message for review", "scope": "organization", "multi_selectable": false, "message_types": [ "text", "link", "attachment" ], "handlers": [ { "type": "execution_handler" } ], "creator": { "name": "James", "id": "65113112" }, "execution_type": "deluge", "status": "enabled", "type": "custom" } }
{ "url": "/api/v3/messageactions/53719000002124012", "type": "messageaction", "data": { "name": "Bulk Archive", "id": "53719000002124012", "hint": "Archive selected messages", "scope": "team", "team_ids": [ 100001, 100002 ], "multi_selectable": true, "message_types": [ "text" ], "handlers": [ { "type": "execution_handler" } ], "creator": { "name": "James", "id": "65113112" }, "execution_type": "deluge", "status": "enabled", "type": "custom" } }
{ "url": "/api/v3/messageactions/53719000002124013", "type": "messageaction", "data": { "name": "Translate", "id": "53719000002124013", "hint": "Translate selected message to English", "scope": "personal", "multi_selectable": false, "message_types": [ "text" ], "handlers": [ { "type": "execution_handler" } ], "creator": { "name": "James", "id": "65113112" }, "execution_type": "deluge", "status": "enabled", "type": "custom" } }
{ "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 message action 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 details of a specific message action.

Threshold limit: 10 requests per min per user
Maximum API calls allowed within one minute.

Lock period: 5 minutes
Cooldown period applied after threshold exhaustion.


Possible Error Codes

Error Code Description
msgaction_not_found Message action with the specified ID was not found.

Error Response Format

When an error occurs, the API returns a JSON response in this format:

{"message": "A human-readable description of the error.", "code": "error_code"}

where code is the error identifier (as listed in the table above) and message is a human-readable explanation of what went wrong.


OAuth Scope : ZohoCliq.messageactions.READ

Path Parameters

MESSAGE_ACTION_ID
string
(Required)
Unique numeric identifier of the message action. To learn how to retrieve this ID, see MESSAGE_ACTION_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/messageactions/987000000654321" type: GET headers: headers_data connection: <connection_name> ]; info response;
OkHttpClient client = new OkHttpClient(); Request request = new Request.Builder() .url("https://cliq.zoho.com/api/v3/messageactions/987000000654321") .get() .addHeader("Authorization", "Bearer 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f") .build(); Response response = client.newCall(request).execute();
const options = { method: 'GET', headers: { Authorization: 'Bearer 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f' } }; fetch('https://cliq.zoho.com/api/v3/messageactions/987000000654321', options) .then(response => response.json()) .then(response => console.log(response)) .catch(err => console.error(err));
import http.client conn = http.client.HTTPSConnection("cliq.zoho.com") headers = { 'Authorization': "Bearer 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f" } conn.request("GET", "/api/v3/messageactions/987000000654321", headers=headers) res = conn.getresponse() data = res.read() print(data.decode("utf-8"))
const http = require("https"); const options = { "method": "GET", "hostname": "cliq.zoho.com", "port": null, "path": "/api/v3/messageactions/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/messageactions/987000000654321"); var request = new RestRequest(Method.GET); request.AddHeader("Authorization", "Bearer 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f"); IRestResponse response = client.Execute(request);
var client = new HttpClient(); var request = new HttpRequestMessage { Method = HttpMethod.Get, RequestUri = new Uri("https://cliq.zoho.com/api/v3/messageactions/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/messageactions/987000000654321" req, _ := http.NewRequest("GET", url, nil) req.Header.Add("Authorization", "Bearer 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f") res, _ := http.DefaultClient.Do(req) defer res.Body.Close() body, _ := ioutil.ReadAll(res.Body) fmt.Println(res) fmt.Println(string(body)) }
const data = null; const xhr = new XMLHttpRequest(); xhr.withCredentials = true; xhr.addEventListener("readystatechange", function () { if (this.readyState === this.DONE) { console.log(this.responseText); } }); xhr.open("GET", "https://cliq.zoho.com/api/v3/messageactions/987000000654321"); xhr.setRequestHeader("Authorization", "Bearer 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f"); xhr.send(data);
curl --request GET \ --url https://cliq.zoho.com/api/v3/messageactions/987000000654321 \ --header 'Authorization: Bearer 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f'

Response Example

{ "url": "/api/v3/messageactions", "type": "messageaction", "data": { "multi_selectable": true, "name": "Create Ticket", "id": "53719000002124010", "handlers": [ { "type": "execution_handler" } ], "creator": { "name": "James", "id": "65113112" }, "execution_type": "deluge", "hint": "Create a helpdesk ticket", "status": "enabled", "type": "custom", "message_types": [ "text", "link" ], "scope": "organization" } }
{ "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 message action 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 Message Action and its associated handler.Deletion is irreversible and the message action will be removed from all message context menus.

Threshold limit: 10 requests per min per user
Maximum API calls allowed within one minute.

Lock period: 5 minutes
Cooldown period applied after threshold exhaustion.


Possible Error Codes

Error Code Description
msgaction_not_found Message action with the specified ID was not found.

Error Response Format

When an error occurs, the API returns a JSON response in this format:

{"message": "A human-readable description of the error.", "code": "error_code"}

where code is the error identifier (as listed in the table above) and message is a human-readable explanation of what went wrong.


OAuth Scope : ZohoCliq.messageactions.DELETE

Path Parameters

MESSAGE_ACTION_ID
string
(Required)
Unique numeric identifier of the message action. To learn how to retrieve this ID, see MESSAGE_ACTION_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/messageactions/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/messageactions/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/messageactions/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/messageactions/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/messageactions/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/messageactions/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/messageactions/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/messageactions/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/messageactions/987000000654321"); xhr.setRequestHeader("Authorization", "Bearer 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f"); xhr.send(data);
curl --request DELETE \ --url https://cliq.zoho.com/api/v3/messageactions/987000000654321 \ --header 'Authorization: Bearer 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f'

Response Example

{ "message": "The request cannot be performed. Usually because of malformed parameter or missing parameter." }
{ "message": "Request was rejected because of invalid AuthToken." }
{ "message": "The user does not have enough permission or possibly not an user of the respective organization to access the resource." }
{ "message": "The URL you've sent is wrong. It's possible that the resource you've requested has been moved to another URL." }
{ "message": "The requested resource does not support the HTTP method used. For example, requesting List of all customers API with PUT as the HTTP method." }
{ "message": "The response has been received but the requested response type is not supported by the browser." }
{ "message": "Too many requests within a certain time frame." }
{ "message": "Cliq server encountered an error which prevents it from fulfilling the request." }

Update a handler for a specific message action 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 message action. What you provide depends on the action's execution type:

  • Deluge message action: Update the script attribute with the revised Deluge source code to execute when the action fires.
  • Webhook message action: Update the permissions array to change which data attributes are forwarded to your server. All 5 permissions are available for message action handlers.

Threshold limit: 10 requests per min per user
Maximum API calls allowed within one minute.

Lock period: 5 minutes
Cooldown period applied after threshold exhaustion.


Possible Error Codes

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

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

Arguments

script
string
Updated Deluge script for the execution handler. This script is executed when the message action is invoked by users.
Maximum size: 250KB.
Note: Applicable only for Deluge message actions.
permissions
array
Updated list of data attributes to forward to your server in the webhook payload.
Note: Applicable only for Webhook message actions.
Message action handlers support all 5 permissions.
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.

Path Parameters

HANDLER_TYPE
string
(Required)
Type of the message action handler. The only supported value is execution_handler, which is triggered when the message action is invoked.
MESSAGE_ACTION_ID
string
(Required)
Unique numeric identifier of the message action. To learn how to retrieve this ID, see MESSAGE_ACTION_ID in the Glossary page.

Request Example

Click to copy
parameters_data='{"script":"string","permissions":["chat"]}'; headers_data = Map(); headers_data.put("Authorization", "Bearer 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f"); response = invokeUrl [ url: "https://cliq.zoho.com/api/v3/messageactions/%7BMESSAGE_ACTION_ID%7D/handlers/%7BHANDLER_TYPE%7D" type: PATCH headers: headers_data content-type: application/json parameters: parameters_data connection: <connection_name> ]; info response;
OkHttpClient client = new OkHttpClient(); MediaType mediaType = MediaType.parse("application/json"); RequestBody body = RequestBody.create(mediaType, "{\"script\":\"string\",\"permissions\":[\"chat\"]}"); Request request = new Request.Builder() .url("https://cliq.zoho.com/api/v3/messageactions/%7BMESSAGE_ACTION_ID%7D/handlers/%7BHANDLER_TYPE%7D") .patch(body) .addHeader("Authorization", "Bearer 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f") .addHeader("content-type", "application/json") .build(); Response response = client.newCall(request).execute();
const options = { method: 'PATCH', headers: { Authorization: 'Bearer 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f', 'content-type': 'application/json' }, body: '{"script":"string","permissions":["chat"]}' }; fetch('https://cliq.zoho.com/api/v3/messageactions/%7BMESSAGE_ACTION_ID%7D/handlers/%7BHANDLER_TYPE%7D', options) .then(response => response.json()) .then(response => console.log(response)) .catch(err => console.error(err));
import http.client conn = http.client.HTTPSConnection("cliq.zoho.com") payload = "{\"script\":\"string\",\"permissions\":[\"chat\"]}" headers = { 'Authorization': "Bearer 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f", 'content-type': "application/json" } conn.request("PATCH", "/api/v3/messageactions/%7BMESSAGE_ACTION_ID%7D/handlers/%7BHANDLER_TYPE%7D", payload, headers) res = conn.getresponse() data = res.read() print(data.decode("utf-8"))
const http = require("https"); const options = { "method": "PATCH", "hostname": "cliq.zoho.com", "port": null, "path": "/api/v3/messageactions/%7BMESSAGE_ACTION_ID%7D/handlers/%7BHANDLER_TYPE%7D", "headers": { "Authorization": "Bearer 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f", "content-type": "application/json" } }; const req = http.request(options, function (res) { const chunks = []; res.on("data", function (chunk) { chunks.push(chunk); }); res.on("end", function () { const body = Buffer.concat(chunks); console.log(body.toString()); }); }); req.write(JSON.stringify({script: 'string', permissions: ['chat']})); req.end();
var client = new RestClient("https://cliq.zoho.com/api/v3/messageactions/%7BMESSAGE_ACTION_ID%7D/handlers/%7BHANDLER_TYPE%7D"); var request = new RestRequest(Method.PATCH); request.AddHeader("Authorization", "Bearer 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f"); request.AddHeader("content-type", "application/json"); request.AddParameter("application/json", "{\"script\":\"string\",\"permissions\":[\"chat\"]}", ParameterType.RequestBody); IRestResponse response = client.Execute(request);
var client = new HttpClient(); var request = new HttpRequestMessage { Method = HttpMethod.Patch, RequestUri = new Uri("https://cliq.zoho.com/api/v3/messageactions/%7BMESSAGE_ACTION_ID%7D/handlers/%7BHANDLER_TYPE%7D"), Headers = { { "Authorization", "Bearer 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f" }, }, Content = new StringContent("{\"script\":\"string\",\"permissions\":[\"chat\"]}") { Headers = { ContentType = new MediaTypeHeaderValue("application/json") } } }; using (var response = await client.SendAsync(request)) { response.EnsureSuccessStatusCode(); var body = await response.Content.ReadAsStringAsync(); Console.WriteLine(body); }
package main import ( "fmt" "strings" "net/http" "io/ioutil" ) func main() { url := "https://cliq.zoho.com/api/v3/messageactions/%7BMESSAGE_ACTION_ID%7D/handlers/%7BHANDLER_TYPE%7D" payload := strings.NewReader("{\"script\":\"string\",\"permissions\":[\"chat\"]}") req, _ := http.NewRequest("PATCH", url, payload) req.Header.Add("Authorization", "Bearer 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f") req.Header.Add("content-type", "application/json") res, _ := http.DefaultClient.Do(req) defer res.Body.Close() body, _ := ioutil.ReadAll(res.Body) fmt.Println(res) fmt.Println(string(body)) }
const data = JSON.stringify({ "script": "string", "permissions": [ "chat" ] }); const xhr = new XMLHttpRequest(); xhr.withCredentials = true; xhr.addEventListener("readystatechange", function () { if (this.readyState === this.DONE) { console.log(this.responseText); } }); xhr.open("PATCH", "https://cliq.zoho.com/api/v3/messageactions/%7BMESSAGE_ACTION_ID%7D/handlers/%7BHANDLER_TYPE%7D"); xhr.setRequestHeader("Authorization", "Bearer 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f"); xhr.setRequestHeader("content-type", "application/json"); xhr.send(data);
curl --request PATCH \ --url https://cliq.zoho.com/api/v3/messageactions/%7BMESSAGE_ACTION_ID%7D/handlers/%7BHANDLER_TYPE%7D \ --header 'Authorization: Bearer 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f' \ --header 'content-type: application/json' \ --data '{"script":"string","permissions":["chat"]}'

Body Parameters

Click to copy
{ "script": "response = Map();\nmessage = info.get(\"message\").get(\"text\");\nresponse.put(\"text\", \"Ticket created for: \" + message);\nreturn response;\n" }
{ "permissions": [ "chat", "message", "user", "attachments" ] }

Response Example

{ "url": "/api/v3/messageactions/53719000002124010/handlers/execution_handler", "type": "execution_handler", "data": { "name": "execution_handler", "script": "response = Map();\nmessage = info.get(\"message\").get(\"text\");\nresponse.put(\"text\", \"Ticket created for: \" + message);\nreturn response;\n", "function_id": "53719000002124010" } }
{ "url": "/api/v3/messageactions/53719000002124011/handlers/execution_handler", "type": "execution_handler", "data": { "name": "execution_handler", "permissions": [ "chat", "message", "user", "attachments" ], "function_id": "53719000002124011" } }
{ "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 message action handler AI Tools

Open in ChatGPT

Open in ChatGPT to ask questions about this page

Open in Claude

Open in Claude to ask questions about this page

Copy as Markdown

Copy this page as markdown to use with AI assistants

View as Markdown

Open this page as markdown in a new tab

Retrieve the configuration and Deluge source code of the execution handler attached to a specific Message Action.

Threshold limit: 10 requests per min per user
Maximum API calls allowed within one minute.

Lock period: 5 minutes
Cooldown period applied after threshold exhaustion.


Possible Error Codes

Error Code Description
execution_handler_get_failed Failed to fetch the execution handler.
execution_handler_not_found Specified handler was not found for this message action.

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

Path Parameters

HANDLER_TYPE
string
(Required)
Type of the message action handler. The only supported value is execution_handler, which is triggered when the message action is invoked.
MESSAGE_ACTION_ID
string
(Required)
Unique numeric identifier of the message action. To learn how to retrieve this ID, see MESSAGE_ACTION_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/messageactions/987000000654321/handlers/987000000654321" type: GET headers: headers_data connection: <connection_name> ]; info response;
OkHttpClient client = new OkHttpClient(); Request request = new Request.Builder() .url("https://cliq.zoho.com/api/v3/messageactions/987000000654321/handlers/987000000654321") .get() .addHeader("Authorization", "Bearer 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f") .build(); Response response = client.newCall(request).execute();
const options = { method: 'GET', headers: { Authorization: 'Bearer 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f' } }; fetch('https://cliq.zoho.com/api/v3/messageactions/987000000654321/handlers/987000000654321', options) .then(response => response.json()) .then(response => console.log(response)) .catch(err => console.error(err));
import http.client conn = http.client.HTTPSConnection("cliq.zoho.com") headers = { 'Authorization': "Bearer 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f" } conn.request("GET", "/api/v3/messageactions/987000000654321/handlers/987000000654321", headers=headers) res = conn.getresponse() data = res.read() print(data.decode("utf-8"))
const http = require("https"); const options = { "method": "GET", "hostname": "cliq.zoho.com", "port": null, "path": "/api/v3/messageactions/987000000654321/handlers/987000000654321", "headers": { "Authorization": "Bearer 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f" } }; const req = http.request(options, function (res) { const chunks = []; res.on("data", function (chunk) { chunks.push(chunk); }); res.on("end", function () { const body = Buffer.concat(chunks); console.log(body.toString()); }); }); req.end();
var client = new RestClient("https://cliq.zoho.com/api/v3/messageactions/987000000654321/handlers/987000000654321"); var request = new RestRequest(Method.GET); request.AddHeader("Authorization", "Bearer 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f"); IRestResponse response = client.Execute(request);
var client = new HttpClient(); var request = new HttpRequestMessage { Method = HttpMethod.Get, RequestUri = new Uri("https://cliq.zoho.com/api/v3/messageactions/987000000654321/handlers/987000000654321"), Headers = { { "Authorization", "Bearer 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f" }, }, }; using (var response = await client.SendAsync(request)) { response.EnsureSuccessStatusCode(); var body = await response.Content.ReadAsStringAsync(); Console.WriteLine(body); }
package main import ( "fmt" "net/http" "io/ioutil" ) func main() { url := "https://cliq.zoho.com/api/v3/messageactions/987000000654321/handlers/987000000654321" req, _ := http.NewRequest("GET", url, nil) req.Header.Add("Authorization", "Bearer 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f") res, _ := http.DefaultClient.Do(req) defer res.Body.Close() body, _ := ioutil.ReadAll(res.Body) fmt.Println(res) fmt.Println(string(body)) }
const data = null; const xhr = new XMLHttpRequest(); xhr.withCredentials = true; xhr.addEventListener("readystatechange", function () { if (this.readyState === this.DONE) { console.log(this.responseText); } }); xhr.open("GET", "https://cliq.zoho.com/api/v3/messageactions/987000000654321/handlers/987000000654321"); xhr.setRequestHeader("Authorization", "Bearer 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f"); xhr.send(data);
curl --request GET \ --url https://cliq.zoho.com/api/v3/messageactions/987000000654321/handlers/987000000654321 \ --header 'Authorization: Bearer 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f'

Response Example

{ "url": "string", "type": "execution_handler", "data": {...} }
{ "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." }