Messages

Messages AI Tools

Open in ChatGPT

Open in ChatGPT to ask questions about this page

Open in Claude

Open in Claude to ask questions about this page

Copy as Markdown

Copy this page as markdown to use with AI assistants

View as Markdown

Open this page as markdown in a new tab

The Messages API is essential for communication within Zoho Cliq, allowing you to send, retrieve, and manage messages across chats, channels, and bots.

Whether you're creating automated workflows, custom integrations, or engaging messaging experiences, the v3 Messages API provides developers with precise control over every aspect of message delivery and management.

Key Capabilities:
With the latest version (v3) of the Messages API, you can:

  • Post Messages: Send messages directly to a chat, broadcast them to a channel, or interact with a bot-each with specific operations designed for clear and predictable routing.
  • Retrieve & Search: Fetch messages from specific conversations or search across chats using keywords, participants, or message metadata.
  • Actions: Forward messages to other participants, delete multiple messages in bulk, and keep conversations clean and relevant.

Download Messages OpenAPI Document

Delete multiple messages AI Tools

Open in ChatGPT

Open in ChatGPT to ask questions about this page

Open in Claude

Open in Claude to ask questions about this page

Copy as Markdown

Copy this page as markdown to use with AI assistants

View as Markdown

Open this page as markdown in a new tab

Deletes up to 25 messages in a chat in a single request. Returns a per-message result indicating success or failure for each ID.

Admins deleting messages on behalf of other users must supply a reason(an optional comment) can also be provided.

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.


Possible Error Codes

Error Code Description
message_delete_limit_exceeded You can only delete up to 25 messages at once.
invalid_parameters The message_ids parameter is invalid or empty.
invalid_delete_reason The provided reason for deletion is not valid.
access_denied You do not have permission to delete one or more of the selected messages.
message_delete_timeout The time limit to delete one or more of these messages has expired.
message_not_found Requested message could not be found.
chat_not_found The requested chat does not exist or you are not a participant.

Error Response Format

When an error occurs, the API returns a JSON response in this format:

{"message": "A human-readable description of the error.", "code": "error_code"}

where code is the error identifier (as listed in the table above) and message is a human-readable explanation of what went wrong.


OAuth Scope : ZohoCliq.Messages.DELETE

Path Parameters

CHAT_ID
string
(Required)
The unique identifier of the chat. To learn how to retrieve this ID, see CHAT_ID in the Glossary page.

Query Parameters

message_ids
string
(Required)
Comma-separated list of message IDs to delete.
Maximum of 25 IDs allowed.
reason
string
Reason for deletion when an admin is deleting messages on behalf of other users.
Allowed values:
  • irrelevant_information: The message contains information that is no longer relevant.
  • obscene_content: The message contains inappropriate or offensive content.
  • others: Any other reason not covered by the above options.
comment
string
Optional comment providing additional context for the deletion reason when an admin is deleting messages on behalf of other users.
Maximum length: 250 characters.

Request Example

Click to copy
headers_data = Map(); headers_data.put("Authorization", "Bearer 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f"); response = invokeUrl [ url: "https://cliq.zoho.com/api/v3/chats/987000000654321/messages?message_ids=SOME_STRING_VALUE" type: DELETE headers: headers_data connection: <connection_name> ]; info response;
OkHttpClient client = new OkHttpClient(); Request request = new Request.Builder() .url("https://cliq.zoho.com/api/v3/chats/987000000654321/messages?message_ids=SOME_STRING_VALUE") .delete(null) .addHeader("Authorization", "Bearer 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f") .build(); Response response = client.newCall(request).execute();
const options = { method: 'DELETE', headers: { Authorization: 'Bearer 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f' } }; fetch('https://cliq.zoho.com/api/v3/chats/987000000654321/messages?message_ids=SOME_STRING_VALUE', options) .then(response => response.json()) .then(response => console.log(response)) .catch(err => console.error(err));
import http.client conn = http.client.HTTPSConnection("cliq.zoho.com") headers = { 'Authorization': "Bearer 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f" } conn.request("DELETE", "/api/v3/chats/987000000654321/messages?message_ids=SOME_STRING_VALUE", headers=headers) res = conn.getresponse() data = res.read() print(data.decode("utf-8"))
const http = require("https"); const options = { "method": "DELETE", "hostname": "cliq.zoho.com", "port": null, "path": "/api/v3/chats/987000000654321/messages?message_ids=SOME_STRING_VALUE", "headers": { "Authorization": "Bearer 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f" } }; const req = http.request(options, function (res) { const chunks = []; res.on("data", function (chunk) { chunks.push(chunk); }); res.on("end", function () { const body = Buffer.concat(chunks); console.log(body.toString()); }); }); req.end();
var client = new RestClient("https://cliq.zoho.com/api/v3/chats/987000000654321/messages?message_ids=SOME_STRING_VALUE"); var request = new RestRequest(Method.DELETE); request.AddHeader("Authorization", "Bearer 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f"); IRestResponse response = client.Execute(request);
var client = new HttpClient(); var request = new HttpRequestMessage { Method = HttpMethod.Delete, RequestUri = new Uri("https://cliq.zoho.com/api/v3/chats/987000000654321/messages?message_ids=SOME_STRING_VALUE"), Headers = { { "Authorization", "Bearer 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f" }, }, }; using (var response = await client.SendAsync(request)) { response.EnsureSuccessStatusCode(); var body = await response.Content.ReadAsStringAsync(); Console.WriteLine(body); }
package main import ( "fmt" "net/http" "io/ioutil" ) func main() { url := "https://cliq.zoho.com/api/v3/chats/987000000654321/messages?message_ids=SOME_STRING_VALUE" req, _ := http.NewRequest("DELETE", url, nil) req.Header.Add("Authorization", "Bearer 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f") res, _ := http.DefaultClient.Do(req) defer res.Body.Close() body, _ := ioutil.ReadAll(res.Body) fmt.Println(res) fmt.Println(string(body)) }
const data = null; const xhr = new XMLHttpRequest(); xhr.withCredentials = true; xhr.addEventListener("readystatechange", function () { if (this.readyState === this.DONE) { console.log(this.responseText); } }); xhr.open("DELETE", "https://cliq.zoho.com/api/v3/chats/987000000654321/messages?message_ids=SOME_STRING_VALUE"); xhr.setRequestHeader("Authorization", "Bearer 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f"); xhr.send(data);
curl --request DELETE \ --url 'https://cliq.zoho.com/api/v3/chats/987000000654321/messages?message_ids=SOME_STRING_VALUE' \ --header 'Authorization: Bearer 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f'

