{ "$schema": "http://json-schema.org/draft-07/schema#", "title": "Zoho Cliq Buttons Schemas", "definitions": { "empty-response": { "type": "object", "description": "Response returned when there is no content.", "properties": { "Response_Code": { "type": "string", "example": "204 No response" } } }, "instant-buttons-request": { "type": "object", "required": [ "text", "references" ], "properties": { "text": { "type": "string", "description": "The text content of the message with inline button references.
\nUse the format [Button Label]($reference-key) to embed buttons within the text.
\nMaximum length: 10,000 characters.\n", "maxLength": 10000, "example": "Who's up for lunch after the match on Friday? [Yes]($1) [Call Support]($2) [Copy Details]($3)" }, "references": { "type": "object", "description": "An object containing button definitions referenced in the message text.
\n\n", "properties": { "reference_key": { "type": "object", "description": "Each reference key (e.g., \"1\", \"2\", \"3\") maps to a button definition object.
\n\n", "required": [ "type", "object" ], "properties": { "type": { "type": "string", "enum": [ "button" ], "description": "The type of reference. For buttons, this must be \"button\".\n", "example": "button" }, "object": { "type": "object", "description": "The button object containing the button's configuration.\n", "required": [ "label", "action" ], "properties": { "label": { "type": "string", "maxLength": 20, "description": "The display name of the button.
\nMaximum number of characters allowed: 20\n", "example": "Yes" }, "type": { "type": "string", "enum": [ "+", "-" ], "description": "The visual style of the button.
\n\"+\" renders a positive (green outline) button.
\n\"-\" renders a negative (red outline) button.\n", "example": "+" }, "action": { "type": "object", "description": "An object containing the type of action the button should perform.\n", "required": [ "type", "data" ], "properties": { "type": { "type": "string", "description": "The action type for the button.
\nAllowed values:\n\n", "enum": [ "invoke.function", "system.api", "copy" ], "example": "invoke.function" }, "data": { "type": "object", "description": "An object with properties for each action type.

\n
Data object when the button action type is invoke.function:

\n\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n
AttributeTypeDescription
name*stringThe unique name of the function to be invoked.
ownerstringThe email ID of the function owner (optional if the function is created by the same user).
\n
\n
Data object when the button action type is system.api:

\n\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n
AttributeTypeDescription
api*string\n Specifies the system action to be executed.

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

\n Format: system_action/{zuid}
\n Where {zuid} is the Zoho User ID of the user to whom the system action should be performed.\n
\n
\n
Data object when the button action type is copy:

\n\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n
AttributeTypeDescription
text*string\n The text that will be copied to the user's clipboard when the button is clicked.

\n Maximum length: 200 characters.\n
\n", "example": { "name": "teammatch" } } } }, "arguments": { "type": "object", "description": "Optional custom arguments to be passed to the invoked function.
\nThis can contain any key-value pairs required by your function.\n", "additionalProperties": true, "example": { "key_1": "value_1", "key_2": "value_2", "key_3": "value_3" } } } } } } } } }, "example": { "text": "Who's up for lunch after the match on Friday? [Yes]($1) [Call Support]($2) [Copy Details]($3)", "references": { "1": { "type": "button", "object": { "label": "Yes", "action": { "type": "invoke.function", "data": { "name": "teammatch" } }, "type": "+" } }, "2": { "type": "button", "object": { "label": "Call Support", "action": { "type": "system.api", "data": { "api": "videocall/12345678" } }, "type": "+" } }, "3": { "type": "button", "object": { "label": "Copy Details", "action": { "type": "copy", "data": { "text": "Match Details: Friday 6 PM at Central Stadium" } }, "type": "+" } } } } }, "instant-buttons-with-arguments-request": { "type": "object", "description": "Example demonstrating instant buttons with custom arguments and system API actions.\n", "required": [ "text", "references" ], "properties": { "text": { "type": "string", "example": "[Help]($1) [Call Support]($2)" }, "references": { "type": "object", "additionalProperties": true } }, "example": { "text": "[Help]($1) [Call Support]($2)", "references": { "1": { "type": "button", "object": { "label": "Help", "type": "+", "action": { "type": "invoke.function", "data": { "name": "HelpMessageFunctionName", "owner": "user@email.com" } }, "arguments": { "key_1": "value_1", "key_2": "value_2", "key_3": "value_3" } } }, "2": { "type": "button", "object": { "label": "Call Support", "type": "+", "action": { "type": "system.api", "data": { "api": "videocall/12345678" } } } } } } }, "message-card-buttons-request": { "type": "object", "required": [ "text" ], "properties": { "text": { "type": "string", "description": "The text content of the message to be sent.
\nMaximum length: 10,000 characters.\n", "maxLength": 10000, "example": "New interns will be joining these teams from July." }, "card": { "type": "object", "description": "An optional object that defines the visual presentation of the message card.\n", "properties": { "title": { "type": "string", "description": "The title of the message card.\n", "example": "ANNOUNCEMENT" }, "theme": { "type": "string", "description": "The visual theme of the message card.
\nAllowed values: modern-inline | poll | prompt\n", "example": "modern-inline" }, "thumbnail": { "type": "string", "format": "uri", "description": "The URL of the thumbnail image for the message card.\n", "example": "https://www.zoho.com/cliq/help/restapi/images/announce_icon.png" } } }, "buttons": { "type": "array", "maxItems": 5, "description": "An array of button objects that define the interactive buttons to be attached to the message card.
\nA maximum of 5 buttons can be included.\n", "items": { "type": "object", "required": [ "label", "type", "action" ], "properties": { "label": { "type": "string", "maxLength": 20, "description": "The display name of the button.
\nMaximum number of characters allowed: 20 \n" }, "hint": { "type": "string", "maxLength": 100, "description": "A tool tip indicating the button's function while hovering over.
\nMaximum number of characters allowed: 100\n" }, "type": { "type": "string", "enum": [ "+", "-" ], "description": "\"+\" renders a positive (green outline) button. \"-\" renders a negative (red outline) button. \n" }, "key": { "type": "string", "maxLength": 100, "description": "Unique identifier for each button. This key can be defined to easily identify and differentiate the buttons clicked and execute the functionality. \nMaximum number of characters allowed: 100\n" }, "action": { "type": "object", "description": "An object containing the type of action the button should perform.\n", "required": [ "type", "data" ], "properties": { "type": { "type": "string", "description": "The action type for a button. \nAllowed values:\n\n", "enum": [ "invoke.function", "open.url", "system.api", "preview.url", "copy" ] }, "data": { "type": "object", "description": "An object with properties for each action type. The required properties depend on the action type specified.
\n
Data object when the button action type is invoke.function:

\n\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n
AttributeTypeDescription
name*stringName of the function to be invoked.
owner*stringThe email address of the function creator.
\n\n
Data object when the button action type is open.url:

\n\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n
AttributeTypeDescription
webstring (URL)\n The URL to be opened when the button is clicked.

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

\n Maximum length: 256 characters.\n
windowsstring (URL)\n The URL to be opened on Windows mobile devices.

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

\n Maximum length: 256 characters.\n
androidstring (URL)\n The URL to be opened on Android mobile devices.

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

\n Maximum length: 500 characters.\n
\n\n
Data object when the button action type is system.api:
\n\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n
AttributeTypeDescription
api*string\n Specifies the system action to be executed.

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

\n Supported system actions and formats:

\n \u2022 audiocall/zuid \u2013 Initiates an audio call with the specified user.

\n \u2022 videocall/zuid \u2013 Initiates a video call with the specified user.

\n \u2022 startchat/zuid \u2013 Starts a direct chat with the specified user.

\n \u2022 invite/zuid \u2013 Sends a contact invitation to the specified user.

\n \u2022 locationpermission \u2013 Requests location access permission from the user.

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

\n\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n
AttributeTypeDescription
text*string\n The text that will be copied to the user's clipboard when the button is clicked.

\n Maximum length: 200 characters.\n
\n" } } } } } }, "confirm": { "type": "object", "description": "Properties of the confirmation dialog box before the action is executed. It can be included based on the requirement.\n", "required": [ "title", "input", "button_label" ], "properties": { "title": { "type": "string", "maxLength": 100, "description": "Confirmation dialog box title before the action is executed. Maximum number of characters allowed : 100\n" }, "description": { "type": "string", "maxLength": 100, "description": "Confirmation message displayed before the action is executed. Maximum number of characters allowed : 100\n" }, "input": { "type": "string", "maxLength": 300, "description": "The input text prompt present in the confirmation dialog box. Maximum number of characters allowed : 300\nThis input field is used to collect user input ( For example : authentication key or feedback ) during confirmation or cancellation action.\n" }, "emotion": { "type": "string", "enum": [ "positive", "neutral", "negative" ], "description": "(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.\n" }, "button_label": { "type": "string", "maxLength": 100, "description": "Label of the button present in the confirmation box. Maximum number of characters allowed : 100\n" }, "cancel_button_label": { "type": "string", "maxLength": 100, "description": "Label of the cancel button present in the confirmation box. Maximum number of characters allowed : 100\n" }, "mandatory": { "type": "string", "enum": [ "true", "false" ], "description": "(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.\n" } } } }, "example": { "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" } } } ] } }, "confirmation-popup-request": { "type": "object", "required": [ "text" ], "properties": { "text": { "type": "string", "description": "The text content of the message to be sent.
\nMaximum length: 10,000 characters.\n", "maxLength": 10000, "example": "New interns will be joining these teams from July." }, "card": { "type": "object", "description": "An optional object that defines the visual presentation of the message card.\n", "properties": { "title": { "type": "string", "description": "The title of the message card.\n", "example": "ANNOUNCEMENT" }, "theme": { "type": "string", "description": "The visual theme of the message card.
\nAllowed values: modern-inline | poll | prompt\n", "example": "modern-inline" }, "thumbnail": { "type": "string", "format": "uri", "description": "The URL of the thumbnail image for the message card.\n", "example": "https://www.zoho.com/cliq/help/restapi/images/announce_icon.png" } } }, "buttons": { "type": "array", "maxItems": 5, "description": "An array of button objects that define the interactive buttons to be attached to the message card.
\nA maximum of 5 buttons can be included.\n", "items": { "type": "object", "required": [ "label", "type", "action" ], "properties": { "label": { "type": "string", "maxLength": 20, "description": "The display name of the button.
\nMaximum number of characters allowed: 20 \n" }, "hint": { "type": "string", "maxLength": 100, "description": "A tool tip indicating the button's function while hovering over.
\nMaximum number of characters allowed: 100\n" }, "type": { "type": "string", "enum": [ "+", "-" ], "description": "\"+\" renders a positive (green outline) button. \"-\" renders a negative (red outline) button. \n" }, "key": { "type": "string", "maxLength": 100, "description": "Unique identifier for each button. This key can be defined to easily identify and differentiate the buttons clicked and execute the functionality. \nMaximum number of characters allowed: 100\n" }, "action": { "type": "object", "description": "An object containing the type of action the button should perform.\n", "required": [ "type", "data" ], "properties": { "type": { "type": "string", "description": "The action type for a button. \nAllowed values: invoke.function | open.url | system.api | preview.url | copy\n", "enum": [ "invoke.function", "open.url", "system.api", "preview.url", "copy" ] }, "data": { "type": "object", "description": "An object with properties for each action type. The required properties depend on the action type specified.
\n" } } } } } }, "confirm": { "type": "object", "description": "Properties of the confirmation dialog box before the action is executed. It can be included based on the requirement.\n", "required": [ "title", "input", "button_label" ], "properties": { "title": { "type": "string", "maxLength": 100, "description": "Confirmation dialog box title before the action is executed. Maximum number of characters allowed : 100\n" }, "description": { "type": "string", "maxLength": 100, "description": "Confirmation message displayed before the action is executed. Maximum number of characters allowed : 100\n" }, "input": { "type": "string", "maxLength": 300, "description": "The input text prompt present in the confirmation dialog box. Maximum number of characters allowed : 300\nThis input field is used to collect user input ( For example : authentication key or feedback ) during confirmation or cancellation action.\n" }, "emotion": { "type": "string", "enum": [ "positive", "neutral", "negative" ], "description": "(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.\n" }, "button_label": { "type": "string", "maxLength": 100, "description": "Label of the button present in the confirmation box. Maximum number of characters allowed : 100\n" }, "cancel_button_label": { "type": "string", "maxLength": 100, "description": "Label of the cancel button present in the confirmation box. Maximum number of characters allowed : 100\n" }, "mandatory": { "type": "string", "enum": [ "true", "false" ], "description": "(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. \n" } } } }, "example": { "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" } } } ] } } } }