REST API Documentation Access Cliq Tweet About UsShare this API doc
About Cliq Rest API

About Cliq Rest API

REST is a kind of web-service architecture used for communication between two applications. REST API is organized around HTTP protocols, making it simple to use.

API Root Endpoint

API Root End Point

https://cliq.zoho.com

Cliq API is standardized around REST, allowing you to perform read and write operations that you do with our web client.

The relative path prefix /v2/ means that we are currently using version 2 of our API.

This API follows HTTP rules, identifies Cliq users using OAuth and provides response as a JSON Object.

Every resource URL is recognised as a resource identifier. The URL of each resource can be obtained by accessing the API Root Endpoint.

Authentication

All Cliq API's need to be authenticated using an OAuth token. An OAuth token is different from the usual token based authentication.

You can obtain an OAuth token by registering your extension with Zoho's Developer Console.

Register as a new client by accessing this website:
https://accounts.zoho.com/developerconsole

1. Click on Add Client IDand give the following :

2. Click Create.

Upon providing the necessary details for registering, you are given a set of OAuth credentials known as client id and client secret exclusive for your extension. These credentials will be known to both Zoho and your extension.

Sample request to generate grant token

Authorization by generating grant token

GET oauth/v2/auth Host: https://accounts.zoho.com Query String: https://accounts.zoho.com/oauth/v2/auth ?scope=ZohoCliq.Channels.CREATE, ZohoCliq.Channels.READ, ZohoCliq.Channels.UPDATE, ZohoCliq.Channels.DELETE &client_id=1000.0SRSZSY37WMZ69405H3K3TMYI2239V &state=5466400890088961855 &response_type=code &redirect_uri=http://application_name.com/ &access_type=offline

Redirect the user to the authorization URL, authorization will be done when the user grants access in the "user consent" page.

Sample response on generating grant token

	

http://accounts.zoho.com/oauth2callback?state=5466400890088961855&code=1000.dd7e47321d48b8a7e312e3d6eb1a9bb8.b6c07ac766ec11da98bf6a261e24dca4

Below are the mandatory case sensitive fields to be passed in the authorization URL.

Parameter Description
scope The scope required for your extension.
Scope for
  • channels: "Channels"
  • Messaging (Channel, Bots,Chat, Buddy) : "Webhooks"
client_id Client id obtained during client registration.
state A generated value that correlates the callback with its associated authorization request.
response_type "code"
redirect_uri The redirect URL mentioned during client registration.
access_type Access type will be either online or offline.

Sample request to generate access token

Getting the Access Token

POST oauth/v2/token Host: https://accounts.zoho.com Query String: https://accounts.zoho.com/oauth/v2/token ?code=1000.dd7e47321d48b8a7e312e3d6eb1a9bb8.b6c07ac766ec11da98bf6a261e24dca4 &grant_type=authorization_code &scope=ZohoCliq.Channels.CREATE, ZohoCliq.Channels.READ, ZohoCliq.Channels.UPDATE, ZohoCliq.Channels.DELETE &client_id=1000.0SRSZSY37WMZ69405H3K3TMYI2239V &client_secret=39c689de68c712fa5f1f06c3b1319ab98f59fa921b &redirect_uri=http://application_name.com/

Sample response on generating the access token

{ "access_token": "1000.70d737e7cc1d8869123f796363f55345.830d0dc7ea80c404ace4a261d1b710d4", "refresh_token": "1000.8ecd474019e31d52d2f94aad659c5cb7.4638677ebc14f2f2ee410b6dfb6cebdc", "token_type": "Bearer", "expires_in": 3600000 }

Example for using the access token

Request URL: GET https://cliq.zoho.com/api/v2/channels Request Header: Authorization: Zoho-oauthtoken<space>dd7e47321d48b8a7e312e3d6eb1a9bb8.b6c07ac766ec11da98bf6a261e24dca4

Once your extension receives the Auth code, a new request can be made to receive an access token using which your app will receive the user credentials.

The code parameter can be obtained from response of the initial request sent.

Below are parameters to be passed in the URL.

Parameter Description
code Authorization code obtained during grant token generation.
client_id Client id obtained during client registration.
client_secret Client secret obtained during client registration.
redirect_uri Redirect uri mentioned during client registration.
grant_type authorization_code
scope Specify the scope allowed for your extension.
state A generated value that correlates the callback with its associated authorization request.Has to be maintained the same during the entire process for authenticity.

Once the request along with the authorization code is sent, Zoho will issue a response to your app which gives you the following information.

All REST APIs should be accessed with an OAuth token. Send the access token as a header when you call a Cliq REST API.

All headers should have the following

Header name: Authorization

Header value: Zoho-oauthtoken<space>access token

contentType :"application/json"

Example for generating the access token using refresh token

Generating the access token from refresh token

	
Request URL: POST https://accounts.zoho.com/oauth/v2/token Host: https://accounts.zoho.com Query String : https://accounts.zoho.com/oauth/v2/token ?refresh_token=1000.dd7e47321d48b8a7e312e3d6eb1a9bb8.b6c07ac766ec11da98bf6a261e24dca4 &grant_type=refresh_token &scope=ZohoCliq.Channels.CREATE, ZohoCliq.Channels.READ, ZohoCliq.Channels.UPDATE, ZohoCliq.Channels.DELETE &client_id=1000.0SRSZSY37WMZ69405H3K3TMYI2239V &client_secret=39c689de68c712fa5f1f06c3b1319ab98f59fa921b &redirect_uri=http://application_name.com/

You can request for a refresh token to be generated along with the access token. To request for a refresh token, add access_type=offline in the authentication request.

The refresh token will always be generated by prompt=consent

In most general cases the access tokens expire in one hour. Until then, the access token has unlimited usage. Once the access token expires the refresh token can be used to generate a new access token.

HTTP Methods

Using GET method, you can get the list of resource or details. To get a list of channels:
GET https://cliq.zoho.com/api/v2/channels?joined=true&pinned=true &Authorization="Zoho-authtoken ba4604e8e433g9c892e360d53463oec5"

Cliq API uses HTTP protocols for every action.

Method Description
GET Used for retrieving resources.
POST Used for creating resources and performing operations.
PUT Used for updating resources.
DELETE Used for deleting resources.

Response Structure

Response

The response structure for the channels API follows the below format.
	
{ "channels": [ { .... } ] }

All responses will be in the JSON format.

Date:

All timestamps are returned in the ISO 8601 format YYYY-MM-DDThh:mm:ssTZD

Example: "2017-07-03T14:59:20+05:30"

Errors

Cliq uses HTTP status codes to indicate success or failure of an API call. In general, status codes in the 2xx range means success, 4xx range means there was an error in the provided information, and those in the 5xx range indicates server side errors. Commonly used HTTP status codes are listed below.

HTTP Status Codes