Response Example

{ "type": "message.delete_result", "data": [ { "id": "1773813859592_51531973059", "status": "success" }, { "id": "1773813860210_51531973060", "status": "success" }, { "id": "1773813861300_51531973061", "status": "success" } ] }
{ "type": "message.delete_result", "data": [ { "id": "1773813859592_51531973059", "status": "success" }, { "id": "1773813860210_51531973060", "status": "success" }, { "id": "1773813861300_51531973061", "status": "failed", "error": { "code": "access_denied", "message": "You do not have permission to delete this message." } } ] }
{ "code": "message_delete_limit_exceeded", "message": "You can only delete up to 25 messages at once." }
{ "code": "invalid_parameters", "message": "The message_ids parameter is invalid or empty." }
{ "code": "invalid_delete_reason", "message": "The provided reason for deletion is not valid." }
{ "message": "Request was rejected because of invalid AuthToken." }
{ "code": "access_denied", "message": "You do not have permission to delete one or more of the selected messages." }
{ "code": "message_delete_timeout", "message": "The time limit to delete one or more of these messages has expired." }
{ "code": "message_not_found", "message": "Requested message could not be found." }
{ "code": "chat_not_found", "message": "The requested chat does not exist or you are not a participant." }
{ "message": "Too many requests within a certain time frame." }
{ "message": "Cliq server encountered an error which prevents it from fulfilling the request." }

Post message in a channel AI Tools

Open in ChatGPT

Open in ChatGPT to ask questions about this page

Open in Claude

Open in Claude to ask questions about this page

Copy as Markdown

Copy this page as markdown to use with AI assistants

View as Markdown

Open this page as markdown in a new tab

Post a message in a channel using its unique name.

Threshold limit: 50 requests per min per user
Number of API calls allowed within a minute.

Lock period: 10 minutes
Wait time before consecutive API requests.


OAuth Scope : ZohoCliq.Webhooks.CREATE

Arguments

text
string
(Required)
Message text to be sent in the channel. Maximum length: 5000.
reply_to
string
Message ID to reply to in the channel.
sync_message
boolean
Whether to post the message in a synchronous thread.

Path Parameters

CHANNEL_UNIQUE_NAME
string
(Required)
Unique name of the channel. To learn how to retrieve this ID, see CHANNEL_UNIQUE_NAME in the Glossary page.

Query Parameters

bot_unique_name
string
Use this parameter to send a message in a channel as a bot. Note that the bot should already be a participant in the channel.
mark_as_read
boolean
Use these APIs to mark the sent message as read for the user. By default, the message will be unread for the message posted by the user.

Request Example

