Buttons

Buttons 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

Buttons enable you to attach interactive actions directly to a message, allowing users to respond or perform tasks. A button can trigger predefined actions such as executing a function, opening a URL, calling a system API, copying content, or previewing a URL.
There are two ways buttons can be designed in a message:

  1. Instant Buttons - A simple and quick-to-use format.
  2. Message Card Buttons - A structured and visually organized card format.
The functionality of instant buttons and message card buttons is the same; the only difference is their ease of use. Instant buttons have a deceptively simple format, making them quick to use.

Download Buttons OpenAPI Document
End Points

Message card buttons 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 cards can be made interactive by attaching buttons to them. These buttons allow users to perform actions directly from the card without leaving the conversation.

A single message card can include a maximum of 5 buttons. To learn how to retrieve this ID, see CHAT_ID in the Glossary page.
OAuth Scope : ZohoCliq.Webhooks.CREATE

Arguments

text
string
(Required)
The text content of the message to be sent.
Maximum length: 10,000 characters.
card
object
An optional object that defines the visual presentation of the message card.
Show Sub-Attributes arrow
title
string
The title of the message card.
theme
string
The visual theme of the message card.
Allowed values: modern-inline | poll | prompt
thumbnail
uri
The URL of the thumbnail image for the message card.
buttons
array
An array of button objects that define the interactive buttons to be attached to the message card.
A maximum of 5 buttons can be included.
Show Sub-Attributes arrow
label
string
(Required)
The display name of the button.
Maximum number of characters allowed: 20
hint
string
A tool tip indicating the button's function while hovering over.
Maximum number of characters allowed: 100
type
string
(Required)
"+" renders a positive (green outline) button. "-" renders a negative (red outline) button.
key
string
Unique identifier for each button. This key can be defined to easily identify and differentiate the buttons clicked and execute the functionality. Maximum number of characters allowed: 100
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. Allowed values:
  • invoke.function: Executes a predefined function created in Cliq Developer Console or Bots and tools.
  • open.url: Opens a specified URL in a new browser tab or window.
  • system.api: Calls a predefined system API to perform specific actions within Cliq
  • preview.url: Displays a preview of the specified URL within Cliq.
  • copy: Copies specified text to the user's clipboard.
data
object
(Required)
An object with properties for each action type. The required properties depend on the action type specified.
Data object when the button action type is invoke.function:

Attribute Type Description
name* string Name of the function to be invoked.
owner* string The email address of the function creator.
Data object when the button action type is open.url:

Attribute Type Description
web string (URL) The URL to be opened when the button is clicked.

Supported protocols: http | https | tel | sms | sip

Maximum length: 256 characters.
windows string (URL) The URL to be opened on Windows mobile devices.

Maximum length: 256 characters.
iOS string (URL) The URL to be opened on iOS mobile devices.

Maximum length: 256 characters.
android string (URL) The URL to be opened on Android mobile devices.

Maximum length: 256 characters.
Data object when the button action type is preview.url:
Attribute Type Description
url* string Iframe URL used to play a video or render a webpage within the chat interface.

Maximum length: 500 characters.
Data object when the button action type is system.api:
Attribute Type Description
api* string Specifies the system action to be executed.

Allowed values: audiocall | videocall | startchat | invite | locationpermission

Supported system actions and formats:

• audiocall/zuid – Initiates an audio call with the specified user.

• videocall/zuid – Initiates a video call with the specified user.

• startchat/zuid – Starts a direct chat with the specified user.

• invite/zuid – Sends a contact invitation to the specified user.

• locationpermission – Requests location access permission from the user.

Format: system action/{zuid}
Data object when the button action type is copy:

Attribute Type Description
text* string The text that will be copied to the user's clipboard when the button is clicked.

Maximum length: 200 characters.
confirm
object
Properties of the confirmation dialog box before the action is executed. It can be included based on the requirement.
Show Sub-Attributes arrow
title
string
(Required)
Confirmation dialog box title before the action is executed. Maximum number of characters allowed : 100
description
string
Confirmation message displayed before the action is executed. Maximum number of characters allowed : 100
input
string
(Required)
The input text prompt present in the confirmation dialog box. Maximum number of characters allowed : 300 This input field is used to collect user input ( For example : authentication key or feedback ) during confirmation or cancellation action.
emotion
string
(Optional) To set the visual style of the confirmation dialog box. Allowed Values : positive | neutral | negative If key is not provided, the theme of the dialog box will be set as positive by default.
button_label
string
(Required)
Label of the button present in the confirmation box. Maximum number of characters allowed : 100
cancel_button_label
string
Label of the cancel button present in the confirmation box. Maximum number of characters allowed : 100
mandatory
string
(Optional) To specify whether the input field is required or not. Allowed Values : true | false When set to true, an error must be thrown if the user does not provide any input.

Path Parameters

CHAT_ID
string
(Required)
Unique identifier of the chat where the message needs to be sent.

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

Body Parameters