Status Code Descriptions
2xxSuccess
4xxBad request sent to server
5xxServer side error
Status Code Description
200 SuccessThe request was successfully completed.
201 CreatedThe request was a success and one or more resources have been created.
204 No ContentThe request was a success and the response returned has no content.
400 Bad requestThe request cannot be performed. Usually because of malformed parameter or missing parameter.
401 Unauthorized (Invalid AuthToken)Request was rejected because of invalid AuthToken.
403 ForbiddenThe user does not have enough permission or possibly not an user of the respective organization to access the resource.
404 URL Not Found The URL you’ve sent is wrong. It’s possible that the resource you’ve requested has been moved to another URL.
405 Method Not AllowedThe requested resource does not support the HTTP method used. For example, requesting List of all customers API with PUT as the HTTP method.
406 Not AcceptableThe response has been received but the requested response type is not supported by the browser.
429 Too many requests Too many requests within a certain time frame.
500 Server error Cliq server encountered an error which prevents it from fulfilling the request.

API Call Limit

We have system limitations just to protect from denial of service (DOS) attacks. There is no usage limit on the API.

Sample Channel Object

Channels

{ "name": "#Zylker-Support", "description": "To post all the support tickets from customers", "image_url": "http://cliq.zoho.com/channel/T4000000040005_4435792_1498572169593/photo.do", "level": "team", "status": "created", "channel_id": "T4000000040005", "organization_id": "4435792", "creator_id": "4435866", "creator_name": "PatriciaJames", "creation_time": "2017-07-03T14:59:20+05:30", "last_modified_time": "2017-07-03T15:59:20+05:30", "current_user_role": "super_admin", "last_message_info": { "sender_id": "53787102", "message_type": "text", "message_time": "2017-07-03T15:59:20+05:30", "message": "Hey!", "sender_display_name": "PatriciaJames" }, "participant_count": 1, "admin_permission": { "special_mentions": true, "mention_users": true, "edit_channel_info": true, "remove_participant": true, "clear_all_messages": true, "unarchive_channel": true, "send_message": true, "add_participant": true, "archive_channel": true, "delete_channel": true }, "moderator_permission": { "special_mentions": true, "mention_users": true, "edit_channel_info": true, "remove_participant": true, "clear_all_messages": false, "unarchive_channel": false, "send_message": true, "add_participant": true, "archive_channel": false, "delete_channel": false }, "member_permission": { "special_mentions": true, "mention_users": true, "edit_channel_info": false, "remove_participant": false, "clear_all_messages": false, "unarchive_channel": false, "send_message": true, "add_participant": true, "archive_channel": false, "delete_channel": false }, "unique_name": "zylkersupport", "teams": { "4435961": "SALES", "4453461": "MARKETING" }, "joined": true, "pinned": false, "total_message_count": "100", "unread_message_count": 5, "unread_time": "2017-07-03T15:59:20+05:30" }

Channels are platforms to share information in a smooth, hassle free manner. Channels can be within the team, organization and even a collaboration with multiple external organizations thereby letting users participate in topic-specific discussions.

OAuth Scope:Every channel API can be accessed with the OAuth scope Channels only.

The Channel Object Attributes

name
string
Name of the channel.
description
string
Brief description about the channel.
image_url
URL
The URL for the channel display picture.
level
Allowed values
organization|team|private|external
Provide an access level for the channel with the allowed values.
channel_id
string
The unique id of the channel.
organization_id
string
The organization id of the creator of the channel.
creator_id
string
The id of the user who created the channel.
creator_name
string
Name of the user who created the channel.
creation_time
timestamp
The time at which the channel was created.
last_modified_time
timestamp
The time at which the last message was sent in the channel.
current_user_role
Allowed values
super_admin | admin | moderator | members| allowed_users
The role of the authenticated user for the channel.
last_message_info
JSON Object
Details of the last message sent in the channel.
participant_count
integer
The total number of participants in the channel.
admin_permission
JSON Object
The permissions given to the admin of the channel.
moderator_permission
JSON Object
The permissions given to the moderator of the channel.
member_permission
JSON Object
The permissions given to the members of the channel.
unique_name
string
The unique identifier of the channel to be used in REST URLs and deluge API's.
teams
JSON Object
List of teams associated with the channel. The teams ids are mapped with team names.
status
Allowed values
created|pending|archived
The status of the channel.
total_message_count
string
Total number of messages in the channel.
joined
boolean
If the channel is a participant of the channel or not.
pinned
boolean
If the channel is pinned or unpinned.
unread_message_count
integer
The total number of unread messages in the channel.
unread_time
timestamp
The time captured when a user receives a message,when he is offline.

Create a Channel

Create a channel

    	
POST https://cliq.zoho.com/api/v2/channels

Payload

  
{ "name" : "Zylker-Support", "description" :"To post all the support tickets from customers", "level" : "team", "team_ids" : ["2323334", "2328533"], "user_ids": ["100100","120001","100102"], }

Response Example

  
{ "name": "#Zylker-Support", "description": "To post all the support tickets from customers", "image_url": "http://cliq.zoho.com/channel/T4000000040005_4435792_1498572169593/photo.do", "level": "team", "status": "created", "channel_id": "T4000000040005", "organization_id": "4435792", "creator_id": "4435866", "creator_name": "PatriciaJames", "creation_time": "2017-07-03T14:59:20+05:30", "last_modified_time": "2017-07-03T15:59:20+05:30", "current_user_role": "super_admin", "participant_count": 1, "admin_permission": { "special_mentions": true, "mention_users": true, "edit_channel_info": true, "remove_participant": true, "clear_all_messages": true, "unarchive_channel": true, "send_message": true, "add_participant": true, "archive_channel": true, "delete_channel": true }, "moderator_permission": { "special_mentions": true, "mention_users": true, "edit_channel_info": true, "remove_participant": true, "clear_all_messages": false, "unarchive_channel": false, "send_message": true, "add_participant": true, "archive_channel": false, "delete_channel": false }, "member_permission": { "special_mentions": true, "mention_users": true, "edit_channel_info": false, "remove_participant": false, "clear_all_messages": false, "unarchive_channel": false, "send_message": true, "add_participant": true, "archive_channel": false, "delete_channel": false }, "unique_name": "zylkersupport", "teams": { "4435961": "SALES", "4453461": "MARKETING" }, "joined": true, "pinned": false, "total_message_count": "100", "unread_message_count": 5, "unread_time":"2017-07-03T15:59:20+05:30" }

You can use this API to create a new channel in Cliq.

Required OAuth Scope :

This API can be accessed with the OAuth scope : ZohoCliq.Channels.CREATE

Query Params

name
Required
String
Name of your choice for the channel.
description
Optional
String
Short description regarding the channel.
level
Required
Allowed values
organization|team|private|external
Assigning an access level to the channel.
team_ids
Optional
JSON Array
The organization id to be associated with the team channel.
user_ids
Optional
JSON Array
The Zoho user ids of the users to be added as the channel participants.
email_ids
Optional
JSON Array
Email Ids of the users to be added as the channel participants.
image_data
Optional
base64 data
The base64-encoded image content to be uploaded as display picture for the channel.