Click to copy
parameters_data='{"field1":"value1","field2":"value2"}'; headers_data = Map(); headers_data.put("Authorization", "Bearer 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f"); response = invokeUrl [ url: "https://cliq.zoho.com/api/v3/channelsbyname/987000000654321/message" type: POST headers: headers_data content-type: application/json parameters: parameters_data connection: <connection_name> ]; info response;
OkHttpClient client = new OkHttpClient(); MediaType mediaType = MediaType.parse("application/json"); RequestBody body = RequestBody.create(mediaType, "{\"field1\":\"value1\",\"field2\":\"value2\"}"); Request request = new Request.Builder() .url("https://cliq.zoho.com/api/v3/channelsbyname/987000000654321/message") .post(body) .addHeader("Authorization", "Bearer 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f") .addHeader("content-type", "application/json") .build(); Response response = client.newCall(request).execute();
const options = { method: 'POST', headers: { Authorization: 'Bearer 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f', 'content-type': 'application/json' }, body: '{"field1":"value1","field2":"value2"}' }; fetch('https://cliq.zoho.com/api/v3/channelsbyname/987000000654321/message', options) .then(response => response.json()) .then(response => console.log(response)) .catch(err => console.error(err));
import http.client conn = http.client.HTTPSConnection("cliq.zoho.com") payload = "{\"field1\":\"value1\",\"field2\":\"value2\"}" headers = { 'Authorization': "Bearer 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f", 'content-type': "application/json" } conn.request("POST", "/api/v3/channelsbyname/987000000654321/message", payload, headers) res = conn.getresponse() data = res.read() print(data.decode("utf-8"))
const http = require("https"); const options = { "method": "POST", "hostname": "cliq.zoho.com", "port": null, "path": "/api/v3/channelsbyname/987000000654321/message", "headers": { "Authorization": "Bearer 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f", "content-type": "application/json" } }; const req = http.request(options, function (res) { const chunks = []; res.on("data", function (chunk) { chunks.push(chunk); }); res.on("end", function () { const body = Buffer.concat(chunks); console.log(body.toString()); }); }); req.write(JSON.stringify({field1: 'value1', field2: 'value2'})); req.end();
var client = new RestClient("https://cliq.zoho.com/api/v3/channelsbyname/987000000654321/message"); var request = new RestRequest(Method.POST); request.AddHeader("Authorization", "Bearer 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f"); request.AddHeader("content-type", "application/json"); request.AddParameter("application/json", "{\"field1\":\"value1\",\"field2\":\"value2\"}", ParameterType.RequestBody); IRestResponse response = client.Execute(request);
var client = new HttpClient(); var request = new HttpRequestMessage { Method = HttpMethod.Post, RequestUri = new Uri("https://cliq.zoho.com/api/v3/channelsbyname/987000000654321/message"), Headers = { { "Authorization", "Bearer 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f" }, }, Content = new StringContent("{\"field1\":\"value1\",\"field2\":\"value2\"}") { Headers = { ContentType = new MediaTypeHeaderValue("application/json") } } }; using (var response = await client.SendAsync(request)) { response.EnsureSuccessStatusCode(); var body = await response.Content.ReadAsStringAsync(); Console.WriteLine(body); }
package main import ( "fmt" "strings" "net/http" "io/ioutil" ) func main() { url := "https://cliq.zoho.com/api/v3/channelsbyname/987000000654321/message" payload := strings.NewReader("{\"field1\":\"value1\",\"field2\":\"value2\"}") req, _ := http.NewRequest("POST", url, payload) req.Header.Add("Authorization", "Bearer 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f") req.Header.Add("content-type", "application/json") res, _ := http.DefaultClient.Do(req) defer res.Body.Close() body, _ := ioutil.ReadAll(res.Body) fmt.Println(res) fmt.Println(string(body)) }
const data = JSON.stringify({ "field1": "value1", "field2": "value2" }); const xhr = new XMLHttpRequest(); xhr.withCredentials = true; xhr.addEventListener("readystatechange", function () { if (this.readyState === this.DONE) { console.log(this.responseText); } }); xhr.open("POST", "https://cliq.zoho.com/api/v3/channelsbyname/987000000654321/message"); xhr.setRequestHeader("Authorization", "Bearer 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f"); xhr.setRequestHeader("content-type", "application/json"); xhr.send(data);
curl --request POST \ --url https://cliq.zoho.com/api/v3/channelsbyname/987000000654321/message \ --header 'Authorization: Bearer 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f' \ --header 'content-type: application/json' \ --data '{"field1":"value1","field2":"value2"}'

Body Parameters

Click to copy
{ "text": "Hey Guys!", "reply_to": "72374289911", "sync_message": true }

Response Example

{ "Response Code": "204 No response" }
{ "message": "The request cannot be performed. Usually because of malformed parameter or missing parameter." }
{ "message": "Request was rejected because of invalid AuthToken." }
{ "message": "The user does not have enough permission or possibly not an user of the respective organization to access the resource." }
{ "message": "The URL you've sent is wrong. It's possible that the resource you've requested has been moved to another URL." }
{ "message": "The requested resource does not support the HTTP method used. For example, requesting List of all customers API with PUT as the HTTP method." }
{ "message": "The response has been received but the requested response type is not supported by the browser." }
{ "message": "Too many requests within a certain time frame." }
{ "message": "Cliq server encountered an error which prevents it from fulfilling the request." }

