openapi: 3.0.0
info:
title: Bots dndsettings API
description: "
Bots are conversational assistants designed to automate repetitive tasks and manage simple user interactions. Their behavior is fully customizable through predefined Bot Handlers, which are activated by specific actions or through Webhooks that communicate with your own external server.
For more information about Bots, please refer to the Bots Help Documentation.
Bot Handlers
\n - Bot Handlers are the building blocks of a bot's functionality. Each handler is associated with a specific trigger event, such as receiving a direct message, being @mentioned in a channel, or a user subscribing to the bot.
\n - When the trigger event occurs, the corresponding handler executes it's script to perform actions like sending messages, making API calls, or updating data.
\n - By configuring different handlers, you can create bots that respond intelligently to various user interactions and automate complex workflows within Zoho Cliq.
\n
Types of Bot Handlers
\n \n | Handler | \n Description | \n
\n \n | Menu Handler | \n Adds up to 5 quick-action items to the bot's chat menu. Triggered when a user interacts with the menu. | \n
\n \n | Message Handler | \n Triggered when the bot receives a message. | \n
\n \n | Welcome Handler | \n Defines the greeting message sent when a user subscribes to the bot. | \n
\n \n | Mention Handler | \n Triggered when the bot is @mentioned in a chat or channel. | \n
\n \n | Incoming Webhook Handler | \n Allows external services to post messages into the bot via outgoing webhooks. | \n
\n \n | Context Handler | \n Manages multi-turn conversations, maintaining context across a user's interaction with the bot. | \n
\n
What you can do with the Bots API?
With the Bots API, you can retrieve information about a specific bot, list all bots within your organization, manage configurations specific to handlers, trigger bot calls programmatically, manage subscribers, and much more.
Each bot has an execution_type that defines how its handlers run when a trigger event occurs. The Bots API allows developers to create two types of bots:
Deluge Bots (default)
Deluge bot executes handler logic using Zoho's Deluge scripting language, hosted entirely within the Zoho Cliq Developer platform, where no external server is required.
\n - If
execution_type is not specified during bot creation, it defaults to deluge. \n - Handler logic is defined as a script field (Deluge source code) when creating or updating handlers.
\n - Suitable for teams that want to build and manage bot logic entirely within Zoho's ecosystem.
\n
Webhook Bots
A Webhook bot delegates all handler execution to your own external server. When a trigger event fires, Zoho Cliq sends an HTTP POST request to the execution_url you configure, and your server processes the event and returns a response.
\n - To create a Webhook bot, set
execution_type to webhook during bot creation and provide the execution_url where event payloads should be sent. \n - Your server must be publicly accessible and able to handle incoming POST requests from Zoho Cliq.
\n - Ideal for teams seeking complete control over bot logic and possessing the resources to manage an external server. Also suitable for integrations requiring access to external databases, third-party APIs, or custom business logic that cannot be executed in Deluge.
\n
\n"
contact: {}
version: 1.0.0
servers:
- url: https://cliq.zoho.com/api/v3
description: Zoho Cliq US DC
tags:
- name: dndsettings
description: DND Settings Module
paths:
/settings/dnd-preferences:
get:
summary: Get DND preferences
operationId: getDNDPreferences
description: "Returns the current Do Not Disturb preferences for the authenticated user.\nYou can optionally limit the response by passing specific preference keys.\n
\n\n OAuth Scope: ZohoCliq.Profile.READ
\n
\n"
parameters:
- name: keys
in: query
required: false
schema:
type: string
description: Comma-separated preference keys to fetch (e.g. schedule).
example: schedule
responses:
'200':
description: DND preferences were retrieved successfully.
content:
application/json:
schema:
$ref: '#/components/schemas/dnd-preferences-response'
example:
quiet_hours: 18:00-09:00
quiet_days: sunday,monday
'400':
description: Bad Request.
content:
application/json:
schema:
type: object
properties:
message:
type: string
example: The request cannot be performed. Usually because of malformed parameter or missing parameter.
'401':
description: Unauthorized.
content:
application/json:
schema:
type: object
properties:
message:
type: string
example: Request was rejected because of invalid AuthToken.
'403':
description: Forbidden.
content:
application/json:
schema:
type: object
properties:
message:
type: string
example: The user does not have enough permission or possibly not an user of the respective organization to access the resource.
'429':
description: Too many requests.
content:
application/json:
schema:
type: object
properties:
message:
type: string
example: Too many requests within a certain time frame.
'500':
description: Internal Server Error.
content:
application/json:
schema:
type: object
properties:
message:
type: string
example: Cliq server encountered an error which prevents it from fulfilling the request.
security:
- Cliq_Auth:
- ZohoCliq.Profile.READ
tags:
- dndsettings
put:
summary: Update DND preferences
operationId: updateDNDPreferences
description: "Updates \"Do Not Disturb\" preferences for the authenticated user.\n
\n\n OAuth Scope: ZohoCliq.Profile.UPDATE
\n
\n"
requestBody:
description: Updates DND preferences for the authenticated user. Send one or both fields depending on what must be changed.
required: true
content:
application/json:
schema:
$ref: '#/components/schemas/update-dnd-preferences-request'
example:
quiet_days: monday,tuesday
quiet_hours: 18:00-21:00
responses:
'204':
description: No Content. DND preferences were updated successfully.
content:
application/json:
schema:
$ref: '#/components/schemas/NoResponse'
'400':
description: Bad Request.
content:
application/json:
schema:
type: object
properties:
message:
type: string
example: The request cannot be performed. Usually because of malformed parameter or missing parameter.
'401':
description: Unauthorized.
content:
application/json:
schema:
type: object
properties:
message:
type: string
example: Request was rejected because of invalid AuthToken.
'403':
description: Forbidden.
content:
application/json:
schema:
type: object
properties:
message:
type: string
example: The user does not have enough permission or possibly not an user of the respective organization to access the resource.
'429':
description: Too many requests.
content:
application/json:
schema:
type: object
properties:
message:
type: string
example: Too many requests within a certain time frame.
'500':
description: Internal Server Error.
content:
application/json:
schema:
type: object
properties:
message:
type: string
example: Cliq server encountered an error which prevents it from fulfilling the request.
security:
- Cliq_Auth:
- ZohoCliq.Profile.UPDATE
tags:
- dndsettings
components:
schemas:
update-dnd-preferences-request:
type: object
description: Request payload for updating DND preferences. Omitted fields remain unchanged.
properties:
quiet_hours:
type: string
description: '''Time range for quiet hours in HH:MM-HH:MM format. For example, "18:00-09:00" means DND is active from 6 PM to 9 AM the next day.''
'
example: 18:00-21:00
quiet_days:
type: string
description: "Comma-separated list of days when DND is active.
\nAllowed values:\n\n - sunday
\n - monday
\n - tuesday
\n - wednesday
\n - thursday
\n - friday
\n - saturday
\n
\nFor example, \"monday,tuesday\" means DND is active on Mondays and Tuesdays.\n"
example: monday,tuesday
NoResponse:
type: object
description: Response envelope for successful operations with no payload.
properties:
status:
type: string
example: success
message:
type: string
example: Operation completed successfully.
dnd-preferences-response:
type: object
description: Current DND preference settings for the user.
properties:
quiet_hours:
type: string
description: Time range for quiet hours in HH:MM-HH:MM format.
example: 18:00-09:00
quiet_days:
type: string
description: Comma-separated list of days when DND is active.
example: sunday,monday
securitySchemes:
Cliq_Auth:
type: oauth2
x-authorization-example: Bearer 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f
flows:
implicit:
authorizationUrl: https://accounts.zoho.com/oauth/v2/auth
scopes:
ZohoCliq.Bots.READ: Read Bot Information
ZohoCliq.Bots.CREATE: Create Bots
ZohoCliq.Bots.UPDATE: Update Bots
ZohoCliq.Bots.DELETE: Delete Bots
ZohoCliq.Webhooks.CREATE: Post messages to conversations via webhooks
ZohoCliq.BotMessages.CREATE: Send messages via bot incoming webhooks
ZohoCliq.Channels.UPDATE: Update Channel Settings
externalDocs:
description: Find out more about Zoho Cliq APIs V3
url: https://www.zoho.com/cliq/help/restapi/v3/