Retrieve a Channel

Retrieve a channel

    	
GET https://cliq.zoho.com/api/v2/channels/{channel_id}

Response Example

	
{ "name": "#Zylker-Support", "description": "To post all the support tickets from customers", "image_url": "http://cliq.zoho.com/channel/T4000000040005_4435792_1498572169593/photo.do", "level": "team", "status": "created", "channel_id": "T4000000040005", "organization_id": "4435792", "creator_id": "4435866", "creator_name": "PatriciaJames", "creation_time": "2017-07-03T14:59:20+05:30", "last_modified_time": "2017-07-03T15:59:20+05:30", "current_user_role": "super_admin", "last_message_info": { "sender_id": "53787102", "message_type": "text", "message_time": "2017-07-03T15:59:20+05:30", "message": "Hey!", "sender_dispaly_name": "PatriciaJames" }, "participant_count": 1, "admin_permission": { "special_mentions": true, "mention_users": true, "edit_channel_info": true, "remove_participant": true, "clear_all_messages": true, "unarchive_channel": true, "send_message": true, "add_participant": true, "archive_channel": true, "delete_channel": true }, "moderator_permission": { "special_mentions": true, "mention_users": true, "edit_channel_info": true, "remove_participant": true, "clear_all_messages": false, "unarchive_channel": false, "send_message": true, "add_participant": true, "archive_channel": false, "delete_channel": false }, "member_permission": { "special_mentions": true, "mention_users": true, "edit_channel_info": false, "remove_participant": false, "clear_all_messages": false, "unarchive_channel": false, "send_message": true, "add_participant": true, "archive_channel": false, "delete_channel": false }, "unique_name": "zylkersupport", "teams": { "4435961": "SALES", "4453461": "MARKETING" }, "joined": true, "pinned": false, "total_message_count": "100", "unread_message_count": 5, "unread_time": "2017-07-03T15:59:20+05:30" }

You can use this API to get details of a specific channel.

Required OAuth Scope :

This API can be accessed with the OAuth scope : ZohoCliq.Channels.READ

Update a Channel

Update a channel

    	
PUT https://cliq.zoho.com/api/v2/channels/{channel_id}

Payload

  
{ "name" : "Zylker-Customer-Support" }

Response Example

	
{ "name": "#Zylker-Customer-Support", "description": "To post all the support tickets from customers", "image_url": "http://cliq.zoho.com/channel/T4000000040005_4435792_1498572169593/photo.do", "level": "team", "status": "created", "channel_id": "T4000000040005", "organization_id": "4435792", "creator_id": "4435866", "creator_name": "PatriciaJames", "creation_time": "2017-07-03T14:59:20+05:30", "last_modified_time": "2017-07-03T15:59:20+05:30", "current_user_role": "super_admin", "last_message_info": { "sender_id": "53787102", "message_type": "text", "message_time": "2017-07-03T15:59:20+05:30", "message": "Hey!", "sender_display_name": "PatriciaJames" }, "participant_count": 1, "admin_permission": { "special_mentions": true, "mention_users": true, "edit_channel_info": true, "remove_participant": true, "clear_all_messages": true, "unarchive_channel": true, "send_message": true, "add_participant": true, "archive_channel": true, "delete_channel": true }, "moderator_permission": { "special_mentions": true, "mention_users": true, "edit_channel_info": true, "remove_participant": true, "clear_all_messages": false, "unarchive_channel": false, "send_message": true, "add_participant": true, "archive_channel": false, "delete_channel": false }, "member_permission": { "special_mentions": true, "mention_users": true, "edit_channel_info": false, "remove_participant": false, "clear_all_messages": false, "unarchive_channel": false, "send_message": true, "add_participant": true, "archive_channel": false, "delete_channel": false }, "unique_name": "zylkersupport", "teams": { "4435961": "SALES", "4453461": "MARKETING" }, "joined": true, "pinned": false, "total_message_count": "100", "unread_message_count": 5, "unread_time": "2017-07-03T15:59:20+05:30" }

You can use this API to update details of an existing channel.

Required OAuth Scope :

This API can be accessed with the OAuth scope : ZohoCliq.Channels.UPDATE

Query Params

name
Optional
String
Renaming an existing channel.
description
Optional
String
Updating the existing description of a channel.
image_data
Optional
base64 data
The base64-encoded image content to be uploaded as display picture for the channel.

Update Channel Permissions

Update Channel Permissions

    	
    	
PUT https://cliq.zoho.com/api/v2/channels/{channel_id} Payload : { "admin_permission": { "mention_users": true, "edit_channel_info": true, "remove_participant": true, "clear_all_messages": true, "send_message": true, "add_participant": true, "archive_channel": true, "delete_channel": true }, "moderator_permission": { "mention_users": true, "edit_channel_info": true, "remove_participant": true, "clear_all_messages": true, "send_message": true, "add_participant": true, "archive_channel": true, "delete_channel": true }, "member_permission": { "mention_users": false, "edit_channel_info": true, "remove_participant": true, "clear_all_messages": true, "send_message": true, "add_participant": true, "archive_channel": true, "delete_channel": true } }

Response Example

	
{ "name": "#Zylker-Support", "description": "To post all the support tickets from customers", "image_url": "http://cliq.zoho.com/channel/T4000000040005_4435792_1498572169593/photo.do", "level": "team", "status": "created", "channel_id": "T4000000040005", "organization_id": "4435792", "creator_id": "4435866", "creator_name": "PatriciaJames", "creation_time": "2017-07-03T14:59:20+05:30", "last_modified_time": "2017-07-03T15:59:20+05:30", "current_user_role": "super_admin", "last_message_info": { "sender_id": "53787102", "message_type": "text", "message_time": "2017-07-03T15:59:20+05:30", "message": "Hey!", "sender_display_name": "PatriciaJames" }, "participant_count": 1, "admin_permission": { "special_mentions": true, "mention_users": true, "edit_channel_info": true, "remove_participant": true, "clear_all_messages": true, "unarchive_channel": true, "send_message": true, "add_participant": true, "archive_channel": true, "delete_channel": true }, "moderator_permission": { "special_mentions": true, "mention_users": true, "edit_channel_info": true, "remove_participant": true, "clear_all_messages": false, "unarchive_channel": false, "send_message": true, "add_participant": true, "archive_channel": false, "delete_channel": false }, "member_permission": { "special_mentions": true, "mention_users": true, "edit_channel_info": false, "remove_participant": false, "clear_all_messages": false, "unarchive_channel": false, "send_message": true, "add_participant": true, "archive_channel": false, "delete_channel": false }, "unique_name": "zylkersupport", "teams": { "4435961": "SALES", "4453461": "MARKETING" }, "joined": true, "pinned": false, "total_message_count": "100", "unread_message_count": 5, "unread_time": "2017-07-03T15:59:20+05:30" }