Post message in chat AI Tools

Open in ChatGPT

Open in ChatGPT to ask questions about this page

Open in Claude

Open in Claude to ask questions about this page

Copy as Markdown

Copy this page as markdown to use with AI assistants

View as Markdown

Open this page as markdown in a new tab

To post message in a chat (or thread), the chat_id (thread_id in case of threads) can be used in the request URL.

Threshold limit: 20 requests per min per user
Number of API calls allowed within a minute.

Lock period: 10 minutes
Wait time before consecutive API requests.


OAuth Scope : ZohoCliq.Webhooks.CREATE

Arguments

text
string
(Required)
Text content to send in chat. Maximum length: 5000.
reply_to
string
Message ID to reply to in chat.
sync_message
boolean
Post message in synchronous thread; returns message ID.
mark_as_read
boolean
Mark the message as read for the user.

Path Parameters

CHAT_ID
string
(Required)
The ID of the chat where the message should be posted. To learn how to retrieve this ID, see CHAT_ID in the Glossary page.

Request Example

Click to copy
parameters_data='{"field1":"value1","field2":"value2"}'; headers_data = Map(); headers_data.put("Authorization", "Bearer 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f"); response = invokeUrl [ url: "https://cliq.zoho.com/api/v3/chats/987000000654321/message" type: POST headers: headers_data content-type: application/json parameters: parameters_data connection: <connection_name> ]; info response;
OkHttpClient client = new OkHttpClient(); MediaType mediaType = MediaType.parse("application/json"); RequestBody body = RequestBody.create(mediaType, "{\"field1\":\"value1\",\"field2\":\"value2\"}"); Request request = new Request.Builder() .url("https://cliq.zoho.com/api/v3/chats/987000000654321/message") .post(body) .addHeader("Authorization", "Bearer 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f") .addHeader("content-type", "application/json") .build(); Response response = client.newCall(request).execute();
const options = { method: 'POST', headers: { Authorization: 'Bearer 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f', 'content-type': 'application/json' }, body: '{"field1":"value1","field2":"value2"}' }; fetch('https://cliq.zoho.com/api/v3/chats/987000000654321/message', options) .then(response => response.json()) .then(response => console.log(response)) .catch(err => console.error(err));
import http.client conn = http.client.HTTPSConnection("cliq.zoho.com") payload = "{\"field1\":\"value1\",\"field2\":\"value2\"}" headers = { 'Authorization': "Bearer 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f", 'content-type': "application/json" } conn.request("POST", "/api/v3/chats/987000000654321/message", payload, headers) res = conn.getresponse() data = res.read() print(data.decode("utf-8"))
const http = require("https"); const options = { "method": "POST", "hostname": "cliq.zoho.com", "port": null, "path": "/api/v3/chats/987000000654321/message", "headers": { "Authorization": "Bearer 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f", "content-type": "application/json" } }; const req = http.request(options, function (res) { const chunks = []; res.on("data", function (chunk) { chunks.push(chunk); }); res.on("end", function () { const body = Buffer.concat(chunks); console.log(body.toString()); }); }); req.write(JSON.stringify({field1: 'value1', field2: 'value2'})); req.end();
var client = new RestClient("https://cliq.zoho.com/api/v3/chats/987000000654321/message"); var request = new RestRequest(Method.POST); request.AddHeader("Authorization", "Bearer 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f"); request.AddHeader("content-type", "application/json"); request.AddParameter("application/json", "{\"field1\":\"value1\",\"field2\":\"value2\"}", ParameterType.RequestBody); IRestResponse response = client.Execute(request);
var client = new HttpClient(); var request = new HttpRequestMessage { Method = HttpMethod.Post, RequestUri = new Uri("https://cliq.zoho.com/api/v3/chats/987000000654321/message"), Headers = { { "Authorization", "Bearer 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f" }, }, Content = new StringContent("{\"field1\":\"value1\",\"field2\":\"value2\"}") { Headers = { ContentType = new MediaTypeHeaderValue("application/json") } } }; using (var response = await client.SendAsync(request)) { response.EnsureSuccessStatusCode(); var body = await response.Content.ReadAsStringAsync(); Console.WriteLine(body); }
package main import ( "fmt" "strings" "net/http" "io/ioutil" ) func main() { url := "https://cliq.zoho.com/api/v3/chats/987000000654321/message" payload := strings.NewReader("{\"field1\":\"value1\",\"field2\":\"value2\"}") req, _ := http.NewRequest("POST", url, payload) req.Header.Add("Authorization", "Bearer 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f") req.Header.Add("content-type", "application/json") res, _ := http.DefaultClient.Do(req) defer res.Body.Close() body, _ := ioutil.ReadAll(res.Body) fmt.Println(res) fmt.Println(string(body)) }
const data = JSON.stringify({ "field1": "value1", "field2": "value2" }); const xhr = new XMLHttpRequest(); xhr.withCredentials = true; xhr.addEventListener("readystatechange", function () { if (this.readyState === this.DONE) { console.log(this.responseText); } }); xhr.open("POST", "https://cliq.zoho.com/api/v3/chats/987000000654321/message"); xhr.setRequestHeader("Authorization", "Bearer 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f"); xhr.setRequestHeader("content-type", "application/json"); xhr.send(data);
curl --request POST \ --url https://cliq.zoho.com/api/v3/chats/987000000654321/message \ --header 'Authorization: Bearer 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f' \ --header 'content-type: application/json' \ --data '{"field1":"value1","field2":"value2"}'