Click to copy
{ "text": "You are invited to the Sales Annual Strategy Meet 2024. Please review the agenda and confirm your participation.", "card": { "theme": "modern-inline", "thumbnail": "/cliq/help/restapi/images/cliq_icon.png" }, "buttons": [ { "label": "View Agenda", "type": "+", "key": "view_agenda", "action": { "type": "open.url", "data": { "web": "https://events.zylker.com/sales-meet-2024" } } }, { "label": "Add to Calendar", "type": "+", "key": "calendar_invite", "action": { "type": "invoke.function", "data": { "name": "add_sales_meet_calendar", "owner": "events@zylker.com" } } }, { "label": "Join Virtual Meet", "type": "+", "key": "join_meet", "action": { "type": "system.api", "data": { "api": "videocall/9876543210" } } }, { "label": "Watch Promo", "type": "+", "key": "preview_video", "action": { "type": "preview.url", "data": { "url": "https://media.zylker.com/sales-meet-promo" } } }, { "label": "Copy Event ID", "type": "+", "key": "copy_event_id", "action": { "type": "copy", "data": { "text": "SALES-MEET-2024" } } } ] }

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

Confirmation popup 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

The confirmation popup displays a dialogue box before executing a button action. It is used to collect user confirmation and optional input (such as authentication keys, feedback, or remarks) before proceeding.

This object is optional and can be included in the button's action object attributes as a JSON object called "confirm." It contains properties for the confirmation dialogue that appears before the action is executed.

You can include this based on your specific requirements. When configured, the action will only execute after the user confirms their choice. To learn how to retrieve this ID, see CHAT_ID in the Glossary page.
OAuth Scope : ZohoCliq.Webhooks.CREATE

Arguments

text
string
(Required)
The text content of the message to be sent.
Maximum length: 10,000 characters.
card
object
An optional object that defines the visual presentation of the message card.
Show Sub-Attributes arrow
title
string
The title of the message card.
theme
string
The visual theme of the message card.
Allowed values: modern-inline | poll | prompt
thumbnail
uri
The URL of the thumbnail image for the message card.
buttons
array
An array of button objects that define the interactive buttons to be attached to the message card.
A maximum of 5 buttons can be included.
Show Sub-Attributes arrow
label
string
(Required)
The display name of the button.
Maximum number of characters allowed: 20
hint
string
A tool tip indicating the button's function while hovering over.
Maximum number of characters allowed: 100
type
string
(Required)
"+" renders a positive (green outline) button. "-" renders a negative (red outline) button.
key
string
Unique identifier for each button. This key can be defined to easily identify and differentiate the buttons clicked and execute the functionality. Maximum number of characters allowed: 100
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. Allowed values: invoke.function | open.url | system.api | preview.url | copy
data
object
(Required)
An object with properties for each action type. The required properties depend on the action type specified.
confirm
object
Properties of the confirmation dialog box before the action is executed. It can be included based on the requirement.
Show Sub-Attributes arrow
title
string
(Required)
Confirmation dialog box title before the action is executed. Maximum number of characters allowed : 100
description
string
Confirmation message displayed before the action is executed. Maximum number of characters allowed : 100
input
string
(Required)
The input text prompt present in the confirmation dialog box. Maximum number of characters allowed : 300 This input field is used to collect user input ( For example : authentication key or feedback ) during confirmation or cancellation action.
emotion
string
(Optional) To set the visual style of the confirmation dialog box. Allowed Values : positive | neutral | negative If key is not provided, the theme of the dialog box will be set as positive by default.
button_label
string
(Required)
Label of the button present in the confirmation box. Maximum number of characters allowed : 100
cancel_button_label
string
Label of the cancel button present in the confirmation box. Maximum number of characters allowed : 100
mandatory
string
(Optional) To specify whether the input field is required or not. Allowed Values : true | false When set to true, an error must be thrown if the user does not provide any input.

Path Parameters

CHAT_ID1
string
(Required)
Unique identifier of the chat where the message needs to be sent. To learn how to retrieve this ID, see CHAT_ID in the Glossary page.

Note: CHAT_ID1 is a documentation alias for CHAT_ID, used to document the "Confirmation popup" variation separately while sharing the same /chats/{CHAT_ID}/messages endpoint, since the path is unchanged and only the request payload includes the confirm object.

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

Body Parameters

Click to copy
{ "text": "The Q4 marketing budget is ready for review.", "card": { "title": "Q4 Budget Proposal", "theme": "modern-inline" }, "hint": "Please review the allocation details before approval.", "buttons": [ { "label": "Approve Budget", "type": "+", "key": "approve_budget_q4", "action": { "type": "invoke.function", "data": { "name": "approve_q4_budget", "owner": "finance@zylker.com" }, "confirm": { "title": "Finalize Budget Approval", "description": "Please provide approval remarks before proceeding.", "input": "Enter approval remarks", "emotion": "positive", "button_label": "Confirm Approval", "cancel_button_label": "Review Again", "mandatory": "true" } } } ] }

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