You can use this API to update the channel permissions.

The members having higher level of role can edit the permissions of roles below them only if the member is having the permission to perform the particular action.

Note πŸ“: Refer our help guide on update channel permissions

Required OAuth Scope :

This API can be accessed with the OAuth scope : ZohoCliq.Channels.UPDATE

Delete a Channel

Delete a channel

    	
    	
DELETE https://cliq.zoho.com/api/v2/channels/{channel_id}

Response Example

	
Response Code:204 OK

You can use this API to delete an existing channel by giving the channel id.

Required OAuth Scope :

This API can be accessed with the OAuth scope : ZohoCliq.Channels.DELETE

List of all Channels

List of all Channels

        
GET https://cliq.zoho.com/api/v2/channels?joined=true&pinned=true

Response Example

	
{ "channels": [ { "name": "#Zylker-Support", "description": "To post all the support tickets from customers", "image_url": "http://cliq.zoho.com/channel/T4000000040005_4435792_1498572169593/photo.do", "level": "team", "status": "created", "channel_id": "T4000000040005", "organization_id": "4435792", "creator_id": "4435866", "creator_name": "PatriciaJames", "creation_time": "2017-07-03T14:59:20+05:30", "last_modified_time": "2017-07-03T15:59:20+05:30", "current_user_role": "super_admin", "last_message_info": { "sender_id": "53787102", "message_type": "text", "message_time": "2017-07-03T15:59:20+05:30", "message": "Hey!", "sender_display_name": "PatriciaJames" }, "participant_count": 1, "admin_permission": { "special_mentions": true, "mention_users": true, "edit_channel_info": true, "remove_participant": true, "clear_all_messages": true, "unarchive_channel": true, "send_message": true, "add_participant": true, "archive_channel": true, "delete_channel": true }, "moderator_permission": { "special_mentions": true, "mention_users": true, "edit_channel_info": true, "remove_participant": true, "clear_all_messages": false, "unarchive_channel": false, "send_message": true, "add_participant": true, "archive_channel": false, "delete_channel": false }, "member_permission": { "special_mentions": true, "mention_users": true, "edit_channel_info": false, "remove_participant": false, "clear_all_messages": false, "unarchive_channel": false, "send_message": true, "add_participant": true, "archive_channel": false, "delete_channel": false }, "unique_name": "zylkersupport", "teams": { "4435961": "SALES", "4453461": "MARKETING" }, "joined": true, "pinned": false, "total_message_count": "100", "unread_message_count": 5, "unread_time": "2017-07-03T15:59:20+05:30" } .... .... .... .... ] }

You can use this API to get the list of all channels.

Required OAuth Scope :

This API can be accessed with the OAuth scope : ZohoCliq.Channels.READ

Query Params

name
Optional
String
Name of the channel to be retrieved.
status
Optional
Allowed values
created|pending|archived
Status of the channel to be retrieved.
limit
Optional
Integer
The number of channels that has to be retrieved. Maximum limit will be 100.
level
Optional
Allowed values
organization|team|private|external
Specifying the level will fetch the list of channels of that particular level.
modified_before
Optional
Timestamp
Gets the list of channels where the last message is sent before the mentioned time.
modified_after
Optional
Timestamp
Gets the list of channels where the last message is sent after the mentioned time.
created_before
Optional
Timestamp
The list of channels created before the specified time.
created_after
Optional
Timestamp
The list of channels created after the specified time.
channel_ids
Optional
JSON Array
The list of channel ids for which details have to be retrieved.
team_ids
Optional
JSON Array
Gets the list of channels associated with the team ids specified.
created_by
Optional
String
Gets the list of channels created by the mentioned email id or user id.
pinned
Optional
Boolean
When "pinned"= "true" only the pinned channels are retrieved and "pinned"="false" will retrieve all channels.
unread
Optional
Boolean
When "unread"= "true" only the channels containing unread messages are retrieved and "unread"="false" will retrieve all channels.
joined
Boolean
When joined = true, only the joined channels list will be fetched, when joined = false, only the non-joined channels will be fetched. When joined is not specified, all types of channels will be fetched.

Get Channel Members

Get Channel Members

    	
    	
GET https://cliq.zoho.com/api/v2/channels/{channel_id}/members

Response Example

	
{ "members": [ { "user_id": "1234567", "email_id": "scott.fisher@zylker.com", "name": "Scott Fisher", "user_role": "member" }, { "user_id": "4355728", "email_id": "olivia.palmer@zylker.com", "name": "Olivia Palmer", "user_role": "member" }, { "user_id": "5663377", "email_id": "li.jung@zylker.com", "name": "Li Jung", "user_role": "member" }, { "user_id": "8875836", "email_id": "ryan.west@zylker.com", "name": "Ryan West", "user_role": "super_admin" } ] }

You can use this API to get the list of all members in a channel.

Required OAuth Scope :

This API can be accessed with the OAuth scope : ZohoCliq.Channels.READ

Add Channel Members by User ID

Add Channel Members

    	
    	
POST https://cliq.zoho.com/api/v2/channels/{channel_id}/members Payload : {"user_ids":["123456","223456"]}

Add Channel Members by Email ID

    	
    	
POST https://cliq.zoho.com/api/v2/channels/{channel_id}/members Payload : {"email_ids":["scott.fisher@zylker.com","ryan.west@zylker.com"]}

Response Example

	
Response Code:204 OK

You can use this API to add members in a Channel, by giving their user id or their email ID.

Required OAuth Scope :

This API can be accessed with the OAuth scope : ZohoCliq.Channels.UPDATE

Update Channel Member's Role

Update Channel Member's Role

    	
    	
PUT https://cliq.zoho.com/api/v2/channels/{channel_id}/members/{user_id} Payload: {"role" : "admin"}

Response Example

	
Response Code:204 OK

You can use this API to update a channel member's role.

role
String
Mention the role to be assigned for the channel member. Allowed values : super_admin|admin|moderator|member

Required OAuth Scope :

This API can be accessed with the OAuth scope : ZohoCliq.Channels.UPDATE

Note πŸ“: Refer our help guide on channel roles

Delete Channel Members By User ID

Delete Channel Members

    	
    	
DELETE https://cliq.zoho.com/api/v2/channels/{channel_id}/members/{user_id}

Delete Channel Members By Email ID

   	
    	
DELETE https://cliq.zoho.com/api/v2/channels/{channel_id}/members/{email_id}

Response Example

	
Response Code:204 OK

You can use this API to delete the members from a channel. Delete members by using the user id or their Email ID.

Required OAuth Scope :

This API can be accessed with the OAuth scope : ZohoCliq.Channels.UPDATE

Approve a Channel

Approve a Channel

  	
    	
POST https://cliq.zoho.com/api/v2/channels/{channel_id}/approve