Body Parameters

Click to copy
{ "text": "Hey!", "reply_to": "55743307", "sync_message": true, "mark_as_read": true }

Response Example

{ "message_id": "1599387839188_229293271789" }
{ "message": "The request cannot be performed. Usually because of malformed parameter or missing parameter." }
{ "message": "Request was rejected because of invalid AuthToken." }
{ "message": "The user does not have enough permission or possibly not an user of the respective organization to access the resource." }
{ "message": "The URL you've sent is wrong. It's possible that the resource you've requested has been moved to another URL." }
{ "message": "The requested resource does not support the HTTP method used. For example, requesting List of all customers API with PUT as the HTTP method." }
{ "message": "The response has been received but the requested response type is not supported by the browser." }
{ "message": "Too many requests within a certain time frame." }
{ "message": "Cliq server encountered an error which prevents it from fulfilling the request." }

Forward Messages AI Tools

Open in ChatGPT

Open in ChatGPT to ask questions about this page

Open in Claude

Open in Claude to ask questions about this page

Copy as Markdown

Copy this page as markdown to use with AI assistants

View as Markdown

Open this page as markdown in a new tab

Forwards one or more messages from a source chat to other chats or users.

OAuth Scope: ZohoCliq.Messages.CREATE
Threshold limit: 50 requests per min per user
Number of API calls allowed within a minute.

Lock period: 10 minutes
Wait time before consecutive API requests.


OAuth Scope : ZohoCliq.Messages.CREATE

Arguments

source
object
(Required)
Source chat and messages to forward. You can specify 1 to 25 message IDs from a single chat to forward in one request.
Show Sub-Attributes arrow
chat_id
string
(Required)
Chat ID from which messages will be forwarded. All message IDs must belong to this chat.
message_ids
array
(Required)
List of message IDs to forward. All messages must be from the same source chat specified by chat_id. You can forward a minimum of 1 message and a maximum of 25 messages in a single request.
recipients
object
(Required)
Recipients to forward the messages to. You can specify up to 100 chat IDs and/or user IDs as recipients. Messages will be forwarded to all specified recipients based on the provided options.
Show Sub-Attributes arrow
chat_ids
string
Comma-separated list of chat IDs to forward messages to.
Maximum of 100 chat IDs allowed.
user_ids
string
Comma-separated list of user IDs to forward messages to.
Maximum of 100 user IDs allowed.
forward_as_group
boolean
When true, messages will be forwarded as a single combined message in the recipient chats, rather than individual messages. The content of the forwarded message will include all original messages grouped together. If false or not provided, each message will be forwarded separately in the recipient chats.
Note: If forwarding to multiple recipients, it's recommended to set this to true to avoid spamming recipients with multiple messages.
show_original_sender
boolean
When true, the forwarded message will include the name of the original sender for each message. This is applicable when forward_as_group is true to provide context about who sent each message in the group forward. If false or not provided, the original sender's name will not be displayed in the forwarded message content.
title
string
Optional title to include with the forwarded message when forward_as_group is true. This title will be displayed at the top of the grouped forwarded message in the recipient chats. If not provided, no title will be shown.
Maximum length: 255 characters.

Request Example

