REST API DocumentationAccess CliqTweet About UsShare this API doc Postman-Collection
  • Chats
  • Channels
  • Teams
  • Messages
  • Reminders
  • Cliq Storage
  • Custom Domain
  • Custom Email
  • CORE RESOURCES
  • Message Object
  • Mentions
  • Buttons
  • Message Cards
  • 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

    Authenticate your account by including a token in the request. All API requests must be made over HTTPS. Calls made over plain HTTP and using API without authentication will also fail. All Cliq API's need to be authenticated using an OAuth token. An OAuth token is different from the usual token based authentication.

    Note: Cliq allows token based authentication for Messaging APIs only.

    Sample request using the authtoken

    Token Based Authentication

    Request POST https://cliq.zoho.com/api/v2/buddies/{emailid}/message?authtoken=hhghfgfedhsuy4ue74ueidjhdnd Payload {"text":"Hi"}

    Sample response

    Response Code: 204 No Content

    The token based authenitcation method is allowed ONLY for Cliq's Messaging API's. There are two methods to obtain an authtoken.

    1. Copy paste this URL in your browser, once you're logged into your Zoho Account.

    https://accounts.zoho.com/apiauthtoken/create?SCOPE=ZohoCliq/InternalAPI

    2. To obtain the authtoken via an API, submit a HTTP Post request to the below given URL. The parameters to be included in the POST body as a string are mentioned in the table below.

    https://accounts.zoho.com/apiauthtoken/nb/create?SCOPE=ZohoCliq/InternalAPI&EMAIL_ID=[Your Email ID]&PASSWORD=[Password]&display_name=ZOHOCLIQ

    Parameter Description
    SCOPEZohoCliq/InternalAPI
    EMAIL_IDYour Email ID
    PASSWORDYour Password

    OAuth Token Generation

    Zoho Cliq's Rest API's follows the OAuth 2.0 protocol to authorize and authenticate requests. Each API request must include an OAuth token in order to receive a success response.

    The steps to generate an OAuth token are as folllows:

    1. Generate Client ID and Client Secret
    2. Authorization by generating the grant token
    3. Generating Access and Refresh Token
    4. Generate Access Token from Refresh Token

    Step 1: Generate Client ID and Client Secret

    Register your application 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 will be given a set of OAuth credentials known as the client id and client secret exclusive for your application. These credentials will be known to both Zoho and your application.

    Sample request to generate grant token

    Step 2: Authorization by generating grant token

    Request URL 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. The authorization URL is: https://accounts.zoho.com/oauth/v2/auth and below are the mandatory case sensitive parameters to be passed with the authorization URL.

    Sample response on generating grant token

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

    ParameterDescription
    scopeThe scope required for your extension.
    Scope for
    • channels: "Channels"
    • Messaging (Channel, Bots,Chat, Buddy) : "Webhooks"
    client_idClient id obtained during client registration.
    stateA generated value that correlates the callback with its associated authorization request.
    response_type"code"
    redirect_uriThe redirect URL mentioned during client registration.
    access_typeAccess type will be either online or offline.

    Sample request to generate access token

    Step 3: Generating Access and Refresh Token

    Request URL 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-oauthtokendd7e47321d48b8a7e312e3d6eb1a9bb8.b6c07ac766ec11da98bf6a261e24dca4

    The value for code parameter obtained in the response of Step 2 should be used to generate the access and refresh token.

    Make a POST request to the following URL: https://accounts.zoho.com/oauth/v2/token along with the below given parameters.

    ParameterDescription
    codeAuthorization code obtained during grant token generation.
    client_idClient id obtained during client registration.
    client_secretClient secret obtained during client registration.
    redirect_uriRedirect uri mentioned during client registration.
    grant_typeauthorization_code
    scopeSpecify the scope allowed for your extension.
    stateA generated value that correlates the callback with its associated authorization request.Has to be maintained the same during the entire process for authenticity.

    On making a successful request along with the authorization code, Zoho will issue a response to your application with the following information.

    Example for generating the access token using refresh token

    Step 4: Generating the access token from refresh token

    Request URL POST 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 request for generating the grant token. (Refer Step 3).

    The refresh token will always be generated by giving the parameters 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.

    Make a POST request to https://accounts.zoho.com/oauth/v2/token along with the below given parameters

    ParameterDescription
    client_idClient id obtained during client registration.
    client_secretClient secret obtained during client registration.
    redirect_uriRedirect uri mentioned during client registration.
    grant_typerefresh_token
    refresh_tokenThe refresh token obtained during access token generation.(Step 3)
    scopeSpecify the scope allowed for your extension.

    Sample request using the OAuth token

    Sample request using the OAuth token

    Request Header: Authorization:Zoho-oauthtokendd7e47321d48b8a7e312e3d6eb1a9bb8.b6c07ac766ec11da98bf Content-Type: application/json Request URL GET https://cliq.zoho.com/api/v2/channels

    The access token should be passed as a header when you call any Cliq REST API. Please note that the access token can be passed only as a request header and not as a request parameter.

    The list of mandatory headers are:

    Header NameHeader Value
    AuthorizationZoho-oauthtoken{{access token}}
    contentTypeapplication/json

    Revoking the Refresh Token

    Revoking the Refresh Token

    Request URL POST oauth/v2/token/revoke Host: https://accounts.zoho.com Query String :

    https://accounts.zoho.com/oauth/v2/token/revoke?refresh_token=1000.dd7e47321d48b8a7e312e3d6eb1a9bb8.b6c07ac766ec11da98bf6a261e24dca4

    You can revoke a refresh token by making a POST request to the following URL : https://accounts.zoho.com/oauth/v2/token/revoke with the below given parameter

    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

    Cliq API uses HTTP protocols for every action.

    ParameterDescription
    refresh_tokenThe refresh token that is to be revoked.
    MethodDescription
    GETUsed for retrieving resources.
    POSTUsed for creating resources and performing operations.
    PUTUsed for updating resources.
    DELETEUsed 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 CodeDescriptions
    2xxSuccess
    4xxBad request sent to server
    5xxServer side error
    Status CodeDescription
    200SuccessThe request was successfully completed.
    201CreatedThe request was a success and one or more resources have been created.
    204No ContentThe request was a success and the response returned has no content.
    400Bad requestThe request cannot be performed. Usually because of malformed parameter or missing parameter.
    401Unauthorized (Invalid AuthToken)Request was rejected because of invalid AuthToken.
    403ForbiddenThe user does not have enough permission or possibly not an user of the respective organization to access the resource.
    404URL Not FoundThe URL you’ve sent is wrong. It’s possible that the resource you’ve requested has been moved to another URL.
    405Method 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.
    406Not AcceptableThe response has been received but the requested response type is not supported by the browser.
    429Too many requestsToo many requests within a certain time frame.
    500Server errorCliq 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.

    Maintenance APIs

    Create a backup of all conversations (chats, channels and bots) by exporting it.

    Note: All maintenance APIs will be accessible to give a response only if you are the super admin of your organization in Cliq.

    Export Conversations

    Export Conversations

    Request Header: Content-Type: text/csv GET https://cliq.zoho.com/maintenanceapi/v2/chats?fields=title,chat_id

    Response Example

    Whats new-feature updates,1277744317795524707 Zylcal team trip,1277744317795524704 Notely release 2.0,1277744317795524710 Regional sales managers,1252218064667202771 marketing-editors,1252218129769350577

    Use this API to export specific details of all individual chats and group conversations in your Organization.

    Required OAuth Scope :

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

    Query Params

    fields
    Mandatory
    string
    Use this parameter to get the list of necessary details to be exported for each chat.
    Allowed values: title | chat_id | creation_time | last_modified_time | participant_count | total_message_count | creator_id

    Export Channels

    Export Channels

    Request Header: Content-Type: text/csv GET https://cliq.zoho.com/maintenanceapi/v2/channels?fields=name,channel_id,participant_count

    Response Example

    #announcements,15928000000004007,600 #marketing,15928000000021001,15 #devops,15928000000032005,54 #sales,15928000000054005,250 #contentreview,15928000000075001,88

    You can use this API to export details of all the channels in your Organization.

    Required OAuth Scope :

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

    Query Params

    fields
    Mandatory
    string
    Use this parameter to get the list of necessary details to be exported for all channels in your organization.
    Allowed values: name | channel_id | creation_time | last_modified_time | creator_id | description | participant_count | total_message_count | status | role

    Export Members in a Conversation

    Export Members in a Conversation

    Request Header: Content-Type: text/csv GET https://cliq.zoho.com/maintenanceapi/v2/chats/{chat_id}/members?fields=name,email_id

    Response Example

    Scott Fisher,scott.fisher@zylker.com Ryan West,ryan.west@zylker.com Olivia Palmer,olivia.palmer@zylker.com

    Use this API to exclusively export the details of members from a specific chat or channel.

    Required OAuth Scope :

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

    Query Params

    fields
    Mandatory
    string
    Use this parameter to get details of members who're participating in a conversation.
    Allowed values: name | email_id | user_id

    Export Messages

    Export Messages

    GET https://cliq.zoho.com/maintenanceapi/v2/chats/{chat_id}/messages

    Response Example

    { "data": [ { "sender": { "name": "Scott Fisher", "id": "1234567" }, "ack_key": "1528182303065", "id": "1528182303637_7763880281", "time": 1528182303637, "type": "text", "content": { "text": "Hey Olivia, are you available right now to discuss about our cross marketing with Notely?" } }, { "sender": { "name": "Scott Fisher", "id": "1234567" }, "ack_key": "", "id": "1534756983506_74468102866", "time": 1534756983506, "type": "info", "content": { "data": { "status": "completed", "callee": { "name": "Olivia", "id": "55185718" }, "duration": "00:00:09", "call_type": "audio" }, "type": "call_notification" } }, { "sender": { "name": "Olivia Palmer", "id": "9876543" }, "ack_key": "1547615832454", "id": "1547615832586_143161526662", "time": 1547615832586, "type": "text", "content": { "text": "Sure, Scott!s" } } ] }

    You can use this API to export transcripts or history of all conversations in your Organization.

    Required OAuth Scope :

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

    Sample User Object

    { "data": { "employee_id": "0976", "first_name": "Olivia", "reportingto": { "name": "Russell Thomas", "id": "54218867", "country": "ca", "email_id": "russellt@zylker.com", "zoid": "54107592", "organization_id": "null", "timezone": "Asia/Calcutta", "first_name": "Russell", "full_name": "Russell Thomas", "display_name": "Russell Thomas", "last_name": "Thomas" }, "mobile": "65465418698", "zoid": "54107592", "organization_id": "631836344", "email_id": "olivia.palmer@zylker.com", "extension": "551", "work_location": "578", "id": "631830846", "timeoffset": -43200000, "timezone": "Etc/GMT+12", "language": "English", "status": "active", "country": "United States", "department": { "name": "Creative Writers", "id": "1901318000001615007" }, "last_name": "Palmer", "full_name": "Olivia Palmer", "designation": { "name": "Content Writer", "id": "1901318000001072013" }, "display_name": "Olivia Palmer", "name": "Olivia Palmer" }, "custom_attributes": { "dateofjoining": "-" } }

    Users

    Users are members of an organisation signed up in Cliq. The user object gives information about users profile as mentioned below.

    The User Object Attributes

    id
    String
    Denotes a user's unique ID.
    email_id
    String
    Denotes a user's email address.
    display_name
    String
    The name of the user visible to the members of an organization.
    first_name
    String
    The first name of the user.
    last_name
    String
    The last name of the user.
    full_name
    String
    The full name of the user.
    organization_id
    String
    Cliq organisation ID.
    employee_id
    string
    Denotes the employee ID of the user.
    status
    String
    Denotes the status of the user (active|inactive).
    mobile
    String
    Denotes the mobile number of the user.
    extension
    String
    Extension or desk phone number of the user.
    JSON Object
    Various business divisions within an organization.
    name
    String
    Denotes the name of the department.
    id
    String
    Denotes a unique department ID.
    designation
    JSON Object
    Position given to an employee in an organization.
    name
    String
    Denotes the designation of the user .
    id
    String
    Denotes the unique ID of the designation.
    reportingto
    JSON Object
    Information about who the user reports to.
    name
    String
    Name of the person, the user is reporting to.
    id
    String
    Unique user ID of the person, the user is reporting to.
    work_location
    String
    Denotes the seating location of the user.
    country
    String
    Geographical location of the user.
    language
    String
    Default language of the user.
    timezone
    String
    Relative timezone to which the user belongs to.
    custom_attributes
    JSON Object
    These are custom fields that an admin can add to display additional information about the user.

    Retrieve a particular user

    Retrieve a particular user

    GET https://cliq.zoho.com/api/v2/users/{user_id}?fields=all

    Response Example

    { "data": { "employee_id": "213", "first_name": "Scott", "reportingto": { "name": "Tim Harrison", "id": "631831446" }, "mobile": "534 678 1234", "zoid": "54107592", "organization_id": "631836344", "email_id": "scott.fisher@zylker.com", "extension": "3129", "work_location": "C block, S-H12", "id": "631830849", "timeoffset": 19800000, "timezone": "Asia/Kolkata", "language": "English", "status": "active", "country": "United States", "department": { "name": "Zylker Corp", "id": "1901318000001424001" }, "last_name": "Fisher", "full_name": "Scott Fisher", "designation": { "name": "Leadership Staff", "id": "1901318000001072003" }, "display_name": "Scott Fisher", "name": "Scott Fisher" } }

    You can use this API to get details of a particular user.

    Required OAuth Scope :

    This API can be accessed with the OAuth scope : ZohoCliq.Users.READ
    If you are integrated with people, add these scopes: ZohoPeople.forms.READ, ZohoPeople.employee.READ, ZohoPeople.attendance.READ

    Query Params

    fields
    Optional
    String
    Use this parameter to fetch the list of user fields. If fields=all, returns all the user fields.
    Allowed values: display_name|mobile|
    department|designation.
    You can enter multiple fields by seperating them with a comma.

    Retrieve all users

    Retrieve all users

    GET https://cliq.zoho.com/api/v2/users

    Response Example

    { "data": [ { "email_id": "yoda@zylker.com", "zuid": "163315760", "zoid": "54107592", "display_name": "Yod", "name": "Yod Agbaria", "organization_id": "631836344", "id": "163315760" }, { "email_id": "noweit@zylker.com", "zuid": "163317679", "zoid": "54107592", "display_name": "No-Wei", "name": "No-Wei Ting", "organization_id": "631836344", "id": "163317679" }, { "email_id": "stellar@zylker.com", "zuid": "163319973", "zoid": "54107592", "display_name": "Stella", "name": "Stella Ramirez", "organization_id": "631836344", "id": "163319973" }, { "email_id": "done@zylker.com", "zuid": "163322101", "zoid": "54107592", "display_name": "Don", "name": "Don Evans", "organization_id": "631836344", "id": "163322101" }, { "email_id": "start@zylker.com", "zuid": "163323619", "zoid": "54107592", "display_name": "Star", "name": "Star Truman", "organization_id": "631836344", "id": "163323619" }, { "email_id": "justinc@zylker.com", "zuid": "163324578", "zoid": "54107592", "display_name": "Justin", "name": "Justin Case", "organization_id": "631836344", "id": "163324578" } ] }

    You can use this API to get details of all the users.

    Required OAuth Scope :

    This API can be accessed with the OAuth scope : ZohoCliq.Users.READ
    If you are integrated with people, add these scopes: ZohoPeople.forms.READ, ZohoPeople.employee.READ, ZohoPeople.attendance.READ

    Query Params

    fields
    Optional
    String
    Use this parameter to fetch the list of user fields. If fields=all, returns all the user fields.
    Allowed values: display_name|mobile|
    department|designation.
    You can enter multiple fields by seperating them with a comma.
    limit
    Optional
    Integer
    The number of users to be fetched. Maximum limit will be 100.
    search
    Optional
    String
    Search can be done in name and email address.
    modified_after
    Optional
    Timestamp
    Gets the list of user modified after the mentioned time.
    next_token
    Optional
    string
    Use this parameter to fetch the next immediate list of user details.
    status
    Optional
    String
    Use this parameter to fetch the list of active and inactive users.
    Allowed values: active| inactive

    User field attributes

    User fields are the attributes that defines the user profile information in an organisation. For example department, designation etc.

    User field object attributes

    id
    String
    Unique string identifier for the userfield
    name
    String
    Name of the user field.
    unique_name
    String
    A unique name identifier for the user field.
    label
    String
    The display value of the user field in the user preferred language.
    type
    String
    Denotes the type of the field.
    Allowed values: drop_down|text_field|numeric|
    date_picker
    enabled
    Boolean
    Denotes if the user field is enabled or disabled. If the user field is disabled, it will not be returned while fetching details about the user.
    mandatory
    Boolean
    Denotes if the user field is mandatory or not.
    system_defined
    Boolean
    Denotes the user field defined by Cliq.
    creation_time
    Timestamp
    The time at which the user field was created.
    last_modified_time
    Timestamp
    Denotes the time at which the changes were last made.

    Retrieve all user fields

    Retrieve all user fields

    GET https://cliq.zoho.com/api/v2/userfields

    Response Example

    { "list": [ { "system_defined": true, "unique_name": "name", "name": "Name", "id": "1901318000001264001", "creation_time": "2019-02-03T23:08:33-08:00", "last_modified_time": "2019-06-13T22:57:30-07:00", "mandatory": false, "organization_id": "631836344", "enabled": true, "type": "name_format", "label": "Name" }, { "system_defined": true, "unique_name": "reportingto", "name": "Reporting To", "id": "1901318000001264023", "creation_time": "2019-02-03T23:08:33-08:00", "last_modified_time": "2019-06-13T22:57:30-07:00", "mandatory": false, "organization_id": "631836344", "enabled": true, "type": "drop_down", "label": "Reporting To" }, { "system_defined": true, "unique_name": "extension", "name": "Extension", "id": "1901318000001264019", "creation_time": "2019-02-03T23:08:33-08:00", "last_modified_time": "2019-06-13T22:57:30-07:00", "mandatory": false, "organization_id": "631836344", "enabled": true, "type": "text_field", "label": "Extension" }, { "system_defined": true, "unique_name": "display_name", "name": "Display Name", "id": "1901318000001264021", "creation_time": "2019-02-03T23:08:33-08:00", "last_modified_time": "2019-06-13T22:57:30-07:00", "mandatory": false, "organization_id": "631836344", "enabled": true, "type": "text_field", "label": "Name" }, { "system_defined": true, "unique_name": "designation", "name": "Designation", "id": "1901318000001264017", "creation_time": "2019-02-03T23:08:33-08:00", "last_modified_time": "2019-06-13T22:57:30-07:00", "mandatory": false, "organization_id": "631836344", "enabled": true, "type": "drop_down", "label": "Designation" } ] }

    You can use this API to retrieve all the user fields

    Required OAuth Scope :

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

    List layout attributes

    List layouts are user profile information in Cliq (web,ios and android).

    List layout object attributes

    JSON Object
    Grouped entities of user fields.
    fields
    String
    Denotes the list of user fields.
    sequence_number
    Integer
    The order in which the sections are displayed.
    label
    String
    The display value of the user field in the user preferred language.
    unique_name
    String
    A unique identifier for the field.
    system_defined
    Boolean
    Denotes the user field that is defined by Cliq.

    List layouts

    List layouts

    GET https://cliq.zoho.com/api/v2/users/layout

    Response Example

    { "data": [ { "unique_name": "profile_details_android", "sections": [ { "fields": [ { "status": "enabled", "sequence_number": 1, "label": "Designation", "unique_name": "designation", "system_defined": true, "id": "1901318000001264017" }, { "status": "enabled", "sequence_number": 2, "label": "Department", "unique_name": "department", "system_defined": true, "id": "1901318000001264015" }, { "status": "enabled", "sequence_number": 3, "label": "Reporting To", "unique_name": "reportingto", "system_defined": true, "id": "1901318000001264023" }, { "status": "enabled", "sequence_number": 4, "label": "Seating Location", "unique_name": "work_location", "system_defined": true, "id": "1901318000001264005" }, { "status": "enabled", "sequence_number": 5, "label": "Employee ID", "unique_name": "employee_id", "system_defined": true, "id": "1901318000001264013" }, { "status": "enabled", "sequence_number": 6, "label": "Status", "unique_name": "status", "system_defined": true, "id": "1901318000001468001" } ], "sequence_number": 1, "label": "Work", "unique_name": "work_info", "system_defined": true }, { "fields": [ { "status": "enabled", "sequence_number": 1, "label": "Phone", "unique_name": "phone", "system_defined": true, "id": "1901318000001705005" }, { "status": "enabled", "sequence_number": 2, "label": "Mobile", "unique_name": "mobile", "system_defined": true, "id": "1901318000001264003" }, { "status": "enabled", "sequence_number": 3, "label": "Email", "unique_name": "email_id", "system_defined": true, "id": "1901318000001264011" }, { "status": "enabled", "sequence_number": 4, "label": "Extension", "unique_name": "extension", "system_defined": true, "id": "1901318000001264019" } ], "sequence_number": 2, "label": "Contact", "unique_name": "contact_info", "system_defined": true } ] } ] }

    You can use this API to fetch the list layouts.

    Required OAuth Scope :

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

    Query Params

    unique_name
    Optional
    String
    A unique name identifier for the user field. Allowed values: profile_details_android|profile_details_ios|
    profile_details_web

    Fetch list of user teams

    Fetch list of user teams

    GET https://cliq.zoho.com/api/v2/users/{userid}/teams

    Response Example

    { "data": [ { "name": "Zylcal", "creation_time": "2017-10-19T08:36:24-07:00", "organization_id": "54107592", "is_active": true, "is_moderator": true, "description": "Team working on the Zylker Calendar", "team_id": 655249742, "joined": true, "participant_count": 9 }, { "name": "Zylker Website Revamp", "creation_time": "2019-09-05T21:31:30-07:00", "organization_id": "54107592", "is_active": true, "is_moderator": true, "description": "To revamp Zylker's Website", "team_id": 695903787, "joined": true, "participant_count": 5 }, { "name": "Zylnotes", "creation_time": "2019-09-06T04:18:56-07:00", "organization_id": "54107592", "is_active": true, "is_moderator": true, "description": "Team for Zylnotes Project", "team_id": 695920980, "joined": true, "participant_count": 6 } ] }

    You can use this API to fetch the list of teams that the user belongs to. Head on over here to know more about team object attributes.

    Required OAuth Scope :

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

    Sample Chat Object

    { "name": "Taz", "creation_time": "2019-01-03T00:24:48-08:00", "last_modified_time": "2019-07-24T03:13:12-07:00", "removed": false, "chat_id": "CT_2230748078536646675_631836344-B1", "last_message_info": { "sender_id": "631830849", "message_type": "text", "time": "2019-07-24T03:13:12-07:00", "text": "https://cliq.zoho.com/api/v2/chats?limit=5&modified_before=1563162010000&modified_after=1563507610000&drafts=false", "sender_name": "Scott - Project Manager" } }

    Chats

    Chats are places where the conversation takes place from anything to everything- tasks assigned, events scheduled, brainstorming new ideas, discussions on latest technology and internal queries.

    Retrieve all direct chats

    Retrieve all direct chats

    GET https://cliq.zoho.com/api/v2/chats

    Response Example

    { "chats": [ { "name": "Taz", "creation_time": "2019-08-07T01:11:27-07:00", "creator_id": "631830849", "last_modified_time": "2019-10-21T20:30:02-07:00", "removed": false, "recipients_summary": [ { "user_id": "631830849", "name": "Scott Fisher" } ], "chat_type": "bot", "chat_id": "CT_2230748078536646675_631836344-B1", "last_message_info": { "sender_id": "b-1901318000000082001", "message_type": "text", "styles": { "highlight": true }, "time": "2019-10-21T20:30:02-07:00", "text": "The Morning Feed scheduler execution failed due to Error due to - 'UnAuthenticated Connection: 2250-631836344-zoho_db' (Line No : ) \n*Morning Feed* is requesting permission to access your *Zoho OAuth* account.\n [Allow Access](https://deluge.zoho.com/delugeauth/authenticateConnections/Public__631836344__631830849__5000000003338105)", "sender_name": "Taz" }, "pinned": false, "participant_count": 1 }, { "name": "Scrum Bot", "creation_time": "2019-10-02T02:34:45-07:00", "creator_id": "631830849", "last_modified_time": "2019-10-21T03:33:09-07:00", "removed": false, "recipients_summary": [ { "user_id": "631830849", "name": "Scott Fisher" } ], "chat_type": "chat", "chat_id": "2242135691980347663", "last_message_info": { "sender_id": "631830847", "message_type": "text", "styles": { "highlight": true }, "time": "2019-10-16T04:30:40-07:00", "text": "*Zylker Marketing Openhouse Q3* just ended. :relaxed: \nNow it's time for takeaways, just a point or two will do.\nI'll have them safe, Scout's honour! :wink:", "bot": { "name": "Zia", "image_url": "https://img.zohostatic.com/chat/default/officechat/images/default/event-bot.png" }, "sender_name": "Abigail Anderson " }, "pinned": false, "participant_count": 3 }, { "name": "Ryan West", "creation_time": "2019-10-15T03:37:28-07:00", "creator_id": "631830848", "last_modified_time": "2019-10-15T03:37:28-07:00", "removed": false, "recipients_summary": [ { "user_id": "631830848", "name": "Ryan West" }, { "user_id": "631830849", "name": "Scott Fisher" } ], "chat_type": "dm", "chat_id": "2230748224630350194", "last_message_info": { "sender_id": "631830849", "message_type": "text", "time": "2019-09-12T00:35:18-07:00", "text": "https://cliq.zoho.com/channels/marketingyw", "sender_name": "Scott Fisher" }, "pinned": false, "participant_count": 2 }, { "name": "IOS ISsue", "creation_time": "2019-09-12T00:32:36-07:00", "creator_id": "631830849", "last_modified_time": "2019-09-12T00:34:49-07:00", "removed": false, "recipients_summary": [ { "user_id": "631830849", "name": "Scott Fisher" }, { "user_id": "631830850", "name": "Lewis - QA" }, { "user_id": "630943831", "name": "Amelia Burrows" } ], "chat_type": "chat", "chat_id": "2243208694635997756", "last_message_info": { "sender_id": "631830849", "message_type": "text", "time": "2019-09-12T00:34:49-07:00", "text": "https://cliq.zoho.com/chats/2230748224630350194/messages/1566536242946_729017618142", "sender_name": "Scott Fisher" }, "pinned": false, "participant_count": 3 } ] }

    You can use this API to get details of all direct chats.

    Required OAuth Scope :

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

    Query Params

    limit
    Optional
    Integer
    The number of chats that has to be retrieved. Maximum limit will be 100.
    modified_before
    Optional
    Timestamp
    Gets the list of chats where the last message is sent before the mentioned time.
    modified_after
    Optional
    Timestamp
    Gets the list of chats where the last message is sent after the mentioned time.
    drafts
    optional
    Boolean
    If drafts=true, gets the list of chats which have draft.

    Retrieve members

    Retrieve the members of a chat

    GET https://cliq.zoho.com/api/v2/chats/{chat_id}/members

    Response Example

    { "members": [ { "user_id": "431930546", "email_id": "olivia.palmer@zylcal.com", "name": "Olivia - Content Writer" }, { "user_id": "531930850", "email_id": "scott.fisher@zylcal.com", "name": "Scott - Project Manager" } ] }

    You can use this API to get details of members of a chat.

    Required OAuth Scope :

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

    Query Params

    fields
    Optional
    String
    Use this parameter to get details of members who're participating in a conversation. Allowed values: name | email_id | user_id

    Mute a chat

    Mute a chat

    POST https://cliq.zoho.com/api/v2/chats/{chat_id}/mute

    Response Example

    Response code: 204 No Content

    You can use this API to mute a chat.

    Required OAuth Scope :

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

    Unmute a chat

    Unmute a chat

    POST https://cliq.zoho.com/api/v2/chats/{chat_id}/unmute

    Response Example

    Response code: 204 No Content

    You can use this API to unmute a chat.

    Required OAuth Scope :

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

    Leave a group chat

    Leave a group chat

    POST https://cliq.zoho.com/api/v2/chats/{chat_id}/leave

    Response Example

    Response code: 204 No content

    You can use this API to leave a group chat.

    Required OAuth Scope :

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

    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", "invite_only":false, "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

    OAuth scope for all Channels APIs: ZohoCliq.Channels.ALL

    This scope will give the basic CRUD access to all Channel APIs.

    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.
    invite_only
    boolean
    If invite_only=true, users will be able to join only when invited. This param is applicable only for Organization and Team level channels.
    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. This param is applicable for team level channels only.
    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 user 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", "invite_only" : false, "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
    Mandatory
    Allowed values
    organization|team|private|external
    Assigning an access level to the channel.
    invite_only
    Optional
    default is false
    Boolean
    If invite_only=true, users will be able to join only when invited. This param is applicable only for Organization and Team level channels.
    team_ids
    Mandatory if level=team
    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", "invite_only" : false, "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 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", "invite_only" : false, "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", "invite_only" : false, "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.

    Tip: Refer our help guide on update channel permissions

    Required OAuth Scope :

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

    Required Params

    admin_permission
    Optional
    JSON Object
    The permission given to the admin of the channel.
    moderator_permission
    Optional
    JSON Object
    The permission given to the moderator of the channel.
    member_permission
    Optional
    JSON Object
    The permission given to the member of the channel.

    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", "invite_only" : false, "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

    Tip: 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", "invite_only" : false, "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

    Sample Teams Object

    Teams

    { "name": "Zylker Support", "creation_time": "2016-12-13T16:50:44+05:30", "team_id": "53797404", "participant_count": 3, "description": "Exclusive team with Zylker Support Professionals", "is_active": "true", "organization_id": "53787097", "joined": false }

    Cliq Teams are members of your organization just grouped together based on any criteria.

    OAuth Scope

    OAuth scope for all Teams APIs: ZohoCliq.Teams.ALL

    This scope will give the basic CRUD access to all Teams APIs.

    The Team Object Attributes

    name
    string
    Name of the team.
    description
    string
    Description of the team.
    participant_count
    long
    The total number of participants in the team.
    team_id
    string
    Unique id of the team.
    organization_id
    string
    This unique id represents the organization under which the team is present.
    is_active
    boolean
    Denotes if the team is active or not.
    joined
    boolean
    Denotes if the user is a participant of the team or not.
    creation_time
    timestamp
    The time at which the team was created.

    Create a Team

    Create a Team

    POST https://cliq.zoho.com/api/v2/teams Payload : { "name": "Zylker Support", "description": "Exclusive team with Zylker Support Professionals", "user_ids": [ "100100","120001","100102"] }

    Response Example

    { "name": "Zylker Support", "creation_time": "2017-11-08T15:18:49+05:30", "organization_id": "53787097", "is_active": true, "is_moderator": true, "description": "Exclusive team with Zylker Support Professionals", "team_id": 54342319, "joined": true, "participant_count": 3 }

    You can use this API to create teams.

    Required OAuth Scope :

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

    QueryParams

    name
    Mandatory
    string
    Name of the team to be created.
    description
    Optional
    string
    Description of the team to be created.
    user_ids
    Optional
    array
    The user ids of the users to be included as members of the team.

    Retrieve a Team

    Retrieve a Team

    GET https://cliq.zoho.com/api/v2/teams/{team_id}

    Response Example

    { "name": "Zylker Support", "creation_time": "2016-12-13T16:50:44+05:30", "team_id": "53797404", "participant_count": 3, "description": "Exclusive team with Zylker Support Professionals", "is_active": "true", "organization_id": "53787097", "joined": false }

    You can use this to get details of a single team.

    Required OAuth Scope :

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

    Update a Team

    Update a Team

    PUT https://cliq.zoho.com/api/v2/teams/{team_id} Payload { "name": "Zylker Support", "description": "To post all the support tickets from customers" }

    Response Example

    { "name": "Zylker Support", "creation_time": "2017-11-08T15:18:49+05:30", "organization_id": "53787097", "is_active": true, "is_moderator": true, "description": "To post all the support tickets from customers", "team_id": "54342319", "joined": true, "participant_count": 2 }

    You can use this to update details of a single team.

    Required OAuth Scope :

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

    QueryParams

    name
    Optional
    string
    Update the name of the team.
    description
    Optional
    string
    Update the description of the team.

    Delete a Team

    Delete a Team

    DELETE https://cliq.zoho.com/api/v2/teams/{team_id}

    Response Example

    Response Code: 204 OK

    You can use this to delete a single team.

    Required OAuth Scope :

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

    List all Teams

    List all Teams

    GET https://cliq.zoho.com/api/v2/teams?joined={true}

    Response Example

    { "teams": [ { "name": "Zylker Support", "creation_time": "2016-12-13T16:50:44+05:30", "organization_id": "53787097", "is_active": true, "is_moderator": false, "description": "Exclusive team with Zylker Support Professionals", "team_id": 53797404, "joined": true, "participant_count": 3 }, { "name": "Zylker Marketing", "creation_time": "2016-11-30T13:48:17+05:30", "organization_id": "53787097", "is_active": true, "is_moderator": true, "description": "To discuss Zylker Marketing Strategies", "team_id": 53786870, "joined": true, "participant_count": 4 } ] }

    You can use this to get the list of all teams.

    Required OAuth Scope :

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

    QueryParams

    joined
    Optional
    boolean
    If joined = true, then the response contains the list of teams containing the user as a member.

    Get Team Members

    Get Team Members

    GET https://cliq.zoho.com/api/v2/teams/{team_id}/members

    Response Example

    { "members": [ { "user_id": "53773501", "display_name": "Scott Fisher", "is_moderator": false }, { "user_id": "53997102", "display_name": "Quinn Rivers", "is_moderator": false }, { "user_id": "53766705", "display_name": "Li Jung", "is_moderator": false } ] }

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

    Required OAuth Scope :

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

    Add Team Members

    Add Team Members

    POST https://cliq.zoho.com/api/v2/teams/{team_id}/members Payload: { "user_ids": [ "44344926", "54667722" ] }

    Response Example

    { "members": [ { "user_id": "44344926", "display_name": "Olivia Palmer", "is_moderator": false }, { "user_id": "54667722", "display_name": "Quinn Rivers", "is_moderator": false } ] }

    You can use this to add members in a team.

    Required OAuth Scope :

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

    Delete Team Members

    Delete Team Members

    DELETE https://cliq.zoho.com/api/v2/teams/{team_id}/members/{user_id}

    Response Example

    Response Code : 204 OK

    You can use this to delete members in a team.

    Required OAuth Scope :

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

    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.

    Messaging APIs can be accessed by three different methods:

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

    2. Deluge tasks: zoho.cliq.postToChat, zoho.cliq.postToChannel, zoho.cliq.postToBot.
    3. Authtoken: Using an authtoken.
    Tip: Click this link to know how to create an authtoken! Learn how to create an authtoken

    Get messages

    Get messages

    Request GET https://cliq.zoho.com/api/v2/chats/{CHAT_ID}/messages?limit=4

    Response Example

    { "data": [ { "sender": { "name": "Scott", "id": "12345678" }, "id": "1542711601585_349430767610289", "time": 1542711601585, "type": "text", "content": { "text": "Hi! What time is the review meeting today?" } }, { "sender": { "name": "Olivia", "id": "22345678" }, "id": "1542711601631_349435062577631", "time": 1542711601631, "type": "text", "content": { "text": "Hey Scott! It's at 4:00 PM." } }, { "sender": { "name": "Scott", "id": "12345678" }, "id": "1542798001273_349439443944569", "time": 1542798001273, "type": "text", "content": { "text": "Thanks! My presentation will focus on- Feature updates for Q1" } }, { "sender": { "name": "Scott", "id": "12345678" }, "id": "1543384891842_351840917549285", "time": 1543384891842, "type": "file", "content": { "thumbnail": { "height": "230", "width": "400", "blur_data": "/9j/4AAQSkZJRgABAgAAAQABAAD/2wBDABALDA4MChAODQ4SERATGCgaGBYWGDEjJR0oOjM9PDkzODdASFxOQERXRTc4UG1RV19iZ2hnPk1xeXBkeFxlZ2P/2wBDARESEhgVGC8aGi9jQjhCY2NjY2NjY2NjY2NjY2NjY2NjY2NjY2NjY22jK/dwMdD65q/QKACiiigApAQSR6HBpTTcBNxUcscn+X9KAHUU1TvyGAI9KUKqk7Rj6UALigADpSA01VVCxRVUsdzYGMnpk/kKAH0UmaKAP//Z" }, "file": { "name": "Feature-overview.jpg", "type": "image/jpeg", "dimensions": { "height": 3510, "size": 559008, "width": 2552 }, "id": "f3791c2279a67f6e5cbc8e1beb41ded85da2bdc672e2496ba9af50c0c24c8e2e453862a8a28becb86f859ab142d44633b05a8fb2ff34955c9e9824527c15cd03" }, "comment": "" } } ] }

    Use this API to get messages from a chat conversation that you have access to.

    Required OAuth Scope :

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

    Query Params

    fromtime
    Optional
    long
    Time from when you want to retrieve messages from the chat. From time should be passed in milliseconds.
    totime
    Optional
    long
    Time till when you want to retrieve messages from the chat. To time should be passed in milliseconds.
    limit
    Optional
    string
    The number of messages to be retrieved. If limit is not specified, maximum of 100 messages will be retrieved.

    Retrieve a message

    Retrieve a message

    Request GET https://cliq.zoho.com/api/v2/chats/{CHAT_ID}/messages/{MESSAGE_ID}

    Response Example

    { "sender": { "name": "Scott Fisher", "id": "12345678" }, "id": "1543320941513_23291239955324", "time": 1543320941513, "type": "text", "content": { "text": "Hello Guys!" } }

    Use this API to retrieve a message from a chat conversation that you have access to. Get the message's unique ID by calling the get messages API.

    Required OAuth Scope :

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

    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 {"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. Take a look at the GIF below.

    How to find the channel unique name?

    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(,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 {"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 {"text":"Hi"}

    To broadcast message to all subscribers of the bot

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

    To post message to specific subscribers of the bot

    Request POST https://cliq.zoho.com/api/v2/bots/{BOT_UNIQUE_NAME}/message Payload { "text": "Hi", "userids": "1234556,6789167,5678956" } (OR) Request POST https://cliq.zoho.com/api/v2/bots/{BOT_UNIQUE_NAME}/message Payload { "text": "Hi", "userids": "scott.fisher@zylker.com,li.jung@zylker.com" }

    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. The bot unique name can be obtained from the bot's API endpoint URL.

    To find API endpoint URL, just click on the Bots section on Cliq's left side bar and hover over your bot of interest. The bot preview will have the API endpoint URL. Copy the bot unique name from this URL.

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

    Find the bot unique name from the API Endpoint

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

    zoho.cliq.postToBot(,response);

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

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

    Note 3: To post message to specific bot subscribers, use the useridskey in the response map and pass the email IDs or the user IDs of the respective bot subscribers.

    response = Map();
    response.put("userids","1234567,5678493");

    Note 4: The broadcast key supersedes the userids key. That is, in cases where both the keys are defined, message will be broadcasted to all subscribers of the bot.

    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 {"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(,message);

    Required OAuth Scope :

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

    To post message to a user using email ID

    Post message to a user

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

    To post message to a user using User ID

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

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

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

    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

    Edit a message

    Edit a message

    Request PUT https://cliq.zoho.com/api/v2/chats/{CHAT_ID}/messages/{MESSAGE_ID} Payload {"text":"Hey!"}

    Response Example

    Response Code: 204 No Content

    Use this API to edit a message in a chat conversation. Get the message's unique ID by using the get messages API.

    Required OAuth Scope :

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

    Share files in a channel using channel unique name

    Share files in a channel

    Request POST https://cliq.zoho.com/api/v2/channelsbyname/{CHANNEL_UNIQUE_NAME}/files Payload Content-Type: multipart/form-data; boundary=----WebKitFormBoundary7MA4YWxkTrZu0gW ------WebKitFormBoundary7MA4YWxkTrZu0gW Content-Disposition: form-data; name="file"; filename="zylker-sales.pdf" Content-Type: application/pdf Content of zylker-sales.pdf ------WebKitFormBoundary7MA4YWxkTrZu0gW Content-Disposition: form-data; name="file"; filename="revenue-chart.jpg" Content-Type: image/jpeg Content of revenue-chart.jpg ------WebKitFormBoundary7MA4YWxkTrZu0gW Content-Disposition: form-data; name="comments" ["Annual Zylker Sales Report","Revenue Chart for Q3"] ------WebKitFormBoundary7MA4YWxkTrZu0gW--

    Response Example

    Response Code:204 No Content

    Share files in a channel using channel ID

    Request POST https://cliq.zoho.com/api/v2/channels/{CHANNEL_ID}/files Payload Content-Type: multipart/form-data; boundary=----WebKitFormBoundary7MA4YWxkTrZu0gW ------WebKitFormBoundary7MA4YWxkTrZu0gW Content-Disposition: form-data; name="file"; filename="zylker-sales.pdf" Content-Type: application/pdf Content of zylker-sales.pdf ------WebKitFormBoundary7MA4YWxkTrZu0gW Content-Disposition: form-data; name="file"; filename="revenue-chart.jpg" Content-Type: image/jpeg Content of revenue-chart.jpg ------WebKitFormBoundary7MA4YWxkTrZu0gW Content-Disposition: form-data; name="comments" ["Annual Zylker Sales Report","Revenue Chart for Q3"] ------WebKitFormBoundary7MA4YWxkTrZu0gW--

    Response Example

    Response Code:204 No Content

    Share files in a channel using the channel unique name or channel ID. Be sure to replace the endpoint /message in the messaging API to /files. The content of the file should be of type multipart/form-data

    Arguments

    files
    multipart/form-data
    Required
    The file to be shared.
    File size limit : 50 MB and Maximum number of files that can be shared at a time is : 10
    comments
    string array
    Optional
    The comments to be added for each file.

    Required OAuth Scope :

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

    Share files to a bot

    Share files to a bot

    Request POST https://cliq.zoho.com/api/v2/bots/{BOT_UNIQUE_NAME}/files Payload Content-Type: multipart/form-data; boundary=----WebKitFormBoundary7MA4YWxkTrZu0gW ------WebKitFormBoundary7MA4YWxkTrZu0gW Content-Disposition: form-data; name="file"; filename="zylker-sales.pdf" Content-Type: application/pdf Content of zylker-sales.pdf ------WebKitFormBoundary7MA4YWxkTrZu0gW Content-Disposition: form-data; name="file"; filename="revenue-chart.jpg" Content-Type: image/jpeg Content of revenue-chart.jpg ------WebKitFormBoundary7MA4YWxkTrZu0gW Content-Disposition: form-data; name="comments" ["Annual Zylker Sales Report","Revenue Chart for Q3"] ------WebKitFormBoundary7MA4YWxkTrZu0gW--

    Response Example

    { "user_ids": [ "66578893" ] }

    Share files to a bot using the bot unique name. Be sure to replace the /message endpoint in the messaging API with /files. The content of the file should be of type multipart/form-data

    Arguments

    files
    multipart/form-data
    Required
    The file to be shared.
    File size limit : 50 MB and Maximum number of files that can be shared at a time is : 10
    comments
    string array
    Optional
    The comments to be added for each file.

    Required OAuth Scope :

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

    Share files in a chat

    Share files in a chat

    Request POST https://cliq.zoho.com/api/v2/chats/{CHAT_ID}/files Payload Content-Type: multipart/form-data; boundary=----WebKitFormBoundary7MA4YWxkTrZu0gW ------WebKitFormBoundary7MA4YWxkTrZu0gW Content-Disposition: form-data; name="file"; filename="zylker-sales.pdf" Content-Type: application/pdf Content of zylker-sales.pdf Content of zylker-sales.pdf ------WebKitFormBoundary7MA4YWxkTrZu0gW Content-Disposition: form-data; name="file"; filename="revenue-chart.jpg" Content-Type: image/jpeg Content of revenue-chart.jpg ------WebKitFormBoundary7MA4YWxkTrZu0gW Content-Disposition: form-data; name="comments" ["Annual Zylker Sales Report","Revenue Chart for Q3"] ------WebKitFormBoundary7MA4YWxkTrZu0gW--

    Response Example

    Response Code:204 No Content

    Share files in a chat using the Chat ID. Be sure to replace the /message endpoint in the messaging API with /files. The content of the file should be of type multipart/form-data

    Arguments

    files
    multipart/form-data
    Required
    The file to be shared.
    File size limit : 50 MB and Maximum number of files that can be shared at a time is : 10
    comments
    string array
    Optional
    The comments to be added for each file.

    Required OAuth Scope :

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

    Share files to a user using Email ID

    Share files to a user

    Request POST https://cliq.zoho.com/api/v2/buddies/{emailid}/files Payload Content-Type: multipart/form-data; boundary=----WebKitFormBoundary7MA4YWxkTrZu0gW ------WebKitFormBoundary7MA4YWxkTrZu0gW Content-Disposition: form-data; name="file"; filename="zylker-sales.pdf" Content-Type: application/pdf Content of zylker-sales.pdf ------WebKitFormBoundary7MA4YWxkTrZu0gW Content-Disposition: form-data; name="file"; filename="revenue-chart.jpg" Content-Type: image/jpeg Content of revenue-chart.jpg ------WebKitFormBoundary7MA4YWxkTrZu0gW Content-Disposition: form-data; name="comments" ["Annual Zylker Sales Report","Revenue Chart for Q3"] ------WebKitFormBoundary7MA4YWxkTrZu0gW--

    Response Example

    Response Code:204 No Content

    Share files to a user using User ID

    Request POST https://cliq.zoho.com/api/v2/buddies/{zuid}/files Payload Content-Type: multipart/form-data; boundary=----WebKitFormBoundary7MA4YWxkTrZu0gW ------WebKitFormBoundary7MA4YWxkTrZu0gW Content-Disposition: form-data; name="file"; filename="zylker-sales.pdf" Content-Type: application/pdf Content of zylker-sales.pdf ------WebKitFormBoundary7MA4YWxkTrZu0gW Content-Disposition: form-data; name="file"; filename="revenue-chart.jpg" Content-Type: image/jpeg Content of revenue-chart.jpg ------WebKitFormBoundary7MA4YWxkTrZu0gW Content-Disposition: form-data; name="comments" ["Annual Zylker Sales Report","Revenue Chart for Q3"] ------WebKitFormBoundary7MA4YWxkTrZu0gW--

    Response Example

    Response Code:204 No Content

    Share files to a user using their Email ID or User ID. Be sure to replace the /message endpoint in the messaging API with /files. The content of the file should be of type multipart/form-data

    Arguments

    files
    multipart/form-data
    Required
    The file to be shared.
    File size limit : 50 MB and Maximum number of files that can be shared at a time is : 10
    comments
    string array
    Optional
    The comments to be added for each file.

    Required OAuth Scope :

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

    Sample Reminder Object

    Reminders

    { "creator": { "name": "Scott Fisher", "id": 1234567 }, "creation_time": 1506398400000 "content": "Appathon Submissions Process Review", "time": 1506571200000, "users": [ { "deleted": false, "name": "Ryan West", "completed": false, "id": "2343536" } ], "id": "11360000000204003" }

    Reminders in Cliq are essential to micromanage your tasks effortlessly.

    OAuth Scope

    OAuth scope for all Reminder APIs: ZohoCliq.Reminders.ALL

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

    Reminder Object Attributes

    JSON Object
    Reminder creator's details
    name
    string
    Reminder creator's name.
    id
    string
    Reminder creator's user ID.
    content
    string
    The reminder content.
    creation_time
    long
    Reminder creation time.
    time
    long
    Time when the reminder should trigger.
    Time format is in milliseconds
    id
    string
    The reminder ID.
    chat_id
    long
    Unique ID of a chat for which a reminder is set. This param is returned only for reminders that are created on a message/assigned to a channel or chat.
    JSON Object
    Details of the message that was set as reminder.
    message
    string
    Message text that is set as the reminder content
    chat_id
    long
    Unique ID of the chat containing the message
    sender_id
    long
    Unique ID of the user who sent the message
    Array of JSON Objects
    Details of the user(s) to whom the reminder is set.
    Reminders can be set either for self or multiple users as well.
    name
    string
    Name of the reminder assignee
    id
    string
    User ID of the reminder assignee
    deleted
    boolean
    Boolean indicating if the user has deleted the reminder or not. Default value is set as false.
    completed
    string
    Boolean indicating if the user has completed the reminder or not. Default value is set as false.
    snoozed_time
    long
    Snooze time added to the reminder

    Create a Reminder

    Create and assign reminders to yourself, your team mate/colleague, assign reminder to a chat or a channel or set a message in chat as a reminder. Each reminder type comes with it's own set of necessary parameters to be passed in the request body.

    Add a Self Reminder

    Add a Self Reminder

    Request POST https://cliq.zoho.com/api/v2/reminders Payload { "content": "Content Review for ZylCal", "time": "1506571200000" }

    Sample Response

    { "creation_time": 1506398400000, "creator": { "name": "Scott Fisher", "id": 1234567 }, "completed": false, "content": "Content Review for ZylCal", "time": 1506571200000 , "users": [ { "deleted": false, "name": "Scott Fisher", "completed": false, "id": "1234567" } ], "id": "11360000000204007" }

    Use this API to set a self reminder.

    Required OAuth Scope :

    This API can be accessed with the following OAuth scope :ZohoCliq.Reminders.CREATE or to get access to all Reminder API's, use the scope ZohoCliq.Reminders.ALL

    Query Params

    content
    Required
    string
    The content of the reminder.
    time
    Optional
    long
    The time at which the reminder should trigger.
    Time should be given in milliseconds.

    Add a Reminder to Users

    Add a Reminder to Users

    Request POST https://cliq.zoho.com/api/v2/reminders Payload { "content": "ZylCal Marketplace Apps Review", "time": "1506571200000", "user_ids": [ "2343536", "9876543" ] }

    Sample Response

    { "creation_time": 1506398400000, "creator": { "name": "Scott Fisher", "id": 12345678 }, "completed": false, "content": "Functionality design review - Reminders", "time": 1506571200000, "users": [ { "deleted": false, "name": "Ryan West", "completed": false, "id": "2343536" }, { "deleted": false, "name": "Olivia Palmer", "completed": false, "id": "9876543" } ], "id": "11360000000204003" }

    Use this API to create a reminder for other users by giving their User IDs.

    Required OAuth Scope :

    This API can be accessed with the following OAuth scope :ZohoCliq.Reminders.CREATE or to get access to all the API's, use the scope ZohoCliq.Reminders.ALL

    Query Params

    content
    Required
    string
    The content of the reminder.
    time
    Optional
    long
    The time at which the reminder should trigger.
    Time should be given in milliseconds.
    user_ids
    Required
    string array
    User ID's of the users to whom the reminder is set. Maximum number of assignees that can be added to a reminder: 4

    Add Reminder for a Chat/Channel

    Add Reminder for a Chat/Channel

    Request POST https://cliq.zoho.com/api/v2/reminders Payload { "content": "Appathon submissions review", "time": "1506571200000", "chat_ids": [ "1277744356562927809" ] }

    Sample Response

    { "creation_time": 1506398400000, "creator": { "name": "Scott Fisher", "id": 12345678 }, "completed": false, "content": "Appathon submissions review", "time": 1506571200000, "chats": [ { "completed": false, "chat_id": "1277744356562927809", "title": "Zylker Appathon" } ], "id": "11360000000204011" }

    Create a reminder for a chat or a channel by giving the chat IDs.

    Required OAuth Scope :

    This API can be accessed with the following OAuth scope :ZohoCliq.Reminders.CREATE or to get access to all the API's you can use the scope ZohoCliq.Reminders.ALL

    Query Params

    content
    Required
    string
    The content of the reminder.
    time
    Required
    long
    The time at which the reminder should trigger.
    Time should be given in milliseconds.
    chat_ids
    Required
    string array
    Unique ID of the chat for which a reminder is added. Maximum number of chats that can be added to a reminder: 1

    Set a message in chat as Reminder

    Set a message in chat as Reminder

    Request POST https://cliq.zoho.com/api/v2/reminders Payload { "message_id": "1536662288710", "chat_id" : "1234572980899407452", "time": "1506571200000" }

    Sample Response

    { "users": [ { "deleted": false, "name": "Ryan West", "completed": false, "id": "2343536" } ], "id": "11360000000204021", "time": 1506571200000, "creator": { "name": "Scott Fisher", "id": 12345678 }, "creation_time": 1506398400000, "completed": false, "content": "Annual Sales Report Q3 due tomorrow", "message": { "sender_id": "12345678", "message_id": 1536662288710, "chat_id": "1234572980899407452" } }

    Use this API to set a message in chat as a reminder.

    Required OAuth Scope :

    This API can be accessed with the following OAuth scope :ZohoCliq.Reminders.CREATE or to get access to all the API's you can use the scope ZohoCliq.Reminders.ALL

    Query Params

    content
    Optional
    string
    The content of the reminder.
    time
    Required
    long
    The time at which the reminder should trigger. Time should be given in milliseconds.
    message_id
    Required
    long
    Unique ID of the message, to be set as reminder.
    chat_id
    Required
    long
    Unique ID of the chat for which a reminder is added.
    user_ids
    Optional
    string array
    User ID's of the users to whom the reminder is set. Maximum number of assignees that can be added to a reminder: 4

    Retrieve a Reminder

    Retrieve a Reminder

    Request GET https://cliq.zoho.com/api/v2/reminders/{reminderID}

    Sample Response for Retrieve a Reminder assigned to a Chat/Channel

    { "creation_time": 1506398400000, "creator": { "name": "Scott Fisher", "id": 1234567 }, "completed": false, "content": "Appathon submissions review", "time": 1506571200000, "chats": [ { "completed": false, "chat_id": "1277744356562927809", "title": "Zylker Appathon" } ], "id": "11360000000204011" } *Note: Responses for other reminder types might vary.

    Use this API to get details of a particular reminder by giving the reminder ID in the query. You can get the reminder ID from the response of the list of all reminders API.

    Required OAuth Scope :

    This API can be accessed with the following OAuth scope :ZohoCliq.Reminders.READ or to get access to all the API's you can use the scope ZohoCliq.Reminders.ALL

    Update a Reminder

    Update a Reminder

    Request PUT https://cliq.zoho.com/api/v2/reminders/{reminderID} Payload { "content": "Appathon submissions code and content review" }

    Sample Response for Update a Reminder assigned to a Chat/Channel

    { "creation_time": 1506398400000, "creator": { "name": "Scott Fisher", "id": 1234567 }, "completed": false, "content": "Appathon submissions code and content review", "time" : 1506571200000, "chats": [ { "completed": false, "chat_id": "1277744356562927809", "title": "Zylker Appathon" } ], "id": "11360000000207025" } *Note: Responses for other reminder types might vary.

    Use this API to edit details of a particular reminder by giving the reminder ID. You can get the reminder ID from the response of the list of all reminders API.

    Required OAuth Scope :

    This API can be accessed with the following OAuth scope :ZohoCliq.Reminders.UPDATE or to get access to all the API's you can use the scope ZohoCliq.Reminders.ALL

    Query Params

    content
    Optional
    string
    The content of the reminder to be updated. Note that, any one of the optional parameter has to be passed.
    time
    Optional
    long
    The new updated time to trigger the reminder. Note that, any one of the optional parameter has to be passed.

    Delete a Reminder

    Delete a Reminder

    Request DELETE https://cliq.zoho.com/api/v2/reminders/{reminderID}

    Sample Response

    Response Code: 204 No Content

    Use this API to delete a particular reminder by giving the reminder ID. You can get the reminder ID from the response of the list of all reminders API.

    Required OAuth Scope :

    This API can be accessed with the following OAuth scope :ZohoCliq.Reminders.DELETE or to get access to all the API's you can use the scope ZohoCliq.Reminders.ALL

    Delete Reminders

    Delete Reminders

    Request DELETE https://cliq.zoho.com/api/v2/reminders/batch Payload { "reminder_ids":[11360000000205005,11360000000205009] }

    Sample Response

    Response Code: 204 No Content

    Use this API to delete a list of reminders by providing the reminder ID. You can get the reminder ID from the response of the list of all reminders API.

    Note: The maximum number of reminders that can be deleted at once is 20.

    Required OAuth Scope :

    This API can be accessed with the following OAuth scope :ZohoCliq.Reminders.DELETE or to get access to all the API's you can use the scope ZohoCliq.Reminders.ALL

    Query Params

    reminder_ids
    Required
    string array
    Unique IDs of the reminders to be deleted. Maximum limit: 20

    Delete Completed Reminders

    Delete Completed Reminders

    Request DELETE https://cliq.zoho.com/api/v2/reminders/clearcompleted Payload { "category": "mine-completed" }

    Sample Response

    Response Code: 204 No Content

    Use this API to delete the list of reminders that are marked as complete.

    Required OAuth Scope :

    This API can be accessed with the following OAuth scope :ZohoCliq.Reminders.DELETE or to get access to all the API's you can use the scope ZohoCliq.Reminders.ALL

    Query Params

    category
    Required
    string
    Provide the category under which you would like to clear all the completed reminders. Category can be either: mine-completed | others-completed

    Mark a Reminder as Complete

    Mark a Reminder as Complete

    Request PUT https://cliq.zoho.com/api/v2/reminders/{reminderID}/complete

    Sample Response

    Response Code: 204 No Content

    Use this API to mark a reminder as complete by providing the reminder ID. You can get the reminder ID from the response of the list of all reminders API.

    Required OAuth Scope :

    This API can be accessed with the following OAuth scope :ZohoCliq.Reminders.UPDATE or to get access to all the API's you can use the scope ZohoCliq.Reminders.ALL

    Note: Reminders set for yourself (i.e falling under the mine category) can be marked as complete or incomplete.

    Mark a Reminder as Incomplete

    Mark a Reminder as Incomplete

    Request PUT https://cliq.zoho.com/api/v2/reminders/{reminderID}/incomplete

    Sample Response

    Response Code: 204 No Content

    Use this API to mark a reminder as incomplete by providing the reminder ID. You can get the reminder ID from the response of the list of all reminders API.

    Required OAuth Scope :

    This API can be accessed with the following OAuth scope :ZohoCliq.Reminders.UPDATE or to get access to all the API's you can use the scope ZohoCliq.Reminders.ALL

    Note: Reminders set for yourself (i.e falling under the mine category) can be marked as complete or incomplete.

    Snooze a Reminder

    Snooze a Reminder

    Request PUT https://cliq.zoho.com/api/v2/reminders/{reminderID}/snooze Payload { "time": "900000" }

    Sample Response

    Response Code: 204 No Content

    Use this API to snooze a reminder by providing the reminder ID. You can get the reminder ID from the response of the list of all reminders API.

    Required OAuth Scope :

    This API can be accessed with the following OAuth scope :ZohoCliq.Reminders.UPDATE or to get access to all the API's you can use the scope ZohoCliq.Reminders.ALL

    Query Params

    time
    Required
    long
    Indicates the amount of time (in milliseconds) to delay the reminder. The snooze time will be applied to the current time and not the reminder due time.

    Dismiss a Snoozed Reminder

    Dismiss a Snoozed Reminder

    Request PUT https://cliq.zoho.com/api/v2/reminders/{reminderID}/dismisssnooze

    Sample Response

    Response Code: 204 No Content

    Use this API to dismiss a snoozed reminder by providing the reminder ID. You can get the reminder ID from the response of the list of all reminders API.

    Required OAuth Scope :

    This API can be accessed with the following OAuth scope :ZohoCliq.Reminders.UPDATE or to get access to all the API's you can use the scope ZohoCliq.Reminders.ALL

    Assign Users to a Reminder

    Assign Users to a Reminder

    Request POST https://cliq.zoho.com/api/v2/reminders/{reminderID}/users Payload { "user_ids": [ 1234567 ] }

    Sample Response

    { "creation_time": 1506398400000, "creator": { "name": "Ryan West", "id": 2343536 }, "completed": false, "content": "Functionality Design Review Meeting", "users": [ { "deleted": false, "name": "Scott Fisher", "completed": false, "id": "1234567" }, { "deleted": false, "name": "Olivia Palmer", "completed": false, "id": "9876543" } ], "id": "11360000000205013" }

    Use this API to assign users to a reminder. Note that a maximum of 4 users can be assigned to a reminder.

    Note: This API will only work with reminders added in the Others category i.e reminders assigned by you to others

    Required OAuth Scope :

    This API can be accessed with the following OAuth scope :ZohoCliq.Reminders.UPDATE or to get access to all the API's you can use the scope ZohoCliq.Reminders.ALL

    Query Params

    user_ids
    Required
    array string
    IDs of users who would be assigned this reminder.

    Unassign a user from a Reminder

    Unassign a user from a Reminder

    Request DELETE https://cliq.zoho.com/api/v2/reminders/{reminderID}/users/{User ID}

    Sample Response

    { "creation_time": 1536648937889, "creator": { "name": "Ryan West", "id": 2343536 }, "completed": false, "content": "Functionality Design Review Meeting", "users": [ { "deleted": false, "name": "Olivia Palmer", "completed": false, "id": "9876543" } ], "id": "11360000000205013" }

    Use this API to unassign users from a reminder, by providing their User ID.

    Note: This API will work with reminders added in the Others category, i.e reminders assigned by you to others

    Required OAuth Scope :

    This API can be accessed with the following OAuth scope :ZohoCliq.Reminders.UPDATE or to get access to all the API's you can use the scope ZohoCliq.Reminders.ALL

    Remind Assignee

    Remind Assignee

    Request PUT https://cliq.zoho.com/api/v2/reminders/{reminderID}/users/{User ID}/remind

    Sample Response

    [ { "deleted": false, "name": "Ryan West", "completed": false, "id": "2343536" } ]

    Use this API to trigger a notification in Taz to a particular assignee who is yet to mark the reminder as complete.

    Note: This API will work with reminders added in the Others category, i.e reminders assigned by you to others

    Required OAuth Scope :

    This API can be accessed with the following OAuth scope :ZohoCliq.Reminders.UPDATE or to get access to all the API's you can use the scope ZohoCliq.Reminders.ALL

    Remind Assignees

    Remind Assignees

    Request PUT https://cliq.zoho.com/api/v2/reminders/{reminderID}/remind

    Sample Response

    [ { "deleted": false, "name": "Ryan West", "completed": false, "id": "2343536" }, { "deleted": false, "name": "Olivia Palmer", "completed": false, "id": "9876543" } ]

    Use this API to trigger a notification in Taz to a reminder's assignees who are yet to mark the reminder as complete.

    Note: This API will work with reminders added in the Others category, i.e reminders assigned by you to others

    Required OAuth Scope :

    This API can be accessed with the following OAuth scope :ZohoCliq.Reminders.UPDATE or to get access to all the API's you can use the scope ZohoCliq.Reminders.ALL

    Get List of All Reminders

    Get List of All Reminders

    Request GET https://cliq.zoho.com/api/v2/reminders

    Sample Response

    { "category": "mine", "list": [ { "creation_time": 1506398400000, "creator": { "name": "Ryan West", "id": "2343536" }, "completed": false, "content": "Annual sales review report due tomorrow", "time": 1506571200000, "users": [ { "deleted": false, "name": "Scott Fisher", "completed": false, "id": "1234567" } ], "id": "11360000000204033" }, { "creation_time": 1506398400000, "creator": { "name": "Scott Fisher", "id": 1234567 }, "completed": false, "content": "Review appathon extension submissions", "users": [ { "deleted": false, "name": "Scott Fisher", "completed": false, "id": "1234567" } ], "id": "11360000000204029" }, { "users": [ { "deleted": false, "name": "Scott Fisher", "completed": false, "id": "1234567" } ], "id": "11360000000207007", "creator": { "name": "Scott Fisher", "id": 1234567 }, "creation_time": 1506398400000, "completed": false, "content": "Dormant users campaign report", "message": { "sender_id": "2343536", "message_id": 1536853438313, "chat_id": "CT_1277744254305568677_53600857" } ] }

    Use this API to get details of all reminders. If any category is not specified, the API will return a list of reminders under the category mine. By default, this API will return a list of 20 reminders.

    next_set_token: This token will be provided in two cases.

    Case 1: If no limit is specified and if there are more than 20 reminders in your reminder list.

    Case 2: If you've specified a limit on the number of reminders to be retrieved, then you will be provided with a next_set_token to get the next set of reminders. Do note that the token will be provided only when the total number of reminders are more than the limit specified.

    Required OAuth Scope :

    This API can be accessed with the following OAuth scope :ZohoCliq.Reminders.READ or to get access to all the API's you can use the scope ZohoCliq.Reminders.ALL

    Query Params

    category
    Optional
    string
    Gets the list of reminders in the specified category.
    Allowed values are: mine | mine-completed | others | others-completed
    limit
    Optional
    long
    Specify this parameter to limit the number of reminders that should be fetched.
    next_set_token
    Optional
    long
    Specify this token to fetch the next set of reminders.

    The Records Object

    "fields": [ { "default_value": "1000", "display_name": "Product ID", "type": "number", "field_name": "productid", "column_index": 201 }, { "default_value": "", "display_name": "Product Category", "type": "limited-text", "field_name": "productcategory", "column_index": 301 }, { "default_value": "true", "display_name": "In Stock", "type": "boolean", "field_name": "instock", "column_index": 101 } ]

    Cliq Storage

    Cliq Database is the perfect storage interface when you're building integrations on Cliq Platform. You can create, modify, store and sync data items, that can be accessed easily.

    Cliq Record APIs can be accessed with the following OAuth scope :

    OAuth scope for Record APIs: ZohoCliq.StorageData.ALL

    These scopes will give the basic CRUD access to the Record APIs.

    The Records object attributes

    default_value
    Optional
    The data type depends on the type of field. It can be : string/long/boolean
    A default value for the field being created.
    Maximum characters allowed: 100
    display_name
    Optional
    string
    The name of the field which will be displayed to the user. If display name is not provided, then the name of the record will be considered as the display name.
    Maximum characters allowed: 30
    type
    Required
    string
    Type of the field.
    Allowed Values :
    • limited-text (string): Maximum characters allowed are 100.
      Maximum number of limited-text field type allowed in each database : 5
    • number (long): Maximum characters allowed are 100.
      Maximum number of number field type allowed in each database : 5
    • boolean
      Maximum number of boolean field type allowed in each database : 5
    field_name
    Required
    string
    Name of the field to be added in the database. This attribute is a unique identifier for a field.
    Allowed Values: Only lowercase a-z without any spaces or special characters.
    Maximum characters allowed: 30

    Add a record

    Add a record

    POST https://cliq.zoho.com/api/v2/storages/{name}/records Payload { "values": { "productid": "1001", "productcateogry": "zylker", "instock": true } }

    Sample Response

    { "productcateogry": "zylker", "id": "14756000888008001", "productid": "1001", "instock": true }

    Use this API to add records to a database. Be sure to mention the unique name of the database in which you'd like the records to be added.

    Required OAuth Scope :

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

    Query Params

    values
    Required
    Array of JSON Objects
    The field values to be added as a record in the database.

    Retrieve a record

    Retrieve a record

    GET https://cliq.zoho.com/api/v2/storages/{name}/records/{id}

    Sample Response

    { "productcateogry": "zylker", "id": "14756000888008001", "productid": "1001", "instock": true }

    Use this API to get details of a record by mentioning the record ID. Give the unique name of the database from which the record needs to be fetched.

    Required OAuth Scope :

    This API can be accessed with the OAuth scope : ZohoCliq.StorageData.READ or ZohoCliq.StorageData.ALL

    List records

    List records

    GET https://cliq.zoho.com/api/v2/storages/{name}/records

    Sample Response

    "list": [ { "productcateogry": "zylker", "id": "14756000000008008", "productid": "1004", "instock": true }, { "productcateogry": "zylcal", "id": "14756000000008003", "productid": "1003", "instock": false }, { "productcateogry": "zylker", "id": "14756000000008004", "productid": "1002", "instock": true }, { "productcateogry": "zylker", "id": "14756000000008005", "productid": "1001", "instock": true }, ]

    Use this API to get the list of all records in a specific database. The name in the API refers to the database name given during creation.

    Required OAuth Scope :

    This API can be accessed with the OAuth scope : ZohoCliq.StorageData.READ or ZohoCliq.StorageData.ALL

    Query Params

    criteria
    Optional
    String
    This parameter will fetch records that meet the specified criteria expression.
    from_index
    Optional
    String
    This parameter will fetch records from a particular index value.
    limit
    Optional
    String
    Use this parameter to limit the number of records fetched from a particular index value.
    start_token
    Optional
    String
    This token will be obtained in the response JSON when a from_index and limit are specified. Using this parameter in the next corresponding request will get the list of remaining records in the database.

    Retrieve a record by specifying a criteria

    Retrieve a record by specifying a criteria

    GET https://cliq.zoho.com/api/v2/storages/{name}/records?criteria=(productid==1001)

    Sample Response

    { "productcateogry": "zylker", "id": "14756000888008001", "productid": "1001", "instock": true }

    Use the Get Records API with a criteria to get record details that meet this specific criteria expression. The name in the API refers to the database name given during creation and id is the Record ID.

    Required OAuth Scope :

    This API can be accessed with the OAuth scope : ZohoCliq.StorageData.READ or ZohoCliq.StorageData.ALL

    Retrieve a record by specifying a range (from_index and limit)

    Retrieve a record by specifying a range ( from_index and limit )

    GET https://cliq.zoho.com/api/v2/storages/{name}/records?from_index=1&limit=2

    Sample Response

    "next_token": "2666a59c-b894-40f5-82c5-3703fbde2ec9", "list": [ { "productcateogry": "zylker", "id": "14756000000008007", "productid": "1002", "isenabled": false }, { "productcateogry": "zylcal", "id": "14756000000008005", "productid": "1003", "isenabled": true } ]

    Fetch a set of records from a specific database by mentioning the from_index and limit. from_index is the index from which the records will be fetched and limit specifies the number of records to be fetched from that particular index. The response for a request sent using these parameters will contain the next_token This token acts as an access token to get the list of remaining records in the database. The next_token will be valid only for one immediate request and will expire once used.

    Required OAuth Scope :

    This API can be accessed with the OAuth scope : ZohoCliq.StorageData.READ or ZohoCliq.StorageData.ALL

    Retrieve a record with start token

    Retrieve a record with start token

    GET https://cliq.zoho.com/api/v2/storages/{name}/records?start_token=2666a59c-b894-40f5-82c5-3703fbde2ec9

    Sample Response

    "list": [ { "productcateogry": "zylker", "id": "14756000000008003", "productid": "1004", "instock": true } ]

    Substitute the value of next_token obtained from the response of the Get records by specifying a range API. This token should be sent as the value for the key start_token in the next immediate request. Successful response will get a list of all remaining records in the database.

    Note: The start_token will expire with one request. Using the same token in multiple requests will return an error as invalid start token

    Required OAuth Scope :

    This API can be accessed with the OAuth scope : ZohoCliq.StorageData.READ or ZohoCliq.StorageData.ALL

    Update a record

    Update a record

    PUT https://cliq.zoho.com/api/v2/storages/{name}/records/{id} Payload { "values": { "instock": "false" } }

    Sample Response

    { "productcategory": "zylker", "id": "14756000888008001", "productid": "1001", "instock": false }

    Use this API to update record details from a specific database. The name in the API refers to the database name given during creation. ID refers to the record ID.

    Required OAuth Scope :

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

    Delete a record

    Delete a record

    DELETE https://cliq.zoho.com/api/v2/storages/{name}/records/{id}

    Sample Response

    Response Code: 204 No Content

    Use this API to delete record details from a specific database. The name in the API refers to the database name given during creation. ID refers to the record ID.

    Required OAuth Scope :

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

    Sample Custom Domain Object

    { "data": { "status": "active", "name": "chat.zylker.org", "ssl_enabled": true } }

    Custom Domain

    Represent your brand name in place of Cliq default link by setting your own custom domain. For example, Zoho Cliq's domain is cliq.zoho.com. To verify a custom domain, check if the DNS value is correctly added to the domain registrar. Further verify it by checking the global DNS checker if the intended DNS record is available globally. To know more about custom domain head on over here.

    Custom Domain Object Attributes

    status
    String
    Denotes if the status of the custom domain is active or inactive.
    name
    String
    Denotes a custom domain URL.
    ssl_enabled
    Boolean
    Value=true, if a secure connection is enabled between the web clients and web servers.

    Retrieve a custom domain

    Retrieve a custom domain

    GET https://cliq.zoho.com/api/v2/customdomain

    Response Example

    { "data": { "status": "active", "name": "chat.zylker.org", "ssl_enabled": true } }

    You can use this API to get details about an individual custom domain.

    Required OAuth Scope :

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

    Add a custom domain

    Add a custom domain

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

    Payload

    { "name":"chat.zylker.org" }

    Response Example

    { "data": { "status": "inactive", "name": "chat.zylker.org", "ssl_enabled": true } }

    You can use this API to add a new custom domain.

    Required OAuth Scope :

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

    Required Parameters

    name
    Mandatory
    String
    Name of your choice for the custom domain.

    Verify a custom domain

    Verify a custom domain

    PUT https://cliq.zoho.com/api/v2/customdomain

    Payload

    { "status":"active/inactive" }

    Response Example

    { "data": { "status": "inactive", "name": "chat.zylker.org", "ssl_enabled": true } }

    You can use this API to verify a custom domain.

    Required OAuth Scope :

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

    Required Parameters

    status
    Mandatory
    String
    Verify the status of the custom domain as active or inactive.

    Delete a custom domain

    Delete a custom domain

    DELETE https://cliq.zoho.com/api/v2/customdomain

    Response Example

    Response Code: 204 No Content

    You can use this API to delete a custom domain.

    Required OAuth Scope :

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

    Sample Custom Email Object

    { "data": { "email_id": "scott.fisher@zylkerorg.gq", "name": "Scott", "dkim_value": "k=rsa; p=MIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQCr6KMgdxxgg7oT3ulMwPJs9RXgXDrI9UWU118pHEMohl3UbL3Jwp4oxp/9N3thh/3WCJnYV134zbEVolZwqaT3JsFEq/mQ/RpW/JnOZ3rnxqJPurb2bcfJol4SDxiWVObzHX31xnANzFcXnq1/5dMK5QvW4Jh7n0fm4+4ywqiy2QIDAQAB", "dkim_status": "not_verified", "dkim_host": "1522905413783._domainkey.zylkerorg.gq", "cname_status": "verified" } }

    Custom Email

    Configure a custom email address (customid@yourdomain.com) for notification emails sent from Cliq to your organisation users. Your custom email id will replace the systemgenerated@mailer.zohocliq.com email id of Cliq.

    Custom Email Object Attributes

    email_id
    String
    Denotes the email address.
    name
    String
    Denotes the name of the custom emailer.
    dkim_value
    String
    String of characters representing the public key along with its corresponding private key during the DKIM setup process.
    dkim_status
    String
    Denotes if the status of the dkim is verified or not.
    dkim_host
    String
    Denotes the dkim host name, which will be added in the DNS records.
    cname_status
    String
    Denotes the status of the canonical name record used to alias a domain name with another domain name.

    Retrieve global mail configuration

    Retrieve global mail configuration

    GET https://cliq.zoho.com/api/v2/mailconfigurations/global

    Response Example

    { "data": { "email_id": "scott.fisher@zylkerorg.gq", "name": "Scott", "dkim_value": "k=rsa; p=MIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQCr6KMgdxxgg7oT3ulMwPJs9RXgXDrI9UWU118pHEMohl3UbL3Jwp4oxp/9N3thh/3WCJnYV134zbEVolZwqaT3JsFEq/mQ/RpW/JnOZ3rnxqJPurb2bcfJol4SDxiWVObzHX31xnANzFcXnq1/5dMK5QvW4Jh7n0fm4+4ywqiy2QIDAQAB", "dkim_status": "not_verified", "dkim_host": "1522905413783._domainkey.zylkerorg.gq", "cname_status": "verified" } }

    You can use this API to retrieve a global mail configuration.

    Required OAuth Scope :

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

    Update mail configuration

    Update mail configuration

    PUT https://cliq.zoho.com/api/v2/mailconfigurations/global

    Payload

    { "name":"Scott", "email_id":"scott.fisher@zylkerorg.gq", "cname_status":"verified" }

    Response Example

    { "data": { "email_id": "scott.fisher@zylkerorg.gq", "name": "Scott", "dkim_value": "k=rsa; p=MIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQCr6KMgdxxgg7oT3ulMwPJs9RXgXDrI9UWU118pHEMohl3UbL3Jwp4oxp/9N3thh/3WCJnYV134zbEVolZwqaT3JsFEq/mQ/RpW/JnOZ3rnxqJPurb2bcfJol4SDxiWVObzHX31xnANzFcXnq1/5dMK5QvW4Jh7n0fm4+4ywqiy2QIDAQAB", "dkim_status": "not_verified", "dkim_host": "1522905413783._domainkey.zylkerorg.gq", "cname_status": "verified" } }

    You can use this API to update a mail configuration.

    Required OAuth Scope :

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

    Required Parameters

    name
    Mandatory
    String
    Name of the emailer to be updated .
    email_id
    Mandatory
    String
    The email address to be updated.
    cname_status
    Mandatory
    String
    The cname status to be updated.

    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 {"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 { "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 { "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" } } }, { "label": "Cancel", "type": "-", "action": { "type": "invoke.function", "data": { "name": "internlist" } } } ] }

    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 { "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 { "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 { "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.

    Mentions

    Use the mention object syntax to mention a user, channel and team in any message.

    Mentioning a User

    Mentioning a User

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

    To mention a user, use the syntax {@zohoid}. Mentioning a user in any team or organization level channel will notify the user.

    Note: Use the syntax [User Name](zohoid:userid) to mention a user silently in any conversation. This will not notify the user.

    Required OAuth Scope :

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

    Mentioning a Channel

    Mentioning a Channel

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

    To mention a channel, use the syntax {#channel_id}. Mentioning a team or organization level channel will notify all the participants who're a part of this channel and post an info message in the channel.

    Required OAuth Scope :

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

    Mentioning a Team

    Mentioning a Team

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

    To mention a team, use the syntax {@Gteam_id}. You can mention a team in a team or organization level channel only.

    Required OAuth Scope :

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

    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 :

    Required OAuth Scope :

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

    Instant button syntax using Invoke Function

    Instant Button triggered using Invoke Function

    [Button Label]($reference-key)


    Sample Syntax

    Request POST https://cliq.zoho.com/api/v2/chats/{chat_id}/message Payload { "text": "Who's up for lunch after the match on Friday? [Yes]($1) [No]($2) [Maybe]($3)", "references": { "1": { "type": "button", "object": { "label": "Yes", "action": { "type": "invoke.function", "data": { "name": "teammatch" } }, "type": "+" } }, "2": { "type": "button", "object": { "label": "No", "action": { "type": "invoke.function", "data": { "name": "teammatch" } }, "type": "+" } }, "3": { "type": "button", "object": { "label": "Maybe", "action": { "type": "invoke.function", "data": { "name": "teammatch" } } } } } }

    Params

    references
    JSON object
    The references JSON contains all details of the button such as button action type, function name, function owner and reference key.
    type
    String
    Button
    JSON Object
    Defines the button label and the type of action a button should perform.
    label
    String
    Display value of the button.
    Maximum number of characters allowed : 20
    type
    String
    The type + denotes a button with green outline , type - denotes button with red outline, not specifying the type will denote the neutral button color in grey.
    JSON Object
    Specify the type of action the button should perform. In this case: invoke.function
    JSON Object
    The data JSON object contains details about the button function name.
    name
    String
    Name of the function to be associated with the button.

    Instant button syntax using System API

    Instant Button triggered using System API

    Required OAuth Scope :

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

    [Button Label](system.api|system action/user ID) Example: Request POST https://cliq.zoho.com/api/v2/chats/{chat_id}/message Payload { "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 | locationpermission
    ID - zuid of the user to whom the system action should be performed.
    Specify the type of system action. ID is the user 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.

    Required OAuth Scope :

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

    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
    string
    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
    string
    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
    string
    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
    Label of the button present in the confirmation box.
    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 { "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" } } } ] }

    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.

    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 { "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 { "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 | locationpermission
    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 { "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" } } }, { "label": "No", "type": "-", "action": { "type": "invoke.function", "data": { "name": "pollbuttons" } } }, { "label": "View Results", "type": "+", "action": { "type": "invoke.function", "data": { "name": "pollbuttons" } } } ] }

    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 { "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" } } }, { "label": "Cancel", "type": "-", "action": { "type": "invoke.function", "data": { "name": "internlist" } } } ] }

    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 { "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!