Response Example

	
Response Code:204 OK

Organization admins can use this API to approve a newly created Organization level channel.

Required OAuth Scope :

This API can be accessed with the OAuth scope : ZohoCliq.Channels.UPDATE

Reject a Channel

Reject a Channel

    	
    	
POST https://cliq.zoho.com/api/v2/channels/{channel_id}/reject

Response Example

	
Response Code:204 OK

Organization admins can use this API to reject a newly created Organization level channel.

Required OAuth Scope :

This API can be accessed with the OAuth scope : ZohoCliq.Channels.UPDATE

Join a Channel

Join a Channel

    	
    	
POST https://cliq.zoho.com/api/v2/channels/{channel_id}/join

Response Example

	
{ "name": "#Zylker-Support", "description": "To post all the support tickets from customers", "image_url": "http://cliq.zoho.com/channel/T4000000040005_4435792_1498572169593/photo.do", "level": "team", "status": "created", "channel_id": "T4000000040005", "organization_id": "4435792", "creator_id": "4435866", "creator_name": "PatriciaJames", "creation_time": "2017-07-03T14:59:20+05:30", "last_modified_time": "2017-07-03T15:59:20+05:30", "current_user_role": "super_admin", "last_message_info": { "sender_id": "53787102", "message_type": "text", "message_time": "2017-07-03T15:59:20+05:30", "message": "Hey!", "sender_display_name": "PatriciaJames" }, "participant_count": 1, "admin_permission": { "special_mentions": true, "mention_users": true, "edit_channel_info": true, "remove_participant": true, "clear_all_messages": true, "unarchive_channel": true, "send_message": true, "add_participant": true, "archive_channel": true, "delete_channel": true }, "moderator_permission": { "special_mentions": true, "mention_users": true, "edit_channel_info": true, "remove_participant": true, "clear_all_messages": false, "unarchive_channel": false, "send_message": true, "add_participant": true, "archive_channel": false, "delete_channel": false }, "member_permission": { "special_mentions": true, "mention_users": true, "edit_channel_info": false, "remove_participant": false, "clear_all_messages": false, "unarchive_channel": false, "send_message": true, "add_participant": true, "archive_channel": false, "delete_channel": false }, "unique_name": "zylkersupport", "teams": { "4435961": "SALES", "4453461": "MARKETING" }, "joined": true, "pinned": false, "total_message_count": "100", "unread_message_count": 5, "unread_time": "2017-07-03T15:59:20+05:30" }

You can use this API to join a channel.

Required OAuth Scope :

This API can be accessed with the OAuth scope : ZohoCliq.Channels.UPDATE

Leave a Channel

Leave a Channel

    	
    	
POST https://cliq.zoho.com/api/v2/channels/{channel_id}/leave

Response Example

	
Response Code:204 OK

You can use this API to leave a channel.

Required OAuth Scope :

This API can be accessed with the OAuth scope : ZohoCliq.Channels.UPDATE

Archive a Channel

Archive a Channel

    	
    	
POST https://cliq.zoho.com/api/v2/channels/{channel_id}/archive

Response Example

	
Response Code:204 OK

You can use this API to archive a channel.

Required OAuth Scope :

This API can be accessed with the OAuth scope : ZohoCliq.Channels.UPDATE

Unarchive a Channel

Unarchive a Channel

    	
    	
POST https://cliq.zoho.com/api/v2/channels/{channel_id}/unarchive

Response Example

	
Response Code:204 OK

You can use this API to unarchive a channel.

Required OAuth Scope :

This API can be accessed with the OAuth scope : ZohoCliq.Channels.UPDATE

Sending Messages

The messaging API can be used to post message to a channel, user or a bot.The message structure can either be as simple as a text or customized as cards to serve different purposes.

OAuth Scope: The OAuth scope for messaging APIs is Webhooks. All messaging APIs can be accessed with the same scope only.

To post message in a channel using channel unique name

Post message in a channel

	
Request POST https://cliq.zoho.com/api/v2/channelsbyname/{CHANNEL_UNIQUE_NAME}/message Payload data:{"text":"Hi Guys!"}

You can post a message in a channel using the channel unique name. The message can be a simple text as well as a message card with buttons. Take a look at our message cards. To get the channel unique name, select view information option in the channel preview and click "Connectors". The API EndPoint will have the channel unique name, as shown in the image below.

πŸ“ Note:

Alternatively, the deluge task zoho.cliq.postToChannel can also be used to post messages to a channel.

The following parameters should be used in the deluge task:

zoho.cliq.postToChannel(<channel_unique_name>,message);

Required OAuth Scope :

This API can be accessed with the OAuth scope : ZohoCliq.Webhooks.CREATE

To post message in a channel using channel ID

	
Request POST https://cliq.zoho.com/api/v2/channels/{CHANNEL_ID}/message Payload data:{"text":"Hi"}

To post message to a bot

Post message to a bot

	
Request POST https://cliq.zoho.com/api/v2/bots/{BOT_UNIQUE_NAME}/message Payload data:{"text":"Hi"}

You can post a message to a bot, using the bot unique name.

The message can be a simple text as well as a message card with buttons. Take a look at our message cards.

To get the bot's unique name, go to Settings β†’ Integrations β†’ Bots β†’ Click on the bot name β†’ API EndPoint.

πŸ“ Note 1: You can also post message to a bot using the deluge task, followed by the parameters

zoho.cliq.postToBot(<bot_unique_name>,response);

πŸ“ Note 2: To post message to all subscribers, use the broadcastkey in the response map.

response = Map();
response.put("broadcast","true");

Required OAuth Scope :

This API can be accessed with the OAuth scope : ZohoCliq.Webhooks.CREATE

To post message in a chat using chat ID

Post message in a chat

	
Request POST https://cliq.zoho.com/api/v2/chats/{CHAT_ID}/message Payload data:{"text":"Hi"}

To post message in a chat, the chat_id can be used in the request URL.

The message can be a simple text as well as a message card with buttons. Take a look at our message cards.

πŸ“ Note: Alternatively, the deluge task zoho.cliq.postToChat can also be used to post messages to a chat.

The following parameters should be used in the deluge task:

zoho.cliq.postToChat(<chatid>,message);

Required OAuth Scope :

This API can be accessed with the OAuth scope : ZohoCliq.Webhooks.CREATE

To post message using user ID

Post message to a user

	
Request POST https://cliq.zoho.com/api/v2/buddies/{zuid}/message Payload data:{"text":"Hi"}

Post a message to a user by giving the zuid in the request URL, followed by the message object containing plain text or message card.

The email ID of the user can also be given instead of the zuid.

πŸ“ Note: This API will be not applicable if the intended user is neither a mutual contact nor your organization member.

Required OAuth Scope :

This API can be accessed with the OAuth scope : ZohoCliq.Webhooks.CREATE

Cliq Extensions