Click to copy
parameters_data='{"field1":"value1","field2":"value2"}'; headers_data = Map(); headers_data.put("Authorization", "Bearer 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f"); response = invokeUrl [ url: "https://cliq.zoho.com/api/v3/messages" type: POST headers: headers_data content-type: application/json parameters: parameters_data connection: <connection_name> ]; info response;
OkHttpClient client = new OkHttpClient(); MediaType mediaType = MediaType.parse("application/json"); RequestBody body = RequestBody.create(mediaType, "{\"field1\":\"value1\",\"field2\":\"value2\"}"); Request request = new Request.Builder() .url("https://cliq.zoho.com/api/v3/messages") .post(body) .addHeader("Authorization", "Bearer 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f") .addHeader("content-type", "application/json") .build(); Response response = client.newCall(request).execute();
const options = { method: 'POST', headers: { Authorization: 'Bearer 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f', 'content-type': 'application/json' }, body: '{"field1":"value1","field2":"value2"}' }; fetch('https://cliq.zoho.com/api/v3/messages', options) .then(response => response.json()) .then(response => console.log(response)) .catch(err => console.error(err));
import http.client conn = http.client.HTTPSConnection("cliq.zoho.com") payload = "{\"field1\":\"value1\",\"field2\":\"value2\"}" headers = { 'Authorization': "Bearer 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f", 'content-type': "application/json" } conn.request("POST", "/api/v3/messages", payload, headers) res = conn.getresponse() data = res.read() print(data.decode("utf-8"))
const http = require("https"); const options = { "method": "POST", "hostname": "cliq.zoho.com", "port": null, "path": "/api/v3/messages", "headers": { "Authorization": "Bearer 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f", "content-type": "application/json" } }; const req = http.request(options, function (res) { const chunks = []; res.on("data", function (chunk) { chunks.push(chunk); }); res.on("end", function () { const body = Buffer.concat(chunks); console.log(body.toString()); }); }); req.write(JSON.stringify({field1: 'value1', field2: 'value2'})); req.end();
var client = new RestClient("https://cliq.zoho.com/api/v3/messages"); var request = new RestRequest(Method.POST); request.AddHeader("Authorization", "Bearer 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f"); request.AddHeader("content-type", "application/json"); request.AddParameter("application/json", "{\"field1\":\"value1\",\"field2\":\"value2\"}", ParameterType.RequestBody); IRestResponse response = client.Execute(request);
var client = new HttpClient(); var request = new HttpRequestMessage { Method = HttpMethod.Post, RequestUri = new Uri("https://cliq.zoho.com/api/v3/messages"), Headers = { { "Authorization", "Bearer 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f" }, }, Content = new StringContent("{\"field1\":\"value1\",\"field2\":\"value2\"}") { Headers = { ContentType = new MediaTypeHeaderValue("application/json") } } }; using (var response = await client.SendAsync(request)) { response.EnsureSuccessStatusCode(); var body = await response.Content.ReadAsStringAsync(); Console.WriteLine(body); }
package main import ( "fmt" "strings" "net/http" "io/ioutil" ) func main() { url := "https://cliq.zoho.com/api/v3/messages" payload := strings.NewReader("{\"field1\":\"value1\",\"field2\":\"value2\"}") req, _ := http.NewRequest("POST", url, payload) req.Header.Add("Authorization", "Bearer 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f") req.Header.Add("content-type", "application/json") res, _ := http.DefaultClient.Do(req) defer res.Body.Close() body, _ := ioutil.ReadAll(res.Body) fmt.Println(res) fmt.Println(string(body)) }
const data = JSON.stringify({ "field1": "value1", "field2": "value2" }); const xhr = new XMLHttpRequest(); xhr.withCredentials = true; xhr.addEventListener("readystatechange", function () { if (this.readyState === this.DONE) { console.log(this.responseText); } }); xhr.open("POST", "https://cliq.zoho.com/api/v3/messages"); xhr.setRequestHeader("Authorization", "Bearer 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f"); xhr.setRequestHeader("content-type", "application/json"); xhr.send(data);
curl --request POST \ --url https://cliq.zoho.com/api/v3/messages \ --header 'Authorization: Bearer 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f' \ --header 'content-type: application/json' \ --data '{"field1":"value1","field2":"value2"}'

Body Parameters

Click to copy
{ "source": { "chat_id": "2890538000000012345", "message_ids": [ "1773813859592_51531973059", "1773813860210_51531973060" ] }, "recipients": { "chat_ids": "2890538000000067890", "user_ids": "70027934", "forward_as_group": true, "show_original_sender": true, "title": "Login Bug - Critical Issue (Forwarded from Engineering)" } }

Response Example

{ "data": { "source_chat_id": "2890538000000012345", "forwarded": { "chat_ids": [ "2890538000000067890" ], "user_ids": [] }, "failures": [ { "id": "70027934", "status": "failed", "error": { "code": "chat_access_denied", "message": "You must be a participant in this chat to perform this action." } } ] } }
{ "message": "The request cannot be performed. Usually because of malformed parameter or missing parameter." }
{ "message": "Request was rejected because of invalid AuthToken." }
{ "message": "The user does not have enough permission or possibly not an user of the respective organization to access the resource." }
{ "message": "The URL you've sent is wrong. It's possible that the resource you've requested has been moved to another URL." }
{ "message": "The requested resource does not support the HTTP method used." }
{ "message": "The response has been received but the requested response type is not supported by the browser." }
{ "message": "Too many requests within a certain time frame." }
{ "message": "Cliq server encountered an error which prevents it from fulfilling the request." }

