{
"$schema": "http://json-schema.org/draft-07/schema#",
"title": "Zoho Cliq Bots Schemas",
"definitions": {
"BotIncomingWebhookRequest": {
"type": "object",
"description": "Request body for the incoming webhook endpoint. Accepts any number of custom key-value parameters that are passed directly to the bot's incoming_webhook_handler Deluge script. Up to 50 additional parameters are supported, each with a maximum value length of 10,000 characters. There are no fixed or required fields.\n",
"properties": {
"custom_parameters": {
"type": "object",
"description": "Pass additional key-value pairs in the request body to provide context to the bot's handler. These parameters are user-defined and can carry any metadata relevant to your integration.\n
\nRules for Custom Parameters\n
tick, preview, url).\nView supported icons\n"
},
"hint": {
"type": "string",
"maxLength": 100,
"description": "Tooltip or additional message (optional).deluge: Bot handlers will be implemented using Deluge scripts, allowing for complex logic and integration with Zoho services.webhook: Bot handlers will trigger external webhooks, enabling integration with third-party services and custom backend logic.webhook. \nunique_name (used to identify the bot in API calls) is auto-assigned by Cliq on creation and cannot be changed, even if the display name is updated.organization: Bot is available to all users in the organization.team: Bot is available only to specified teams within the organization.personal: Bot is available only to the creator but can be shared with other users.scope is set to team.team.\n",
"items": {
"type": "integer",
"example": 12345678
}
},
"status_messages": {
"type": "array",
"maxItems": 10,
"description": "Status messages shown for the bot. These messages will be displayed in the bot's profile or when users interact with the bot.listen_message: Bot can listen to messages in channels.send_message: Bot can send messages to channels.auto_follow_thread: Bot will automatically follow threads it participates in.enabled, the bot's Call Handler becomes active and triggers on call state events: ringing, answered, ended, declined, missed, offline, and busy.enabled: Bot can initiate voice calls to users. Bot calls override the recipient's Do Not Disturb setting, ensuring delivery of critical alerts.disabled: Bot cannot initiate voice calls.calls is enabled, you can optionally add a call_handler to the bot to handle call state events programmatically.unique_name, which is permanently assigned by Cliq and cannot be changed.organization: Bot is available to all users in the organization.team: Bot is available only to specified teams within the organization.personal: Bot is available only to the creator but can be shared with other users.scope is set to team.team.\n",
"items": {
"type": "integer"
}
},
"status_messages": {
"type": "array",
"maxItems": 10,
"description": "Status messages shown for the bot. These messages will be displayed in the bot's profile or when users interact with the bot.listen_message: Bot can listen to messages in channels.send_message: Bot can send messages to channels.auto_follow_thread: Bot will automatically follow threads it participates in.enable, the bot can initiate voice alerts to users and its Call Handler becomes active, firing on call state events: ringing, answered, ended, declined, missed, offline, and busy.enabled: Bot can initiate voice calls. Calls override the recipient's Do Not Disturb setting.disabled: Bot cannot initiate voice calls.welcome_handler: Executes when a user subscribes to the bot, providing a personalized greeting or onboarding message.message_handler: Triggers on incoming messages to the bot, enabling dynamic responses based on message content.mention_handler: Fires when the bot is mentioned in a conversation, allowing it to respond contextually.context_handler: Executes based on specific contextual triggers defined by the bot's logic.participation_handler: Activates when users interact with the bot in channels, such as joining or leaving.incoming_webhook_handler: Handles events from external systems via incoming webhooks.menu_handler: Defines custom menu actions for the bot, providing interactive options to users.call_handler: Responds to bot call events, such as ringing, answered, ended, etc.script for Webhook bots - use permissions instead.\n",
"maxLength": 2147483648
},
"permissions": {
"type": "array",
"maxItems": 5,
"description": "List of data attributes to forward to your server in the webhook payload when the handler fires.permissions for Deluge bots - use script instead.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.menu_handler type.\n \n"
},
"icon": {
"type": "string",
"description": "menu_handler type.\n"
},
"sub_actions": {
"type": "array",
"maxItems": 5,
"description": "List of sub-actions for menu handlers.\nmenu_handler type.\n",
"items": {
"$ref": "#/components/schemas/SubAction"
}
}
},
"example": {
"name": "Bot Menu Action",
"icon": "wand/#FFFFFF",
"script": "response = Map();\nresponse.put(\"text\",\"This is a bot menu action\");\nreturn response;",
"sub_actions": [
{
"name": "Sub Action 1",
"icon": "wand/#FFFFFF"
}
]
}
},
"SubAction": {
"type": "object",
"description": "Sub-action definition for menu handlers.",
"required": [
"name"
],
"properties": {
"name": {
"type": "string",
"maxLength": 15,
"description": "Sub-action name.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.menu_handler type.\n"
},
"icon": {
"type": "string",
"description": "Updated custom icon reference for menu handler variants.menu_handler type.\n"
},
"sub_actions": {
"type": "array",
"maxItems": 5,
"description": "Updated list of sub-actions for menu handlers.\nmenu_handler type.\n",
"items": {
"$ref": "#/components/schemas/SubAction"
}
}
},
"example": {
"script": "response = Map();\nresponse.put(\"text\", \"\ud83d\udc4b Welcome to the IT Help Desk! Select an option to get started.\");\nreturn response;",
"name": "IT Help Desk",
"icon": "wand/627282",
"sub_actions": [
{
"name": "Raise Ticket",
"icon": "wand/627290"
},
{
"name": "Track Status",
"icon": "wand/627291"
},
{
"name": "Request Access",
"icon": "wand/627292"
}
]
}
},
"BotAssociateChannelRequest": {
"type": "object",
"description": "Payload to associate bot with a channel.",
"properties": {
"channel_unique_name": {
"type": "string",
"description": "Unique name of the channel to associate with the bot. This is the identifier used in API calls to specify the channel for bot association.text, card, or slides must be provided.\nTo target specific recipients, include user_ids (comma-separated user IDs, up to 100) or set broadcast: true to reach all subscribers.\n",
"properties": {
"text": {
"type": "string",
"description": "Plain-text or rich-text message content.text and card - not nested inside card.\nMost commonly paired with the modern-inline card theme.\nMaximum 20 slides. Maximum total size: 10,000 characters.\ndata.headers (array of strings) and data.rows (array of objects).data is an array of strings.data is an array of objects with label and value.data is an array of image URL strings.table | list | label | images | text\n",
"enum": [
"table",
"list",
"label",
"images",
"text"
],
"example": "table"
},
"title": {
"type": "string",
"description": "Optional heading displayed above the slide content.",
"example": "Ticket Details"
},
"data": {
"description": "Content payload for the slide. Structure depends on type:\nheaders (array of strings) and rows (array of objects).label and value.red | yellow | green | blue | grey\n",
"enum": [
"red",
"yellow",
"green",
"blue",
"grey"
],
"example": "yellow"
},
"markdown": {
"type": "boolean",
"description": "Set to true to enable Markdown parsing in the text field.\n",
"example": true
}
},
"example": {
"background": "yellow",
"markdown": true
}
},
"user_ids": {
"type": "string",
"description": "Comma-separated list of user ZUIDs or emails to send the message to specific recipients.true to send a notification to recipients if the message is edited after being sent.\n",
"example": false
},
"message_topic": {
"type": "string",
"description": "Topic string used as the thread title when a thread is created from this message. Maximum length: 255 characters.\n",
"maxLength": 255,
"example": "Daily Standup Updates"
},
"mark_as_read": {
"type": "boolean",
"description": "Set to true to automatically mark this message as read for the recipient.\n",
"example": false
},
"sync_message": {
"type": "boolean",
"description": "Set to true to send the message synchronously. The response will include chat_id and message_id.\n",
"example": false
},
"thread_chat_id": {
"type": "string",
"description": "Chat ID of an existing thread to post the message into. Maximum length: 100 characters.\n",
"maxLength": 100,
"example": "CT_1207124526552602256_60002085329-T-1291567019566818579"
},
"thread_message_id": {
"type": "string",
"description": "Message UID from which a thread has been originated. Used to associate the message with a specific thread.\n",
"example": "1727333520582%2047588994306224"
},
"post_in_parent": {
"type": "boolean",
"description": "Set to true to also post the message in the parent chat or channel when sending to a thread.\n",
"example": false
},
"thread_title": {
"type": "string",
"description": "Custom title for a newly created thread.