Cliq extensions are a collection of integration components containing commands, bots, message actions, functions, channels bundled together. All published extensions will be provided with an app installation URL. This URL contains an app ID. This app ID should be used in the request URL.

Cliq extension APIs can be accessed with the OAuth scope : ZohoCliq.Applications.ALL

This scope will give the basic CRUD access to the extension APIs.

Sample Extension installation URL:

https://cliq.zoho.com/installapp.do?id=123

Here, App ID is the value for the key "id".

Install an Extension

Install an Extension

 	
Request POST https://cliq.zoho.com/api/v2/applications/{APPID}/install

Sample Response

 	
{ "app_info": { "current_version": 6.2, "type": "install" }, "user": { "last_name": "Fisher", "email": "scott.fisher@zylker.com", "first_name": "Scott", "timezone": "America/toronto", "chat_orgid": 5294567, "country": "us", "language": "en", "id": "52344005" } }

Use this API to install Cliq extensions from Zoho Marketplace. App ID obtained from the extension installation URL should be given in the request URL.

Required OAuth Scope :

This API can be accessed with the OAuth scope : ZohoCliq.Applications.CREATE or ZohoCliq.Applications.ALL

level
Mandatory
String
This parameter defines the access level allowed for the extension. Allowed options are organization | team
team_ids
Optional
String
This parameter should be used with the mandatory parameter,in order to install extensions for teams.

For example: {"level":"organization"} {"level":"team", "team_ids": [12345, 67890]}

Uninstall an Extension

Uninstall an Extension

 	
Request POST https://cliq.zoho.com/api/v2/applications/{APPID}/uninstall

Use this API to uninstall an extension. App ID obtained from the extension installation URL should be given in the request URL.

Required OAuth Scope :

This API can be accessed with the OAuth scope : ZohoCliq.Applications.DELETE or ZohoCliq.Applications.ALL

Enable an Extension

Enable an Extension

 	
POST https://cliq.zoho.com/api/v2/applications/{APPID}/enable Response { "status": "OK", "code": 200, "data": { "success": true } }

Use this API to enable an installed extension. App ID obtained from the extension installation URL should be given in the request URL.

Required OAuth Scope :

This API can be accessed with the OAuth scope : ZohoCliq.Applications.UPDATE or ZohoCliq.Applications.ALL

Disable an Extension

Disable an Extension

 	
POST https://cliq.zoho.com/api/v2/applications/{APPID}/disable Response: { "status": "OK", "code": 200, "data": { "success": true } }

Use this API to disable an installed extension. App ID obtained from the extension installation URL should be given in the request URL.

Required OAuth Scope :

This API can be accessed with the OAuth scope : ZohoCliq.Applications.UPDATE or ZohoCliq.Applications.ALL

Upgrade an Extension

Upgrade an Extension

 	
Request POST https://cliq.zoho.com/api/v2/applications/{APPID}/upgrade

Sample Response

 	
{ "app_info": { "current_version": 6.8, "type": "upgrade", "existing_version": 6.7 }, "user": { "last_name": "Fisher", "email": "scott.fisher@zylker.com", "first_name": "Scott", "timezone": "America/Toronto", "chat_orgid": 5294567, "country": "us", "language": "en", "id": "52344005" } }

Use this API to upgrade an installed extension. App ID obtained from the extension installation URL should be given in the request URL.

Required OAuth Scope :

This API can be accessed with the OAuth scope : ZohoCliq.Applications.UPDATE or ZohoCliq.Applications.ALL

upgradetoorg
Optional
Boolean
This parameter can be used to update the access level of the extension from team to organization.

Example : {"upgradetoorg":true}

Note: Not specifying the parameter will just upgrade your extension with the existing access level.

The Message Object

The Message Object Attributes

text
string
The only mandatory attribute in the message object structure. The text indicates the primary message that is shared.
JSON Object
Bot is a JSON Object with a key value pair to customize the sender's name and image.
name
string
Customize the message sender's name.
image
string
Customize the message sender's image.
JSON Object
A JSON object with the following attributes, to customize each message with the help of themes.
title
string
Title of the message.
theme
Allowed values: poll | prompt | modern-inline
The theme of the message.
thumbnail
URL
The URL of the thumbnail image.
icon
URL
Image to be displayed near the message title.
preview
URL
Preview for the thumbnail image.
JSON Object
JSON object with the key highlight, gives a special border to the message.
highlight
Allowed values: true | false
Key value pair for giving a border to the message.
JSON Object
To display message in different styles.
JSON Object
Allowed values : text | list | table | image | label
The slide of your choice to display a message.
text
String
The message text to be displayed in the slide.
list
JSON Object
List structure can be used to display the message in a list format.
table

The table object can be used to display content in a table format.
label
JSON Object
Define the object's key value pairs to display message in a label format.
image
JSON Array
The images array can be used to display a list of images in the slide.
title
String
Title of the slide displaying the message.
data
JSON Object
Data is the actual message content to be displayed in the slide. Data depends on the type of slide selected to display a message.
buttons
JSON Object
Button object is used along with the message format to structure various types of custom messages. A message can have a button or an array of buttons.

Know more about buttons

Plain text message

Messages containing plain text

		
Request POST https://cliq.zoho.com/api/v2/chats/{chat_id}/message Payload data : {"text": "Hey!"}

To send a plain text message, the message object with the key text should be used.

Required OAuth Scope :

This API can be accessed with the OAuth scope : ZohoCliq.Webhooks.CREATE

Customize message sender

Customize message sender

	
Request POST https://cliq.zoho.com/api/v2/chats/{chat_id}/message Payload data : { "text": "Get your team updates here.", "bot": { "name": "Zylker-Sales", "image": "https://www.zoho.com/cliq/help/restapi/images/bot-custom.png" }, "card": { "theme": "prompt", "title": "Welcome to Zylker-Sales!" } }

Customize the message sender name and image by using the key bot and the values name image.

Required OAuth Scope :

This API can be accessed with the OAuth scope : ZohoCliq.Webhooks.CREATE

Attaching Content

Attaching content of various types can be done by using the slides key. Each type is explained below with the requisite attributes.

Attaching content -Table

Attaching Content - Table

	
Request POST https://cliq.zoho.com/api/v2/chats/{chat_id}/message Payload data :{ "text": "New interns will be joining these teams from July.", "card": { "title":"ANNOUNCEMENT", "theme": "modern-inline", "thumbnail": "https://www.zoho.com/cliq/help/restapi/images/announce_icon.png" }, "slides": [ { "type": "table", "title": "Details", "data": { "headers": [ "Name", "Team", "Reporting To" ], "rows": [ { "Name": "Paula Rojas", "Team": "Zylker-Sales", "Reporting To": "Li Jung" }, { "Name": "Quinn Rivers", "Team": "Zylker-Marketing", "Reporting To": "Patricia James" } ] } } ], "buttons": [ { "label": "View", "type": "+", "action": { "type": "invoke.function", "data": { "name": "internlist", "owner": "li.jung@zylker.com" } } }, { "label": "Cancel", "type": "-", "action": { "type": "invoke.function", "data": { "name": "internlist", "owner": "li.jung@zylker.com" } } } ] }