Search Messages AI Tools

Open in ChatGPT

Open in ChatGPT to ask questions about this page

Open in Claude

Open in Claude to ask questions about this page

Copy as Markdown

Copy this page as markdown to use with AI assistants

View as Markdown

Open this page as markdown in a new tab

Search for messages across chats with extensive filtering options. This endpoint supports keyword search, filtering by sender/recipient, date range, file attributes, and more to help you find specific messages efficiently.

Threshold limit: 50 requests per min per user
Number of API calls allowed within a minute.

Lock period: 10 minutes
Wait time before consecutive API requests.


OAuth Scope : ZohoCliq.Chats.READ,ZohoCliq.Messages.READ

Query Parameters

query
string
Full-text search query to match message content. Supports keywords and phrases (in quotes)
Maximum length: 1000 characters.
limit
integer
Maximum number of messages to return per page. Default is 50, maximum allowed is 50.
next_token
long
Pagination cursor returned from a previous response. Pass the next_token value to retrieve the next page of results. Accepts a Long value representing the timestamp.
from_user_ids
string
Filter by sender ZUIDs. Provide a comma-separated list of user IDs to restrict results to messages sent by specific users.
Maximum of 5 user IDs allowed.
to_user_ids
string
Filter by recipient ZUIDs. Provide a comma-separated list of user IDs to restrict results to messages sent to specific users.
Maximum of 5 user IDs allowed.
mentioned_user_ids
string
Filter messages that mention specific users. Provide a comma-separated list of user IDs to find messages that contain mentions of those users.
Maximum of 5 user IDs allowed.
chat_ids
string
Filter by chat IDs. Provide a comma-separated list of chat IDs to restrict results to specific chats.
Maximum of 5 chat IDs allowed.
chat_type
string
Filter by chat type.
Allowed values:
  • direct_message: One-on-one chats between two users.
  • group_chat: Group chats with multiple participants.
  • channel: Organization-wide or team-specific channels.
  • threads: Threads within channels or group chats.
  • bot: Bot conversation chats.
  • guests: Chats with external guest participants.
Maximum of 6 values allowed.
parent_chatid
string
Filter messages within a specific thread by providing the parent chat ID (thread ID). This will return messages that are part of the specified thread.
channel_type
string
Filter by channel type when searching within channels.
Allowed values:
  • organisation: Channels that are open to the entire organization.
  • team: Channels that are specific to certain teams.
  • personal: Private channels that are only accessible to invited members.
  • external: Channels that include external users outside the organization.
team_ids
string
Filter by team IDs when searching within team channels. Provide a comma-separated list of team IDs to restrict results to channels associated with specific teams.
Maximum of 5 team IDs allowed.
include_allowed_channels
boolean
When true, include messages from channels that the user has access to, even if they are not explicitly listed in the chat_ids parameter. This allows users to find relevant messages in channels they are part of without needing to specify each channel ID.
from_time
string
Start of the date range for the search. Accepts epoch time in milliseconds (Long) or ISO 8601 format (e.g., 2024-01-01T00:00:00Z). Messages sent at or after this time will be included in the results.
to_time
string
End of the date range for the search. Accepts epoch time in milliseconds (Long) or ISO 8601 format (e.g., 2024-01-01T00:00:00Z). Note: from_time must be earlier than to_time, otherwise the request fails.
file_name
string
Match by file name for messages that contain attachments. Supports partial matches and wildcards (e.g., "report*" to match "report_Q1.pdf"). Accepts a comma-separated list of file names.
Maximum of 10 values allowed. Total maximum length: 500 characters.
file_type
string
Filter by file type for messages that contain attachments. Provide a comma-separated list of MIME types (e.g., image/png, application/pdf) to find messages with specific types of attached files.
Maximum of 10 values allowed. Total maximum length: 500 characters.
file_content_query
string
Full-text search query to match the content of attached files. This allows you to find messages based on the text within attachments, such as documents or PDFs. Supports keywords, phrases (in quotes), and boolean operators (AND, OR, NOT).
Maximum length: 500 characters.
message_type
string
Filter by message type.
Allowed values:
  • text: Messages that contain only text content.
  • link: Messages containing URLs.
  • file: Messages that include file attachments.
is_pinned
boolean
When true, only return messages that are pinned in their respective chats. Note: If this parameter is true, the chat_ids parameter must include exactly one chat ID to specify which chat's pinned messages to search within.
has_mentions
boolean
When true, only return messages that contain mentions of users.
star_types
string
Filter messages by star types. Provide a comma-separated list of star types to find messages that have been starred with specific types (e.g., "important,followup").
Maximum of 5 star types allowed.
Allowed star types:
  • important: Messages marked as requiring attention.
  • to_do: Messages flagged as action items.
  • note: Messages saved for reference.
  • manager: Messages related to managerial communications.
  • follow_up: Messages requiring follow-up.
  • followup: Messages marked for follow-up.
  • question: Messages marked as questions.
  • idea: Messages marked as ideas.
  • other: Messages marked with a custom star type.
