openapi: 3.0.0
info:
title: My Pins and Chat Folders
description: |
The My Pins API enables users to organise and access important chats and channels in Cliq efficiently. Users can pin conversations directly in the My Pins section for quick access or group them into personalised chat folders to better structure their workspace.
Chat folders enable users to categorise conversations by projects, teams, priorities, or personal workflows. Users can create multiple chat folders, rename them, reorder the folders, and rearrange pinned chats within each folder to suit their preferences.
At the API endpoint level, the terminology used for chat folders is "pincategories." The unique identifier of a chat folder is referred to as the CATEGORY_ID in endpoint terminology.
contact: {}
version: 3.0.0
externalDocs:
description: Find out more about Zoho Cliq APIs V3
url: https://www.zoho.com/cliq/help/restapi/v2/
servers:
- url: https://cliq.zoho.com/api/v3
description: Zoho Cliq US DC
tags:
- name: mypins
description: My Pins and Chat Folders Module
paths:
/pin-categories:
get:
summary: Retrieve chat folders
operationId: getPinCategories
description: |
Retrieve the list of chat folders for the current user, along with the chats pinned within each folder. By default, only basic details are returned for each pinned chat, but additional fields can be included as needed.
Threshold limit: 20 requests per min per user
Number of API calls allowed within a minute.
Lock period: 5 minutes
Wait time before consecutive API requests.
| Error Code | Description |
|---|---|
| operation_failed | Unexpected server error. |
chats: Include the full chat objects for each pinned chat.recipients_summary: Include a summary of recipients for each pinned chat.last_message_info: Include details about the last message in each pinned chat.
Threshold limit: 20 requests per min per user
Number of API calls allowed within a minute.
Lock period: 5 minutes
Wait time before consecutive API requests.
| Error Code | Description |
|---|---|
| param_missing | A required parameter is missing from the request body. |
| operation_not_allowed | User does not have permission for a chat in the given chat list. |
| max_folders_error | Maximum number of categories reached. |
| operation_failed | Unexpected server error. |
Threshold limit: 20 requests per min per user
Number of API calls allowed within a minute.
Lock period: 5 minutes
Wait time before consecutive API requests.
| Error Code | Description |
|---|---|
| operation_failed | Unexpected server error. |
Threshold limit: 50 requests per min per user
Number of API calls allowed within a minute.
Lock period: 5 minutes
Wait time before consecutive API requests.
| Error Code | Description |
|---|---|
| client_not_synced | The provided last_sync_time is stale - re-fetch categories and retry. |
| invalid_inputs | title, symbol, state, or chat_id was sent alongside chat_ids. |
| operation_failed | Unexpected server error or invalid inputs. |
category_id represents the ID of the chat folder.
schema:
type: string
example: CATEGORY_ID
requestBody:
required: true
description: Request body determines the operation. Send exactly one operation type per request.
content:
application/json:
schema:
$ref: '#/components/schemas/update-pin-category-details-request'
responses:
'204':
description: Folder updated successfully. No response body.
'400':
description: Bad Request.
content:
application/json:
schema:
$ref: '#/components/schemas/error-response'
examples:
client_not_synced:
summary: last_sync_time is stale - re-fetch folders and retry
value:
code: client_not_synced
invalid_inputs:
summary: title, symbol, state, or chat_id was sent alongside chat_ids
value:
code: invalid_inputs
operation_failed:
summary: Unexpected server error or invalid inputs
value:
code: operation_failed
'401':
description: Unauthorized.
content:
application/json:
schema:
type: object
properties:
message:
type: string
example: Request was rejected because of invalid AuthToken.
'403':
description: Forbidden.
content:
application/json:
schema:
type: object
properties:
message:
type: string
example: The user does not have enough permission or possibly not an user of the respective organization to access the resource.
'404':
description: Invalid URL.
content:
application/json:
schema:
type: object
properties:
message:
type: string
example: The URL you've sent is wrong. It's possible that the resource you've requested has been moved to another URL.
'405':
description: Method Not Allowed.
content:
application/json:
schema:
type: object
properties:
message:
type: string
example: The requested resource does not support the HTTP method used. For example, requesting List of all customers API with PUT as the HTTP method.
'406':
description: Not Acceptable.
content:
application/json:
schema:
type: object
properties:
message:
type: string
example: The response has been received but the requested response type is not supported by the browser.
'429':
description: Too many requests.
content:
application/json:
schema:
type: object
properties:
message:
type: string
example: Too many requests within a certain time frame.
'500':
description: Internal Server Error.
content:
application/json:
schema:
type: object
properties:
message:
type: string
example: Cliq server encountered an error which prevents it from fulfilling the request.
security:
- Cliq_Auth:
- ZohoCliq.Chats.UPDATE
delete:
summary: Delete a chat folder
operationId: deletePinCategory
description: |
Delete a chat folder and optionally unpin all chats within it.
Threshold limit: 20 requests per min per user
Number of API calls allowed within a minute.
Lock period: 5 minutes
Wait time before consecutive API requests.
| Error Code | Description |
|---|---|
| operation_not_allowed | Cannot delete the default category. |
| operation_failed | Unexpected server error. |
category_id represents the ID of the chat folder.
schema:
type: string
example: CATEGORY_ID
- name: unpin_all
in: query
required: false
description: |
Determines whether to unpin all chats within the folder instead of moving them to the default folder i.e My Pins section.
true: Unpin all chats within the folder instead of moving them to the default folder.false (default): Move chats pinned within the deleted folder to the default folder.
Threshold limit: 50 requests per min per user
Number of API calls allowed within a minute.
Lock period: 5 minutes
Wait time before consecutive API requests.
| Error Code | Description |
|---|---|
| client_not_synced | The provided last_sync_time is stale - re-fetch categories and retry. |
| invalid_inputs | title, symbol, state, or chat_id was sent alongside chat_ids. |
| operation_failed | Unexpected server error or invalid inputs. |
category_id represents the ID of the chat folder.CATEGORY_ID1 is a documentation alias for CATEGORY_ID, used to separate the "Reorder a chat within a chat folder" operation for better readability while sharing the same /pin-categories/{CATEGORY_ID} endpoint.
schema:
type: string
example: CATEGORY_ID
requestBody:
required: true
description: Request body determines the operation. Send exactly one operation type per request.
content:
application/json:
schema:
$ref: '#/components/schemas/reorder-chat-in-category-request'
responses:
'204':
description: Folder updated successfully. No response body.
'400':
description: Bad Request.
content:
application/json:
schema:
$ref: '#/components/schemas/error-response'
examples:
client_not_synced:
summary: last_sync_time is stale - re-fetch folders and retry
value:
code: client_not_synced
invalid_inputs:
summary: title, symbol, state, or chat_id was sent alongside chat_ids
value:
code: invalid_inputs
operation_failed:
summary: Unexpected server error or invalid inputs
value:
code: operation_failed
'401':
description: Unauthorized.
content:
application/json:
schema:
type: object
properties:
message:
type: string
example: Request was rejected because of invalid AuthToken.
'403':
description: Forbidden.
content:
application/json:
schema:
type: object
properties:
message:
type: string
example: The user does not have enough permission or possibly not an user of the respective organization to access the resource.
'404':
description: Invalid URL.
content:
application/json:
schema:
type: object
properties:
message:
type: string
example: The URL you've sent is wrong. It's possible that the resource you've requested has been moved to another URL.
'405':
description: Method Not Allowed.
content:
application/json:
schema:
type: object
properties:
message:
type: string
example: The requested resource does not support the HTTP method used. For example, requesting List of all customers API with PUT as the HTTP method.
'406':
description: Not Acceptable.
content:
application/json:
schema:
type: object
properties:
message:
type: string
example: The response has been received but the requested response type is not supported by the browser.
'429':
description: Too many requests.
content:
application/json:
schema:
type: object
properties:
message:
type: string
example: Too many requests within a certain time frame.
'500':
description: Internal Server Error.
content:
application/json:
schema:
type: object
properties:
message:
type: string
example: Cliq server encountered an error which prevents it from fulfilling the request.
security:
- Cliq_Auth:
- ZohoCliq.Chats.UPDATE
/pin-categories/{CATEGORY_ID2}:
put:
summary: Reorder a chat folder
operationId: reorderCategory
x-display-path: /pin-categories/{CATEGORY_ID}
x-virtual-endpoint: true
x-note: |
CATEGORY_ID2 is a documentation aliases for CATEGORY_ID path parameter used in updatePinCategory operation. This is to display the reorderCategory operation in the documentation under the same endpoint as updatePinCategory since both operations require the same path parameter and it would be more intuitive to have them under the same endpoint. The actual endpoint for reorderCategory operation will still be /pin-categories/{CATEGORY_ID} as specified in the paths object.
description: |
Reorder a chat folder within the list of chat folders. This allows users to prioritise certain folders by moving them up or down the list.
Threshold limit: 50 requests per min per user
Number of API calls allowed within a minute.
Lock period: 5 minutes
Wait time before consecutive API requests.
| Error Code | Description |
|---|---|
| client_not_synced | The provided last_sync_time is stale - re-fetch categories and retry. |
| invalid_inputs | title, symbol, state, or chat_id was sent alongside chat_ids. |
| operation_failed | Unexpected server error or invalid inputs. |
category_id represents the ID of the chat folder.CATEGORY_ID2 is a documentation alias for CATEGORY_ID, used to separate the "Reorder a chat folder" operation for better readability while sharing the same /pin-categories/{CATEGORY_ID} endpoint.
schema:
type: string
example: CATEGORY_ID
requestBody:
required: true
description: Request body determines the operation. Send exactly one operation type per request.
content:
application/json:
schema:
$ref: '#/components/schemas/reorder-category-request'
responses:
'204':
description: Folder updated successfully. No response body.
'400':
description: Bad Request.
content:
application/json:
schema:
$ref: '#/components/schemas/error-response'
examples:
client_not_synced:
summary: last_sync_time is stale - re-fetch folders and retry
value:
code: client_not_synced
invalid_inputs:
summary: title, symbol, state, or chat_id was sent alongside chat_ids
value:
code: invalid_inputs
operation_failed:
summary: Unexpected server error or invalid inputs
value:
code: operation_failed
'401':
description: Unauthorized.
content:
application/json:
schema:
type: object
properties:
message:
type: string
example: Request was rejected because of invalid AuthToken.
'403':
description: Forbidden.
content:
application/json:
schema:
type: object
properties:
message:
type: string
example: The user does not have enough permission or possibly not an user of the respective organization to access the resource.
'404':
description: Invalid URL.
content:
application/json:
schema:
type: object
properties:
message:
type: string
example: The URL you've sent is wrong. It's possible that the resource you've requested has been moved to another URL.
'405':
description: Method Not Allowed.
content:
application/json:
schema:
type: object
properties:
message:
type: string
example: The requested resource does not support the HTTP method used. For example, requesting List of all customers API with PUT as the HTTP method.
'406':
description: Not Acceptable.
content:
application/json:
schema:
type: object
properties:
message:
type: string
example: The response has been received but the requested response type is not supported by the browser.
'429':
description: Too many requests.
content:
application/json:
schema:
type: object
properties:
message:
type: string
example: Too many requests within a certain time frame.
'500':
description: Internal Server Error.
content:
application/json:
schema:
type: object
properties:
message:
type: string
example: Cliq server encountered an error which prevents it from fulfilling the request.
security:
- Cliq_Auth:
- ZohoCliq.Chats.UPDATE
/pin-categories/{CATEGORY_ID3}:
put:
summary: Replace chats in a chat folder
x-display-path: /pin-categories/{CATEGORY_ID}
x-virtual-endpoint: true
x-note: |
CATEGORY_ID3 is a documentation aliases for CATEGORY_ID path parameter used in updatePinCategory operation. This is to display the replaceChatInCategory operation in the documentation under the same endpoint as updatePinCategory since both operations require the same path parameter and it would be more intuitive to have them under the same endpoint. The actual endpoint for replaceChatInCategory operation will still be /pin-categories/{CATEGORY_ID} as specified in the paths object.
operationId: bulkUpdateChatsInCategory
description: |
Replace the existing chats in the specified chat folder with a new set of chats. Chats not included in the request will be removed from the folder.
Threshold limit: 50 requests per min per user
Number of API calls allowed within a minute.
Lock period: 5 minutes
Wait time before consecutive API requests.
| Error Code | Description |
|---|---|
| client_not_synced | The provided last_sync_time is stale - re-fetch categories and retry. |
| invalid_inputs | title, symbol, state, or chat_id was sent alongside chat_ids. |
| operation_failed | Unexpected server error or invalid inputs. |
category_id represents the ID of the chat folder.CATEGORY_ID3 is a documentation alias for CATEGORY_ID, used to separate the "Replace chats in a chat folder" operation for better readability while sharing the same /pin-categories/{CATEGORY_ID} endpoint.
schema:
type: string
example: CATEGORY_ID
requestBody:
required: true
description: Request body determines the operation. Send exactly one operation type per request.
content:
application/json:
schema:
$ref: '#/components/schemas/bulk-update-chats-in-category-request'
responses:
'204':
description: Folder updated successfully. No response body.
'400':
description: Bad Request.
content:
application/json:
schema:
$ref: '#/components/schemas/error-response'
examples:
client_not_synced:
summary: last_sync_time is stale - re-fetch folders and retry
value:
code: client_not_synced
invalid_inputs:
summary: title, symbol, state, or chat_id was sent alongside chat_ids
value:
code: invalid_inputs
operation_failed:
summary: Unexpected server error or invalid inputs
value:
code: operation_failed
'401':
description: Unauthorized.
content:
application/json:
schema:
type: object
properties:
message:
type: string
example: Request was rejected because of invalid AuthToken.
'403':
description: Forbidden.
content:
application/json:
schema:
type: object
properties:
message:
type: string
example: The user does not have enough permission or possibly not an user of the respective organization to access the resource.
'404':
description: Invalid URL.
content:
application/json:
schema:
type: object
properties:
message:
type: string
example: The URL you've sent is wrong. It's possible that the resource you've requested has been moved to another URL.
'405':
description: Method Not Allowed.
content:
application/json:
schema:
type: object
properties:
message:
type: string
example: The requested resource does not support the HTTP method used. For example, requesting List of all customers API with PUT as the HTTP method.
'406':
description: Not Acceptable.
content:
application/json:
schema:
type: object
properties:
message:
type: string
example: The response has been received but the requested response type is not supported by the browser.
'429':
description: Too many requests.
content:
application/json:
schema:
type: object
properties:
message:
type: string
example: Too many requests within a certain time frame.
'500':
description: Internal Server Error.
content:
application/json:
schema:
type: object
properties:
message:
type: string
example: Cliq server encountered an error which prevents it from fulfilling the request.
security:
- Cliq_Auth:
- ZohoCliq.Chats.UPDATE
/chats/{CHAT_ID}/pins:
post:
summary: Pin a chat to a chat folder
operationId: pinChat
description: |
Pin a chat for quick access either directly under the My Pins section or within a specific chat folder.
Threshold limit: 50 requests per min per user
Number of API calls allowed within a minute.
Lock period: 5 minutes
Wait time before consecutive API requests.
| Error Code | Description |
|---|---|
| max_pins_error | The user has reached the maximum number of pinned chats in the category. |
| chat_access_denied | Caller is not a participant of this chat. |
| operation_not_allowed | Caller does not have permission to pin this chat. |
| chat_operation_failed | Unexpected server error. |
category_id to pin the chat under a specific folder.
content:
application/json:
schema:
$ref: '#/components/schemas/pin-chat-request'
responses:
'200':
description: Chat pinned successfully.
content:
application/json:
schema:
$ref: '#/components/schemas/pin-chat-response'
'400':
description: Bad Request.
content:
application/json:
schema:
$ref: '#/components/schemas/error-response'
examples:
max_pins_error:
summary: The user has reached the maximum number of pinned chats in the folder
value:
code: max_pins_error
chat_access_denied:
summary: Caller is not a participant of this chat
value:
code: chat_access_denied
operation_not_allowed:
summary: Caller does not have permission to pin this chat
value:
code: operation_not_allowed
chat_operation_failed:
summary: Unexpected server error
value:
code: chat_operation_failed
'401':
description: Unauthorized.
content:
application/json:
schema:
type: object
properties:
message:
type: string
example: Request was rejected because of invalid AuthToken.
'403':
description: Forbidden.
content:
application/json:
schema:
type: object
properties:
message:
type: string
example: The user does not have enough permission or possibly not an user of the respective organization to access the resource.
'404':
description: Invalid URL.
content:
application/json:
schema:
type: object
properties:
message:
type: string
example: The URL you've sent is wrong. It's possible that the resource you've requested has been moved to another URL.
'405':
description: Method Not Allowed.
content:
application/json:
schema:
type: object
properties:
message:
type: string
example: The requested resource does not support the HTTP method used. For example, requesting List of all customers API with PUT as the HTTP method.
'406':
description: Not Acceptable.
content:
application/json:
schema:
type: object
properties:
message:
type: string
example: The response has been received but the requested response type is not supported by the browser.
'429':
description: Too many requests.
content:
application/json:
schema:
type: object
properties:
message:
type: string
example: Too many requests within a certain time frame.
'500':
description: Internal Server Error.
content:
application/json:
schema:
type: object
properties:
message:
type: string
example: Cliq server encountered an error which prevents it from fulfilling the request.
security:
- Cliq_Auth:
- ZohoCliq.Chats.UPDATE
delete:
summary: Unpin a chat
operationId: unpinChat
description: |
Remove a pinned chat from the My Pins section and all associated chat folders. The chat will no longer appear in any pinned location.
Threshold limit: 50 requests per min per user
Number of API calls allowed within a minute.
Lock period: 5 minutes
Wait time before consecutive API requests.
| Error Code | Description |
|---|---|
| chat_access_denied | Caller is not a participant of this chat. |
| chat_operation_failed | Unexpected server error. |
include_fields value is requested.category_id: "default" with no other fields.
properties:
category_id:
type: string
description: Unique ID of the folder, or "default" for the default folder.
title:
type: string
description: Display title of the folder.
symbol:
type: string
description: Emoji or zomoji symbol for the folder.
state:
type: string
description: Whether the folder is expanded or collapsed.
enum:
- expanded
- collapsed
chats:
type: array
description: Conditional - only present when include_fields contains chats.
items:
$ref: '#/components/schemas/pinned-chat'
pinned-chat:
type: object
description: Represents a pinned chat entry within a folder.
properties:
chat_id:
type: string
description: ID of the pinned chat.
chat_type:
type: string
description: Type of the chat, such as direct_message, bot, channel, group_chat.
name:
type: string
description: Display name of the chat.
participant_count:
type: integer
description: Number of participants in the chat.
recipients_summary:
type: array
description: Conditional - requires both chats and recipients_summary in include_fields.
items:
type: object
properties:
id:
type: string
description: User ID of the participant.
name:
type: string
description: Display name of the participant.
last_message_info:
type: object
description: Conditional - requires both chats and last_message_info in include_fields.
properties:
id:
type: string
description: Message ID.
sender:
type: object
properties:
id:
type: string
name:
type: string
time:
type: string
description: ISO 8601 datetime of the message.
type:
type: string
description: Message type.
content:
type: object
properties:
text:
type: string
is_pinned:
type: boolean
description: Whether the chat is currently pinned.
get-pin-categories-response:
type: object
description: Response envelope for listing all pin folders.
properties:
url:
type: string
type:
type: string
example: pin_categories
data:
type: array
items:
$ref: '#/components/schemas/pin-category'
example:
url: /v3/pin-categories
type: pin_categories
data:
- category_id: default
- category_id: '4000000020001'
state: expanded
symbol: ':razz:'
title: Cliq!
chats:
- chat_id: '1488288613043522033'
chat_type: channel
name: Product Launch
participant_count: 12
is_pinned: true
create-pin-category-request:
type: object
description: Request body for creating a new pin folder.
required:
- title
properties:
title:
type: string
maxLength: 255
description: |
Display title of the chat folder.title, symbol, and/or state.chat_id with optional pin_above and required last_sync_time.pin_above only (no chat_id) with required last_sync_time.chat_ids (array) with required last_sync_time.title, symbol, and/or state.expanded: The folder is expanded to show its contents.collapsed: The folder is collapsed to hide its contents.chat_id with optional pin_above and required last_sync_time.pin_above only (no chat_id) with required last_sync_time.chat_ids (array) with required last_sync_time.category_id represents the ID of the chat folder.
example:
category_id: '2890538000000011111'
pin-chat-response:
type: object
description: Response envelope after pinning a chat.
properties:
type:
type: string
example: chat.pin
data:
type: object
properties:
chat_id:
type: string
category_id:
type: string
example:
type: chat.pin
data:
chat_id: '2890538000000012345'
category_id: '2890538000000011111'
unpin-chat-response:
type: object
description: Response envelope after unpinning a chat.
properties:
type:
type: string
example: chat.unpin
data:
type: object
properties:
chat_id:
type: string
example:
type: chat.unpin
data:
chat_id: '2890538000000012345'
error-response:
type: object
description: Error response returned by the My Pins API.
properties:
message:
type: string
description: Human-readable error description.
code:
type: string
description: Machine-readable error code.
enum:
- operation_failed
- operation_not_allowed
- param_missing
- max_folders_error
- client_not_synced
- invalid_inputs
- max_pins_error
- chat_access_denied
- chat_operation_failed
securitySchemes:
Cliq_Auth:
type: oauth2
x-authorization-example: Bearer 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f
flows:
implicit:
authorizationUrl: https://accounts.zoho.com/oauth/v2/auth
scopes:
ZohoCliq.Chats.CREATE: Create Chats
ZohoCliq.Chats.READ: Read Chats
ZohoCliq.Chats.UPDATE: Modify Chats
ZohoCliq.Chats.DELETE: Delete Chats