Attaching content in the form of a table can be done by giving the value table for the type key.

πŸ“ Note: Any type of content to be attached should be enclosed under the slides JSON object. Try it in our message builder. Try this!

Required OAuth Scope :

This API can be accessed with the OAuth scope : ZohoCliq.Webhooks.CREATE

The Table object attributes

type
string
The type of content to be attached in the message card. In this case table
title
string
Title of the table.
headers
JSON Array
The table headers to be displayed.
rows
JSON Array
The rows to be added in the table. The row values should be given as an array of Key-Value pairs, where the key should be in relation to the 'Header' value.
Example:
  • "headers": ["Name"],
  • "rows": [{"Name": "Paula Rojas"}]
JSON Object
Used to specify the style of the table.
width
JSON Object
Use this attribute to specify the width of each column in the table.
Example: "styles": { "width": [10, 90] }
πŸ“ Note 1: This is directly proportional to the number of columns in the table.
πŸ“ Note 2: The width of all the columns should add upto 100.

Attaching Content - List

Attaching Content - List

	
Request POST https://cliq.zoho.com/api/v2/chats/{chat_id}/message Payload data:{ "text": "Welcome to Agile Bot! I'm here to give you a brief on what Agile is all about.", "bot": { "name": "Agile Bot", "image": "https://www.zoho.com/cliq/help/restapi/images/bot-custom.png" }, "card": { "theme": "modern-inline" }, "slides": [ { "type": "list", "title": "Key points ", "data": [ "Time - Tracking for Tasks", "Prioritize requirements effectively", "Identify and work on a fix for bugs instantly", "Collaborate actively", "Most important - Keep it simple" ] } ] }

Attach content as a list by giving the list value for the type key.

πŸ“ Note: Any type of content to be attached should be enclosed under the slides JSON object. Try it in our message builder. Try this!

The List object attributes

type
string
The type of content to be attached in the message card. In this case list
title
string
Title of the list.
data
JSON Array
The details to be displayed as a list. Each list item should be passed as a string.
JSON Object
Used to customise the bullet styles.
type
string
Allowed values: circle | decimal |disc | lower-alpha | upper-alpha | square | lower-roman | upper-roman

Attaching Content - Label

Attaching Content - Label

	
Request POST https://cliq.zoho.com/api/v2/chats/{chat_id}/message Payload data: { "text": "Hi Team! Take a look at the monthly financial reports attached.", "bot": { "name": "Zylker Bot", "image": "https://www.zoho.com/cliq/help/restapi/images/bot-custom.png" }, "card": { "title": "Quarterly Revenue Growth", "theme": "modern-inline" }, "slides": [ { "type": "label", "title": "Report for FY2017", "data": [ { "Q1 - FY2017": "[Revenue Report for Q1FY2017](https://www.zoho.com/cliq/)" }, { "Q2 - FY2017": "[Revenue Report for Q2FY2017](https://www.zoho.com/cliq/)" }, { "Q3 - FY2017": "[Revenue Report for Q3FY2017](https://www.zoho.com/cliq/)" } ] } ] }

Attach content as a label by giving the label value for the type key.

πŸ“ Note: Any type of content to be attached should be enclosed under the slides JSON object. Try it in our message builder. Try this!

The Label object attributes

type
string
The type of content to be attached in the message card. In this case label
title
string
Title of the label.
data
JSON Array
The details to be displayed in the label. The details should be passed as Key-Value pairs. Example: "data": [ {"key ": "value"} ]

Attaching Content - Images

Attaching Content - Images

	
Request POST https://cliq.zoho.com/api/v2/chats/{chat_id}/message Payload data: { "text": "Report analysing the tourist visit trend (10 - 16 Sept 2017)", "bot": { "name": "Zylker Tourism" }, "card": { "title": "Weekly Report", "theme": "modern-inline" }, "buttons": [ { "label": "View Report", "action": { "type": "open.url", "data": { "web": "https://www.zoho.com/cliq/" } }, "type": "+" } ], "slides": [ { "type": "images", "title": "Analysing the average number of days spent with the day of arrival.", "data": [ "https://www.zoho.com/cliq/help/restapi/images/WeeklyReport.png" ] } ] }

Attach content as an image by giving the image value for the type key.

πŸ“ Note: Any type of content to be attached should be enclosed under the slides JSON object. Try it in our message builder. Try this!

The Image object attributes

type
string
The type of content to be attached in the message card. In this case images
title
string
Title of the image slider.
data
JSON Array
The URL's of the images to be displayed.

Buttons

A button can be attached as a component in the message object.

The key parts of a button in a message are explained below:

Label: The display value of the button in the message.

Button Type: A simple color indication to differentiate if the button action is intended to be positive, negative or neutral.

Button Action Types: The types of action entries that can be triggered on clicking a button.

A button can be triggered by three different types of actions:

Buttons can be rendered in the message object as two different types. They are:

The functionality behind instant buttons and message card buttons is the same and the only difference between them is the ease of use. The format for instant buttons is deceptively simple making it quick to use.

Instant Button Object

Instant Buttons

 	
[Button Label](button_action_type|actionproperties)

Instant buttons can be easily specified along with the message text. Instant buttons, when clicked can perform an action by two ways:

Invoke Function : Triggering a deluge task through invoke function.

System API : Perform any of the below given system actions :

Instant button syntax using Invoke Function

Instant Button triggered using Invoke Function

[Button Label](invoke.function|function name|email ID|reference key) Example: data : { "text":"Who's up for lunch after the match on Friday? [+Yes! β€‹πŸ‘β€‹](invoke.function|meetup|li.jung@zylker.com|yes-12345) [-No..β€‹πŸ‘Žβ€‹](invoke.function|meetup|li.jung@zylker.com|no-678910) [Maybe? β€‹πŸ˜](invoke.function|meetup|li.jung@zylker.com|maybe-699910)" }

Params

Button Label
Required
Display value of the button.
Additionally, you can add a "+" or "-" to change the button color."+" for Green and "-" for Red. Not specifying anything will display the button in default grey color.
Maximum number of characters allowed : 20
Button Action
Required
Specify the type of action the button should perform.
In this case: invoke.function
Function Name
Required
Name of the function to be associated with the button.
Owner
Required
Email Id of the function creator.
Maximum number of characters allowed : 100
Reference Key
Optional
Unique key set 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

Instant button syntax using System API

Instant Button triggered using System API

[Button Label](system.api|system action/user ID) Example: data :{ "text":"Hey!Let's have a quick call! [Join](system.api|videocall/123456789)" }

Params