include_bot_messages
boolean
When true, include messages sent by bots in the search results. By default, bot messages are excluded from search results.

Request Example

Click to copy
headers_data = Map(); headers_data.put("Authorization", "Bearer 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f"); response = invokeUrl [ url: "https://cliq.zoho.com/api/v3/messages/search" type: GET headers: headers_data connection: <connection_name> ]; info response;
OkHttpClient client = new OkHttpClient(); Request request = new Request.Builder() .url("https://cliq.zoho.com/api/v3/messages/search") .get() .addHeader("Authorization", "Bearer 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f") .build(); Response response = client.newCall(request).execute();
const options = { method: 'GET', headers: { Authorization: 'Bearer 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f' } }; fetch('https://cliq.zoho.com/api/v3/messages/search', options) .then(response => response.json()) .then(response => console.log(response)) .catch(err => console.error(err));
import http.client conn = http.client.HTTPSConnection("cliq.zoho.com") headers = { 'Authorization': "Bearer 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f" } conn.request("GET", "/api/v3/messages/search", headers=headers) res = conn.getresponse() data = res.read() print(data.decode("utf-8"))
const http = require("https"); const options = { "method": "GET", "hostname": "cliq.zoho.com", "port": null, "path": "/api/v3/messages/search", "headers": { "Authorization": "Bearer 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f" } }; const req = http.request(options, function (res) { const chunks = []; res.on("data", function (chunk) { chunks.push(chunk); }); res.on("end", function () { const body = Buffer.concat(chunks); console.log(body.toString()); }); }); req.end();
var client = new RestClient("https://cliq.zoho.com/api/v3/messages/search"); var request = new RestRequest(Method.GET); request.AddHeader("Authorization", "Bearer 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f"); IRestResponse response = client.Execute(request);
var client = new HttpClient(); var request = new HttpRequestMessage { Method = HttpMethod.Get, RequestUri = new Uri("https://cliq.zoho.com/api/v3/messages/search"), Headers = { { "Authorization", "Bearer 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f" }, }, }; using (var response = await client.SendAsync(request)) { response.EnsureSuccessStatusCode(); var body = await response.Content.ReadAsStringAsync(); Console.WriteLine(body); }
package main import ( "fmt" "net/http" "io/ioutil" ) func main() { url := "https://cliq.zoho.com/api/v3/messages/search" req, _ := http.NewRequest("GET", url, nil) req.Header.Add("Authorization", "Bearer 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f") res, _ := http.DefaultClient.Do(req) defer res.Body.Close() body, _ := ioutil.ReadAll(res.Body) fmt.Println(res) fmt.Println(string(body)) }
const data = null; const xhr = new XMLHttpRequest(); xhr.withCredentials = true; xhr.addEventListener("readystatechange", function () { if (this.readyState === this.DONE) { console.log(this.responseText); } }); xhr.open("GET", "https://cliq.zoho.com/api/v3/messages/search"); xhr.setRequestHeader("Authorization", "Bearer 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f"); xhr.send(data);
curl --request GET \ --url https://cliq.zoho.com/api/v3/messages/search \ --header 'Authorization: Bearer 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f'

Response Example

{ "messages": [ { "message_id": "1710934200000", "time": "2025-03-20T14:30:00.000Z", "sender": "711622XXXX", "chat_id": "6795XXXXXXXXXXXXXX", "chat_title": "General", "type": "text", "content": { "text": "Please review the updated proposal." } }, { "message_id": "1710920100000", "time": "2025-03-20T10:35:00.000Z", "sender": "711633XXXX", "chat_id": "6795YYYYYYYYYYYY", "chat_title": "Project Alpha", "type": "file", "content": { "file_name": "proposal_v2.pdf", "file_type": "application/pdf", "file_size": 204800 }, "channel_type": "organisation" } ], "next_token": "1710920099000", "matched_search_value": "proposal" }
{ "error": { "code": "invalid.inputs.submitted", "message": "An invalid parameter value was passed. For is_pinned, this also means fewer or more than one chat ID was provided." } }
{ "error": { "code": "invalid.time.submitted", "message": "Invalid timestamp format or from_time must be earlier than to_time." } }
{ "error": { "code": "unauthorized", "message": "Request was rejected because of invalid AuthToken." } }
{ "error": { "code": "invalid_access", "message": "You are not a member of the organisation or do not have permission to access this resource." } }
{ "error": { "code": "rate_limit_exceeded", "message": "Too many requests within a certain time frame. Please try again later." } }
{ "error": { "code": "error_message_search", "message": "An unexpected error occurred while executing the search." } }