{
"$schema": "http://json-schema.org/draft-07/schema#",
"title": "Zoho Cliq Slashcommands Schemas",
"definitions": {
"SlashCommandResponse": {
"type": "object",
"description": "Slash Commands API response envelope.",
"properties": {
"url": {
"type": "string"
},
"type": {
"type": "string"
},
"data": {
"type": "object",
"additionalProperties": true
}
},
"example": {
"url": "/api/v3/commands/227828000000128009",
"type": "command",
"data": {
"name": "greet",
"id": "227828000000128009",
"handlers": [
{
"type": "execution_handler"
}
],
"creator": {
"name": "Ryan West",
"id": "119440882"
},
"execution_type": "deluge",
"hint": "Send a greeting message",
"status": "enabled",
"max_suggestions": 5,
"type": "custom",
"description": "Sends a customizable greeting to a user or channel",
"scope": "organization",
"options": {
"user": "The user to greet",
"msg": "Custom greeting message"
}
}
}
},
"ExecutionRecordResponse": {
"type": "object",
"description": "Response envelope for slash command handler execution records.",
"properties": {
"status": {
"type": "string",
"description": "HTTP status text of the response.",
"example": "OK"
},
"code": {
"type": "integer",
"description": "HTTP status code of the response.",
"example": 200
},
"data": {
"type": "object",
"properties": {
"logs": {
"type": "array",
"description": "List of execution log entries.",
"items": {
"type": "object",
"properties": {
"id": {
"type": "string",
"description": "Unique identifier of the execution record."
},
"time": {
"type": "integer",
"format": "int64",
"description": "Epoch timestamp (ms) when the handler was executed."
},
"executionTime": {
"type": "integer",
"description": "Time taken to execute the handler, in milliseconds."
},
"output": {
"type": "string",
"description": "Output returned by the handler script (serialized as a JSON string)."
},
"user": {
"type": "object",
"description": "Details of the user who triggered the command execution.",
"properties": {
"id": {
"type": "string"
},
"zoho_user_id": {
"type": "string"
},
"first_name": {
"type": "string"
},
"last_name": {
"type": "string"
},
"email": {
"type": "string"
}
}
}
}
}
}
}
}
},
"example": {
"status": "OK",
"code": 200,
"data": {
"logs": [
{
"user": {
"zoho_user_id": "697322516",
"last_name": "Raman",
"email": "priya.raman@zylker.com",
"first_name": "Priya",
"id": "697322516"
},
"output": "{}",
"time": 1770628936698,
"executionTime": 183,
"id": "d37d7b20-0598-11f1-8871-fb8adfa476c7"
},
{
"user": {
"zoho_user_id": "697322516",
"last_name": "Raman",
"email": "priya.raman@zylker.com",
"first_name": "Priya",
"id": "697322516"
},
"output": "{}",
"time": 1770628887877,
"executionTime": 179,
"id": "b66694e0-0598-11f1-b90c-55af9267af80"
}
]
}
}
},
"v3-exehandler-create": {
"type": "object",
"description": "Payload for creating a new handler. For Deluge commands, provide `type` and `script`. For Webhook commands, provide `type` and `permissions`.",
"required": [
"type"
],
"properties": {
"type": {
"type": "string",
"enum": [
"execution_handler",
"suggestion_handler"
],
"description": "Type of the handler to create. Accepted values:
\n
execution_handler: Executes on command invocation.suggestion_handler: Executes to provide autocomplete suggestions as users type the command.script for Webhook commands - use permissions instead.\n"
},
"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 commands - use script instead.attachments: File attachment metadata. Not available for suggestion_handler.chat: Chat context (chat ID, type, participants).location: Sender's location data.user: Sender's user profile details.execution_handler (fires on command invocation), suggestion_handler (fires to generate autocomplete suggestions).\n"
},
"update-slash-command-request-body": {
"type": "object",
"description": "Payload for updating a slash command. All fields are optional; only the fields provided will be updated.",
"properties": {
"execution_url": {
"type": "string",
"maxLength": 225,
"description": "Updated server URL where Cliq will forward handler events. Applicable only for Webhook commands.location, unit).\"City to check weather for\").{\"options\": {\"location\": \"City to check weather for\", \"unit\": \"Temperature unit: celsius or fahrenheit\"}}\n",
"additionalProperties": {
"type": "string",
"maxLength": 100
}
},
"scope": {
"type": "string",
"enum": [
"organization",
"team",
"personal"
],
"description": "Updated access scope of the slash command. Determines who can see and use the command.organization: Command is available to all users in the organization.team: Command is restricted to specific teams. Requires team_ids field.personal: Command is only available to the creator.scope is set to team. Each ID corresponds to a team within the organization.scope is being changed to team.\n",
"items": {
"type": "integer"
}
},
"image": {
"type": "string",
"maxLength": 204800000,
"description": "Updated base64 encoded image used as the command icon. This icon will be displayed next to the command in the slash command picker.attachments, chat, location, user. Note: attachments is not available for suggestion_handler.\n",
"items": {
"type": "string",
"enum": [
"attachments",
"chat",
"location",
"user"
]
}
}
}
},
"create-slash-command-request-body": {
"type": "object",
"description": "Payload for creating a new slash command.",
"required": [
"name",
"hint",
"scope"
],
"properties": {
"execution_type": {
"type": "string",
"enum": [
"deluge",
"webhook"
],
"description": "Defines how the command executes its handlers.deluge: Handler logic runs on Zoho's platform via Deluge scripts. Default when omitted.webhook: Handler events are forwarded to your execution_url as POST requests.execution_type is webhook.location, unit).\"City to check weather for\").{\"options\": {\"location\": \"City to check weather for\", \"unit\": \"Temperature unit: celsius or fahrenheit\"}}\n",
"additionalProperties": {
"type": "string",
"maxLength": 100
}
},
"scope": {
"type": "string",
"enum": [
"organization",
"team",
"personal"
],
"description": "Access scope of the slash command. Determines who can see and use the command.organization: Command is available to all users in the organization.team: Command is restricted to specific teams. Requires team_ids field.personal: Command is only available to the creator.scope is set to team. Each ID corresponds to a team within the organization.scope is team.\n",
"items": {
"type": "integer"
}
},
"image": {
"type": "string",
"maxLength": 204800000,
"description": "Base64 encoded image used as the command icon. This icon will be displayed next to the command in the slash command picker and can help users visually identify the command.