Button Label
Required
Display value of the button.
Maximum number of characters allowed : 20
Button Action
Required
Type of action the button should perform.
In this case : system.api
system action/ID
Required
System action allowed values: audiocall | videocall | startchat | invite
ID - zuid of the user to whom the system action should be performed.
Specify the type of system action. ID is the user or channel ID where you would like to perform the action.

Message Card Button Object

Message Card Buttons

	
{ "label": "", "type": " ", "action": { "type": " ", "data": {}, "confirm": {} } }

Message cards can be structured to be interactive by adding buttons. A message card can have a maximum of 5 buttons.

The Button Object Attributes

label
string
The display value 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
key
integer
Unique key set 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
type
JSON Object
Allowed values : + | -
The type + denotes a button with green outline , type - denotes button with red outline.
JSON object
Defines the type of action a button should perform.
type
Allowed values
invoke.function | open.url | system.api
The action type for a button.
data
JSON Object
The key value params of data is explained under each action type.

Action Types

JSON Object
Confirmation dialog box before the action is executed.
title
string
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
To prompt the confirmation dialog box.
Maximum number of characters allowed : 300
button_text
string
Text value to be displayed in the button.
Maximum number of characters allowed : 100

Message Card Button Actions

A button can be triggered by three different types of actions:

Message Card Buttons triggered using Invoke Function

Message Card Buttons triggered using Invoke Function

	
Request POST https://cliq.zoho.com/api/v2/chats/{CHAT_ID}/message Payload data : { "text": "Sales campaign results are ready!", "card": { "theme": "prompt", "thumbnail": "https://www.zoho.com/cliq/help/restapi/images/cliqicon.png" }, "buttons": [ { "label": "Update Campaigns", "type": "+", "action": { "type": "invoke.function", "data": { "name": "update_campaigns", "owner": "li.jung@zylker.com" } } } ] }

The invoke function action in a button is used to invoke a deluge function.

Create a function to perform any custom action and make it accessible in the chat interface with the help of the invoke.function button action.

Params

name
string
The deluge function name to be invoked.
owner
string
Email ID of the function creator

Message Card Buttons triggered using Open URL

Message Card Buttons triggered using Open URL

	
Request POST https://cliq.zoho.com/api/v2/chats/{CHAT_ID}/message Payload data :{ "text": "You are invited to the Sales Annual Meet!Click to view the invitation.", "card": { "theme": "modern-inline", "thumbnail": "https://www.zoho.com/cliq/help/restapi/images/cliq_icon.png" }, "buttons": [ { "label": "View Invite", "type": "+", "action": { "type": "open.url", "data": { "web": "https://www.zoho.com/cliq/" } } } ] }

The open URL action is used to direct the user to a URL, on click of the button.

Params

web
URL
The URL to be opened on clicking the button.
Maximum number of characters allowed : 256
windows
URL
The URL to be opened on clicking the button. Exclusive for windows mobile.
Maximum number of characters allowed : 256
iOS
URL
The URL to be opened on clicking the button. Exclusive for iOS mobile.
Maximum number of characters allowed : 256
Android
URL
The URL to be opened on clicking the button. Exclusive for android mobile.
Maximum number of characters allowed : 256

Message Card Buttons triggered using System API

Message Card Buttons triggered using System API

	
Request POST https://cliq.zoho.com/api/v2/chats/{CHAT_ID}/message Payload data :{ "text": "You are invited to the Sales Annual Meet!Click to view the invitation.", "card": { "theme": "prompt", "thumbnail": "https://www.zoho.com/cliq/help/restapi/images/cliqicon.png" }, "buttons": [ { "label": "View Invite", "type": "+", "action": { "type": "system.api", "data": { "api": "startchat/1234567890" } } } ] }

System API button action is used to trigger the chat system actions, such as start chat, audio or video call etc.,

Various system actions supported in Cliq are given below with their format:

Params

api
System actions
Allowed Values: audiocall | videocall | startchat | invite
Format : system action/{id}

Message Cards

Message cards are themed messages that can be customized.

Cliq offers a variety of different message cards.

Poll

Poll


	
Request POST https://cliq.zoho.com/api/v2/chats/{CHAT_ID}/message Payload data :{ "text": "Would you be able to attend the Zylker-Sales meet up?", "card": { "title": "POLL", "theme": "poll", "thumbnail": "https://www.zoho.com/cliq/help/restapi/images/poll_icon.png" }, "buttons": [ { "label": "Yes", "type": "+", "action": { "type": "invoke.function", "data": { "name": "pollbuttons", "owner": "li.jung@zylker.com" } } }, { "label": "No", "type": "-", "action": { "type": "invoke.function", "data": { "name": "pollbuttons", "owner": "li.jung@zylker.com" } } }, { "label": "View Results", "type": "+", "action": { "type": "invoke.function", "data": { "name": "pollbuttons", "owner": "li.jung@zylker.com" } } } ] }

Customize your message structure to look like a poll message.

πŸ“ Note:The given poll message structure here has 3 buttons, the first two buttons as poll options and one more button at the bottom of the message to view the poll results. View the poll message card in our message builder. View Card!

Modern-Inline

Modern-Inline

	
	
Request POST https://cliq.zoho.com/api/v2/chats/{CHAT_ID}/message Payload data :{ "text": "New interns will be joining these teams from July.", "card": { "title":"ANNOUNCEMENT", "theme": "modern-inline", "thumbnail": "https://www.zoho.com/cliq/help/restapi/images/announce_icon.png" }, "slides": [ { "type": "table", "title": "Details", "data": { "headers": [ "Name", "Team", "Reporting To" ], "rows": [ { "Name": "Paula Rojas", "Team": "Zylker-Sales", "Reporting To": "Li Jung" }, { "Name": "Quinn Rivers", "Team": "Zylker-Marketing", "Reporting To": "Patricia James" } ] } } ], "buttons": [ { "label": "View", "type": "+", "action": { "type": "invoke.function", "data": { "name": "internlist", "owner": "li.jung@zylker.com" } } }, { "label": "Cancel", "type": "-", "action": { "type": "invoke.function", "data": { "name": "internlist", "owner": "li.jung@zylker.com" } } } ] }

This message structure will show all the details of a message in the chat window. View the modern-inline message card in our message builder. View Card!

Prompt

Prompt


	
Request POST https://cliq.zoho.com/api/v2/chats/{CHAT_ID}/message Payload data :{ "text": "Patricia James is inviting you to discuss about- Lead Marketing Strategies", "card": { "title": "Zylker-Marketing", "theme": "prompt", "thumbnail": "https://www.zoho.com/cliq/help/restapi/images/prompt_icon.png" }, "buttons": [ { "label": "Accept", "type": "+", "action": { "type": "system.api", "data": { "api": "startchat/1234567890" } } }, { "label": "Decline", "type": "-", "action": { "type": "system.api", "data": { "api": "startchat/1234567890" } } } ] }

Customize your message structure to look like a question prompting for an answer, probably like a yes or a no. View the prompt message card in our message builder. View Card!