openapi: 3.0.0
info:
title: Pin Messages
description: |
The Pin Messages API allows teams to highlight and manage important messages within a chat, ensuring that critical information remains visible to all participants and is not lost in the flow of conversation.
The latest version, v3, is designed to give developers precise control over what gets highlighted from meeting links and deadlines to key announcements, helping every participant stay aligned without the need to scroll through chat history.
Key Capabilities
With the v3 version of the Pin Messages API, you can:
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 | User might not be a participant of that chat. |
| operation_failed | Unexpected error while fetching the primary pin. |
sync_token received in an earlier response to fetch only updates after that sync point.primary=true).
content:
application/json:
schema:
$ref: '#/components/schemas/get-pinned-messages-response'
'400':
description: Bad Request.
content:
application/json:
schema:
$ref: '#/components/schemas/error-response'
examples:
operation_not_allowed:
summary: User is not a participant of the chat
value:
message: Uh-Oh! You are not authorized to do this operation.
code: operation_not_allowed
operation_failed:
summary: Unexpected error while fetching the primary pin
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.READ
post:
summary: Add a pinned message
operationId: addPinnedMessage
description: |
Pins a message in a 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 |
|---|---|
| operation_failed | Invalid expiry time - the specified time is in the past. |
| operation_not_allowed | User might not be a participant of that 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 |
|---|---|
| client_not_synced | The provided sync timestamp is stale. Re-fetch pins and retry. |
| operation_failed | Incorrect values submitted. |
| operation_not_allowed | Caller is not authorized to perform this operation. |
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 | Caller is not authorized to perform this operation. |
message_ids to remove specific pinned messages. If omitted, all pinned messages in the chat are removed.
content:
application/json:
schema:
$ref: '#/components/schemas/delete-pinned-messages-request'
responses:
'204':
description: Pinned message(s) deleted successfully. No response body.
'400':
description: Bad Request.
content:
application/json:
schema:
$ref: '#/components/schemas/error-response'
examples:
operation_not_allowed:
summary: Caller is not authorized to perform this operation
value:
message: Uh-Oh! You are not authorized to do this operation.
code: operation_not_allowed
'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.DELETE
/chats/{CHAT_ID}/pin-messages?primary=true:
get:
summary: Get primary pinned message
operationId: getPrimaryPinnedMessage
description: |
Fetches the primary pinned message in a chat. The primary pin is the most prominently displayed pinned message, typically shown at the top of the pinned list and highlighted in the UI.
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 | User might not be a participant of that chat. |
| operation_failed | Unexpected error while fetching the primary pin. |
-1 means no expiry. ISO 8601 datetime string when an expiry is set.
oneOf:
- type: integer
example: -1
- type: string
example: '2026-04-19T19:09:44+05:30'
creator:
type: object
properties:
name:
type: string
id:
type: string
created_time:
type: string
format: date-time
last_modified_time:
type: string
format: date-time
is_primary:
type: boolean
description: true if this is the primary (top) pinned message.
pinned-message:
type: object
description: A pinned message object. Contains the original message fields (id, type, content, sender, time, mentions) along with pin-specific fields.
properties:
id:
type: string
type:
type: string
example: text
content:
type: object
properties:
text:
type: string
sender:
type: object
properties:
name:
type: string
id:
type: string
time:
type: string
format: date-time
mentions:
type: array
description: Present only when the message contains mentions.
items:
type: object
properties:
name:
type: string
id:
type: string
type:
type: string
is_pinned:
type: boolean
description: Always true for pinned messages.
pin_information:
$ref: '#/components/schemas/pin-information'
get-pinned-messages-response:
type: object
description: Response envelope for listing all pinned messages.
properties:
url:
type: string
type:
type: string
example: pinmessages
sync_token:
type: string
description: Pass in subsequent requests to fetch only pins updated since the last sync.
data:
type: array
items:
$ref: '#/components/schemas/pinned-message'
example:
url: /company/16557244/v3/chats/1488288613043522033/pin-messages
type: pinmessages
sync_token: NTB8MTc3MzkyNzUxMjcwNnw0MDAwMDAwMDExMDAz
data:
- is_pinned: true
pin_information:
expiry_time: -1
creator:
name: Tim Harrison
id: '16557777'
created_time: '2026-03-19T19:08:32+05:30'
last_modified_time: '2026-03-19T19:08:32+05:30'
is_primary: true
sender:
name: Tim Harrison
id: '16557777'
type: text
content:
text: '{@16557498}'
time: '2026-03-19T10:02:52+05:30'
id: 1.7738947728961294e+23
mentions:
- name: '@sharan 203'
id: '16557498'
type: user
get-primary-pinned-message-response:
type: object
description: Response envelope when fetching the primary pinned message.
properties:
url:
type: string
type:
type: string
example: pinmessages
data:
$ref: '#/components/schemas/pinned-message'
example:
url: /company/16557244/v3/chats/1488288613043522033/pin-messages
type: pinmessages
data:
type: text
id: '1746000123456789001'
time: '2026-04-30T09:00:00Z'
sender:
id: '1234567890'
name: Alice Johnson
content:
text: Please review the Q2 report before Friday.
is_pinned: true
pin_information:
expiry_time: -1
creator:
id: '9876543210'
name: Bob Smith
created_time: '2026-04-30T09:15:00Z'
last_modified_time: '2026-04-30T09:15:00Z'
is_primary: true
add-pinned-message-request:
type: object
description: Request body for pinning a message in a chat.
required:
- message_id
- expiry_time
- notify
properties:
message_id:
type: string
description: |
ID of the message to pin. This message must already exist in the chat and cannot be deleted.
expiry_time:
description: |
When the pin should expire. Accepts ISO 8601 datetime strings (e.g., "2026-04-19T19:09:44+05:30") or epoch timestamps (e.g., 1745068184000). Use -1 for no expiry.
oneOf:
- type: string
- type: integer
notify:
type: boolean
description: |
Set to true to send a notification to chat participants about the new pin. Defaults to false.
primary:
type: boolean
description: |
Set to true to pin as the primary (top) message. Defaults to false. If this is the first pin in the chat, it automatically becomes primary regardless of this value.
example:
message_id: '1773894772896_12958180473'
expiry_time: '2026-04-19T19:09:44+05:30'
notify: false
add-pinned-message-response:
type: object
description: Response envelope after pinning a message.
properties:
url:
type: string
type:
type: string
example: pinmessages
data:
$ref: '#/components/schemas/pinned-message'
example:
url: /v3/chats/1488288613043522033/pin-messages
type: pinmessages
data:
pin_information:
expiry_time: '2026-04-19T19:09:44+05:30'
creator:
name: Tim Harrison
id: '16557777'
created_time: '2026-03-19T19:08:32+05:30'
last_modified_time: '2026-03-19T19:08:32+05:30'
is_primary: false
is_pinned: true
sender:
name: Tim Harrison
id: '16557777'
type: text
content:
text: Please review the deployment checklist before the release.
time: '2026-03-19T10:02:52+05:30'
id: '1773894772896_12958180473'
reorder-pinned-message-request:
type: object
description: Request body for reordering a pinned message in the list.
required:
- message_id
- last_sync_time
properties:
message_id:
type: string
description: ID of the pinned message to move.
pin_above:
type: string
description: ID of the message above which to position. If omitted, the message is moved to the last position.
last_sync_time:
description: |
Required for reorder operation. Accepts ISO 8601 datetime strings (e.g., "2026-04-19T19:09:44+05:30") or epoch timestamps (e.g., 1745068184000). The server rejects the request if this is stale.
oneOf:
- type: string
- type: integer
example:
message_id: '1773894772896_12958180473'
pin_above: '1773895219462_47318365091'
last_sync_time: 1745068184000
delete-pinned-messages-request:
type: object
description: Request body for deleting specific pinned messages.
required:
- message_ids
properties:
message_ids:
type: array
description: |
List of message IDs to unpin. These messages must currently be pinned in the chat. If this field is omitted or an empty array is provided, all pinned messages in the chat are removed.